Download Lichee-Pi_Tang_FPGA_Examples/0.LED/src/led.v from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 709 Bytes
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/Lichee-Pi_Tang_FPGA_Examples/0.LED/src/led.v
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/Lichee-Pi_Tang_FPGA_Examples/0.LED/src/led.v
-
curl -L -o led.v https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/Lichee-Pi_Tang_FPGA_Examples/0.LED/src/led.v
709 Bytes
| module led | |
| ( | |
| input wire CLK_IN, | |
| input wire RST_N, | |
| output wire [2:0]RGB_LED | |
| ); | |
| parameter time1 = 25'd24_000_000;//¾§ÕñΪ24Mhz | |
| reg [2:0]rledout; | |
| reg [24:0] count; | |
| reg [1:0]shift_cnt; | |
| initial | |
| begin | |
| count=25'b0; | |
| rledout=3'b1; | |
| shift_cnt=2'b0; | |
| end | |
| always @(posedge CLK_IN)begin | |
| if(RST_N==0)begin | |
| count <= 25'b0; | |
| rledout <= 3'b1; | |
| shift_cnt <=2'b0; | |
| end | |
| if(count == time1) | |
| begin | |
| count<= 25'd0; | |
| if(shift_cnt==2'b10)begin | |
| rledout <= 3'b1; | |
| shift_cnt <=2'b0; | |
| end | |
| else begin | |
| rledout <= {rledout[1:0],1'b0}; | |
| shift_cnt <= shift_cnt + 1'b1; | |
| end | |
| end | |
| else | |
| count <= count + 1'b1; | |
| end | |
| assign RGB_LED = rledout; | |
| endmodule | |