Download chips/yosys/tests/simple/defvalue.sv from STAR-future/Trinity-SciData: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/tests/simple/defvalue.sv
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SciData/chips/yosys/tests/simple/defvalue.sv
-
curl -L -o defvalue.sv https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/tests/simple/defvalue.sv
461 Bytes
| module defvalue_top(input clock, input [3:0] delta, output [3:0] cnt1, cnt2); | |
| cnt #(1) foo (.clock, .cnt(cnt1), .delta); | |
| cnt #(2) bar (.clock, .cnt(cnt2)); | |
| endmodule | |
| module cnt #( | |
| parameter integer initval = 0 | |
| ) ( | |
| input clock, | |
| output logic [3:0] cnt = initval, | |
| input [3:0] delta | |
| input [3:0] delta = 10 | |
| ); | |
| assign (weak0, weak1) delta = 10; | |
| always @(posedge clock) | |
| cnt <= cnt + delta; | |
| endmodule | |