Spaces:
Sleeping
Sleeping
Download tasks/task2/design_active.v from NeerjaK/RTL-Openenv: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/NeerjaK/RTL-Openenv/resolve/main/tasks/task2/design_active.v
- Command line
-
hf download hf://spaces/NeerjaK/RTL-Openenv/tasks/task2/design_active.v
-
curl -L -o design_active.v https://huggingface.co/spaces/NeerjaK/RTL-Openenv/resolve/main/tasks/task2/design_active.v
361 Bytes
| module bin_gry #(parameter N = 8) | |
| ( | |
| binary, | |
| gray | |
| ); | |
| input [N-1:0] binary; | |
| output reg [N-1:0] gray; | |
| always@(binary) | |
| begin | |
| gray[N-1] = binary[N-1]; | |
| gray[N-2:0] = binary[N-1:1] ^ binary[N-2:0]; | |
| end | |
| endmodule | |