mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Added examples/anlogic/
This commit is contained in:
parent
107d884804
commit
32a901ddf2
7 changed files with 55 additions and 0 deletions
18
examples/anlogic/demo.v
Normal file
18
examples/anlogic/demo.v
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue