Created
April 7, 2019 15:20
-
-
Save axayjha/2152ac7d8fad2729a3f9b97798dd65ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module test; | |
/* Make a reset that pulses once. */ | |
reg reset = 0; | |
initial begin | |
$dumpfile("test.vcd"); | |
$dumpvars(0,test); | |
# 17 reset = 1; | |
# 11 reset = 0; | |
# 29 reset = 1; | |
# 5 reset =0; | |
# 513 $finish; | |
end | |
/* Make a regular pulsing clock. */ | |
reg clk = 0; | |
always #1 clk = !clk; | |
wire [7:0] value; | |
counter c1 (value, clk, reset); | |
initial | |
$monitor("At time %t, value = %h (%0d)", | |
$time, value, value); | |
endmodule // test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment