diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-04-08 16:31:59 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-04-08 16:31:59 -0700 |
commit | bca3cf684367ac5cf33ac05506d9e604a325bd3f (patch) | |
tree | b2b29b441c108984719d0b470ec34b779abec511 /examples/anlogic/demo.v | |
parent | f7c7003a193361285ba59d1315c1e7c26c4c52f1 (diff) | |
parent | e194e65358058f3a039636d2603cc093f7b75e50 (diff) | |
download | yosys-bca3cf684367ac5cf33ac05506d9e604a325bd3f.tar.gz yosys-bca3cf684367ac5cf33ac05506d9e604a325bd3f.tar.bz2 yosys-bca3cf684367ac5cf33ac05506d9e604a325bd3f.zip |
Merge branch 'master' into xaig
Diffstat (limited to 'examples/anlogic/demo.v')
-rw-r--r-- | examples/anlogic/demo.v | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/anlogic/demo.v b/examples/anlogic/demo.v new file mode 100644 index 000000000..e17db771e --- /dev/null +++ b/examples/anlogic/demo.v @@ -0,0 +1,18 @@ +module demo ( + input wire CLK_IN, + output wire R_LED +); + parameter time1 = 30'd12_000_000; + reg led_state; + reg [29:0] count; + + always @(posedge CLK_IN)begin + if(count == time1)begin + count<= 30'd0; + led_state <= ~led_state; + end + else + count <= count + 1'b1; + end + assign R_LED = led_state; +endmodule |