Download chips/yosys/docs/source/code_examples/scrambler/scrambler.v from STAR-future/Trinity-SciData: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/docs/source/code_examples/scrambler/scrambler.v
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SciData/chips/yosys/docs/source/code_examples/scrambler/scrambler.v
-
curl -L -o scrambler.v https://huggingface.co/datasets/STAR-future/Trinity-SciData/resolve/main/chips/yosys/docs/source/code_examples/scrambler/scrambler.v
300 Bytes
| module scrambler( | |
| input clk, rst, in_bit, | |
| output reg out_bit | |
| ); | |
| reg [31:0] xs; | |
| always @(posedge clk) begin | |
| if (rst) | |
| xs = 1; | |
| xs = xs ^ (xs << 13); | |
| xs = xs ^ (xs >> 17); | |
| xs = xs ^ (xs << 5); | |
| out_bit <= in_bit ^ xs[0]; | |
| end | |
| endmodule | |