zf3/psram-tang-nano-9k

Any way to get this to use both psram dies?

edanuff opened this issue · 2 comments

I've tried to modify it to use O_psram_ck[1], IO_psram_rwds[1], O_psram_cs_n[1] and IO_psram_dq[15:8] to use the second W955D8MBYA psram die but I have not been able to get it to work.

zf3 commented

Try modifying the controller interface to talk to just one die:

module PsramController (
   ...
    output O_psram_ck,
    inout IO_psram_rwds,
    inout [7:0] IO_psram_dq,
    output  O_psram_cs_n
);

Then change O_psram_ck[0] below to O_psram_ck, and etc.

Then create two controllers in the top level. Do something like,

PsramController #(
    .LATENCY(LATENCY)
) mem_ctrl0 (
    .clk(clk), .clk_p(clk_p), .resetn(sys_resetn), .read(read), .write(write), .byte_write(byte_write),
    .addr(address), .din(din), .dout(dout), .busy(busy),
    .O_psram_ck(O_psram_ck[0]), .IO_psram_rwds(IO_psram_rwds[0]), .IO_psram_dq(IO_psram_dq[7:0]),
    .O_psram_cs_n(O_psram_cs_n[0])
);

PsramController #(
    .LATENCY(LATENCY)
) mem_ctrl1 (
    .clk(clk), .clk_p(clk_p), .resetn(sys_resetn), .read(read), .write(write), .byte_write(byte_write),
    .addr(address), .din(din), .dout(dout), .busy(busy),
    .O_psram_ck(O_psram_ck[1]), .IO_psram_rwds(IO_psram_rwds[1]), .IO_psram_dq(IO_psram_dq[15:8]),
    .O_psram_cs_n(O_psram_cs_n[1])
);

Let me know if this works.

It works once psram_test_top.v is modified to reset both dies, i.e.:

assign O_psram_reset_n = {sys_resetn,sys_resetn};

Thanks for the help!