Download Miscellaneous/RISC-V/ROM/verified_ROM.v from chipagents/RTLLM-verified: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/datasets/chipagents/RTLLM-verified/resolve/main/Miscellaneous/RISC-V/ROM/verified_ROM.v
- Command line
-
hf download hf://datasets/chipagents/RTLLM-verified/Miscellaneous/RISC-V/ROM/verified_ROM.v
-
curl -L -o verified_ROM.v https://huggingface.co/datasets/chipagents/RTLLM-verified/resolve/main/Miscellaneous/RISC-V/ROM/verified_ROM.v
638 Bytes
| module ROM ( | |
| input wire [7:0] addr, // 8-bit Address input | |
| output reg [15:0] dout // 16-bit Data output | |
| ); | |
| // Declare a memory array of 256 locations, each 16 bits wide, initialized with fixed data | |
| reg [15:0] mem [0:255]; | |
| // Initial block to initialize the ROM with data | |
| initial begin | |
| mem[0] = 16'hA0A0; | |
| mem[1] = 16'hB1B1; | |
| mem[2] = 16'hC2C2; | |
| mem[3] = 16'hD3D3; | |
| // Initialize other memory locations as needed | |
| end | |
| // Combinational logic: Read data from the ROM at the specified address | |
| always @(*) begin | |
| dout = mem[addr]; | |
| end | |
| endmodule |