Download HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 874 Bytes
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv
-
curl -L -o edge_detect.sv https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv
874 Bytes
| ////////////////////////////////////////////////////////////////////////////////// | |
| // Company: | |
| // Engineer: | |
| // | |
| // Create Date: 13.11.2021 14:00:19 | |
| // Design Name: | |
| // Module Name: edge_detect | |
| // Project Name: | |
| // Target Devices: | |
| // Tool Versions: | |
| // Description: | |
| // | |
| // Dependencies: | |
| // | |
| // Revision: | |
| // Revision 0.01 - File Created | |
| // Additional Comments: | |
| // | |
| ////////////////////////////////////////////////////////////////////////////////// | |
| module edge_detect( | |
| input clk, | |
| input rst, | |
| input data_in, | |
| output data_out | |
| ); | |
| logic data_in_q; | |
| always_ff@(posedge clk) begin | |
| if (rst) begin | |
| data_in_q <= 0; | |
| end | |
| else begin | |
| data_in_q <= data_in; | |
| end | |
| end | |
| assign data_out = (data_in != data_in_q) ? data_in : 0; | |
| endmodule | |