style: ✨ counter
This commit is contained in:
parent
13b2826b20
commit
c6bdc199f3
3 changed files with 33 additions and 0 deletions
18
01-counter/counter_tb.v
Normal file
18
01-counter/counter_tb.v
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue