nand2/05_Computer_Architecture/04_HACK/HACK_tb.v
Michael Schröder 971b323822 added v2.0
2023-01-11 23:04:57 +01:00

31 lines
380 B
Verilog

`timescale 10ns/1ns
`default_nettype none
module HACK_tb();
// IN,OUT
reg CLK = 1;
reg [1:0] BUT = 0;
wire [1:0] LED;
// Part
HACK HACK(
.CLK(CLK),
.BUT(BUT),
.LED(LED)
);
// Simulate
always #500 BUT <= BUT+1;
// Test
always #0.5 CLK = ~CLK;
initial begin
$dumpfile("HACK_tb.vcd");
$dumpvars(0, HACK_tb);
#4000
$finish;
end
endmodule