style: counter

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-10-25 15:20:56 +03:00
parent 13b2826b20
commit c6bdc199f3
3 changed files with 33 additions and 0 deletions

18
01-counter/counter_tb.v Normal file
View file

@ -0,0 +1,18 @@
module counter_test;
reg reset = 0;
initial begin
#17 reset = 1;
#11 reset = 0;
#17 reset = 1;
#11 reset = 0;
#17 $stop;
end
reg clk = 0;
always #5 clk = !clk;
wire [7:0] value;
counter c1(value, clk, reset);
initial
$monitor("Time = %t, Value = %h (%0d)", $time, value, value);
endmodule