mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-22 02:57:51 +00:00
Added examples/ top-level directory
This commit is contained in:
parent
f13e387321
commit
f42218682d
17 changed files with 7 additions and 4 deletions
12
examples/cmos/counter.v
Normal file
12
examples/cmos/counter.v
Normal file
|
@ -0,0 +1,12 @@
|
|||
module counter (clk, rst, en, count);
|
||||
|
||||
input clk, rst, en;
|
||||
output reg [2:0] count;
|
||||
|
||||
always @(posedge clk)
|
||||
if (rst)
|
||||
count <= 3'd0;
|
||||
else if (en)
|
||||
count <= count + 3'd1;
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue