Loading of .hex file in SB_RAM2048x2 ROM and loading of .hex file in BRAM memory

339 Views Asked by At

I have no idea about SB_RAM2048x2 memory Usage for iCE40 Devices. I find iceimage.hex mecrisp-ice 0.8 , a memory initialization file ,is being loaded into ram.v .and ram.v is being used in other verilog file. I want to use the bram instead of this ram.v so that i can use bram in zynq fpga(zybo board).I am little doubtful , is it possible to directly use SB_RAM2048x2 (mentioned in ram.v) in zynq fpga(zybo)? or is it only for iCE40 devices.

1

There are 1 best solutions below

4
gatecat On

SB_RAM2048x2 is an iCE40 specific primitive, it will not work on a Zynq.

You most likely want to infer memory using a Verilog array, for example

reg [1:0] mem[0:2047];
always @(posedge clk) begin
    if (wen) mem[waddr] <= wdata;
    rdata <= mem[raddr];
end

This will then work on any FPGA family.