Altera_Forum
Honored Contributor
12 years agoSRAM IP that work on some builds, and some it doesn't!
Hello All!
I'm having an issue implementing some VERY simple IP for an asynchronous SRAM chip (on digikey: http://www.digikey.com/product-detail/en/is61wv25616bll-10bli/706-1104-nd/1831380). It's really making me doubt myself. It's just a dumb bit of code, that's I've used years ago on an old project (Quartus II 9.1 I think) module sram( // global clk/reset clk, reset_n, // avalon slave s_chipselect_n, s_byteenable_n, s_write_n, s_read_n, s_address, s_writedata, s_readdata, // SRAM interface SRAM_DQ, SRAM_ADDR, SRAM_UB_n, SRAM_LB_n, SRAM_WE_n, SRAM_CE_n, SRAM_OE_n ); parameter DATA_BITS = 16; parameter ADDR_BITS = 18; input clk; input reset_n; input s_chipselect_n; input [(DATA_BITS/8-1):0] s_byteenable_n; input s_write_n; input s_read_n; input [(ADDR_BITS-1):0] s_address; input [(DATA_BITS-1):0] s_writedata; output [(DATA_BITS-1):0] s_readdata; output SRAM_CE_n; output SRAM_OE_n; output SRAM_LB_n; output SRAM_UB_n; output SRAM_WE_n; output [(ADDR_BITS-1):0] SRAM_ADDR; inout [(DATA_BITS-1):0] SRAM_DQ; assign SRAM_DQ = SRAM_WE_n ? 'hz : s_writedata; assign s_readdata = SRAM_DQ; assign SRAM_ADDR = s_address; assign SRAM_WE_n = s_write_n; assign SRAM_OE_n = s_read_n; assign SRAM_CE_n = s_chipselect_n; assign {SRAM_UB_n,SRAM_LB_n} = s_byteenable_n; endmodule [/INDENT] That's it, just 54 lines with white space. The issue I'm having is that:- Using Quartus II 12.1 Build 177, I will build the project, and it works 100%.
- Then, I'll change something very very simple in the Verilog, recompile and find that my Nios2 will not run - and gives me a verify failed error:
- https://mail.google.com/mail/u/1/?ui=2&ik=13b831dd1d&view=att&th=13e8b81cdbc4b34e&attid=0.0.1&disp=emb&realattid=ii_13e8b7772d7b4a5d&zw&atsh=1
- The change can be as simple as moving a single output to a different pin on the device, and then nios2 just won't execute for SRAM verify failure. I'm losing my cool by this point.
- Now, if I go back to Quartus and just hit *compile* again, without making any changes at all, the new SOF works fine, Nios2 verifies and runs from SRAM... really lost my cool now.