Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing to load initial values into SM_RAM_4k on ice40 #372

Open
pm100 opened this issue Apr 9, 2024 · 0 comments
Open

failing to load initial values into SM_RAM_4k on ice40 #372

pm100 opened this issue Apr 9, 2024 · 0 comments

Comments

@pm100
Copy link

pm100 commented Apr 9, 2024

Trying to preload ROM into a design. SO I tried this

SB_RAM40_4K ram40_4kinst_physical (
 .RDATA(i_instruction),
 .RADDR(o_pc),
 .WADDR(),
 .MASK(), 
 .WDATA(),
 .RCLKE(1'b1),
 .RCLK(CLK),
 .RE(1'b1),
 .WCLKE(1'b0),
 .WCLK(CLK),
 .WE(1'b0)
);
defparam ram40_4kinst_physical.READ_MODE=0;
defparam ram40_4kinst_physical.WRITE_MODE=0;
defparam ram40_4kinst_physical.INIT_0 = 
256'hDEAD00000000000000000000000000000000000000000000000000000000DEAD;
defparam ram40_4kinst_physical.INIT_1 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_2 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_3 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_4 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_5 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_6 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_7 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_8 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_9 = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_A = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_B = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_C = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_D = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_E = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;
defparam ram40_4kinst_physical.INIT_F = 
256'hDEAD000000000000000000000000000000000000000000000000000000000000;

basically copied from lattice docs. I get the RAM block (to be used as ROM) but the initial values dont seem to be loaded. Same for the READ_MODE.

I can find the block on the hardware.json file, but its all set to 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant