Forum Discussion
intel_onchip_Memory II RAM: r/w doesn t work from FPGA but from HPS
- 8 months ago
Hi Guys,
please excuse me, I made such a bad mistake.
I forgot to implement the interface Signal Names to the Soc Implementation.
Now I can read and write to and from the RAM.
// Interne Signale für RAM-Schreiblogik
reg [7:0] ram_addr_reg; // Adresse für On-Chip-RAM (128-Bit Wortadressierung)
reg [127:0] ram_writedata_reg; // Daten für RAM
reg ram_write_reg; // Write Enable für RAM
reg [15:0] ram_byteenable_reg;// Welche Bytes im Wort geschrieben werden
reg ram_writing; // FSM: RAM wird beschrieben
reg [127:0] ram_readdata;
reg ram_read;
wire [7:0] ram_1_s1_address;
wire [127:0] ram_1_s1_writedata;
wire ram_1_s1_write;
wire [15:0] ram_1_s1_byteenable;
wire ram_1_s1_read;
wire [127:0] ram_1_s1_readdata;
// Verbindungen zu Qsys-RAM-Ports
assign ram_1_s1_address = ram_addr_reg;
assign ram_1_s1_writedata = ram_writedata_reg;
assign ram_1_s1_write = ram_write_reg;
assign ram_1_s1_byteenable = ram_byteenable_reg;
assign ram_1_s1_read = ram_read;//1'b0; // nur schreiben
assign ram_1_s1_readdata = ram_readdata;
assign ram_1_s1_clk = fpga_clk_100;
assign ram_1_s1_reset = fpga_reset_n;
assign ram_1_s1_reset_req = 1'b0;Greez, idiot
Hi Linus,
reported results suggest that RAM control signals don't implement required write sequence. Unfortunately relevant details are hidden in posted Verilog code. E.g. no clock sensitive always statement is shown. It's also not clear how xxx_reg output connects to RAM interface. Seeing complete code would allow to understand the problem.
Regard Frank
- LinusGrun9 months ago
New Contributor
Hi Frank and all,
Thank you for your reply. And sorry I didn't show all the code.Because of your message, I have tried exporting CLK and reset and connecting them in the top.v.
But nothing changed. Still the same behavior. I got all my code and the new Platform Designer view attached.
I would also like to mention that the AXI 4 Lite interfaces work really well. I hope you see my mistake.
Otherwise, I would be happy about a code example to read and write the RAM of the FPGA with the Avalon MM.Thanx :-) Linus