diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-10-15 09:25:52 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-10-15 09:25:52 +0100 |
commit | 6c9cc975a5715f186c00e487c4ed38a221711651 (patch) | |
tree | a1255876fd7acc6faededaf18e87c14ec207fec6 /example/interesting.v | |
parent | ed8336189707bd1575de3cfffa730a2594086a33 (diff) | |
download | vericert-6c9cc975a5715f186c00e487c4ed38a221711651.tar.gz vericert-6c9cc975a5715f186c00e487c4ed38a221711651.zip |
Add HTLBlockgen and more scheduling
Diffstat (limited to 'example/interesting.v')
-rw-r--r-- | example/interesting.v | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/example/interesting.v b/example/interesting.v new file mode 100644 index 0000000..c76f92a --- /dev/null +++ b/example/interesting.v @@ -0,0 +1,36 @@ +module top(a, x); + reg [3:0] tmp; + input [3:0] a; + output reg [3:0] x; + + always @* begin + x = tmp; + tmp = a; + end +endmodule // top + +`ifndef SYNTHESIS +/* Generated by Yosys 0.9+2406 (git sha1 000fd08198, clang++ 7.1.0 -fPIC -Os) */ +module top_synth(a, x); + input [3:0] a; + wire [3:0] tmp; + output [3:0] x; + assign tmp = a; + assign x = a; +endmodule + +module main; + reg [3:0] a; + wire [3:0] x, x_synth; + + top top(a, x); + top_synth top_synth(a, x_synth); + + initial begin + a = 0; + #10 a = 1; + #10 $display("x: %d\nx_synth: %d", x, x_synth); + $finish; + end +endmodule +`endif |