Merge pull request #745 from Karl-Han/rom_wally_env

Add getenvval for rom. Related to issue #723.
This commit is contained in:
David Harris 2024-04-20 13:29:28 -07:00 committed by GitHub
commit f790d67aa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,11 @@ module rom1p1r #(parameter ADDR_WIDTH = 8, DATA_WIDTH = 32, PRELOAD_ENABLED = 0)
initial begin
if (PRELOAD_ENABLED) begin
`ifdef VERILATOR
$readmemh({getenvval("WALLY"), "/fpga/src/boot.mem"}, ROM, 0);
`else
$readmemh("$WALLY/fpga/src/boot.mem", ROM, 0);
`endif
end
end