After weeks of difficulty using SRAM, this is a note to explain what not to do, and how to get SRAM to work. I had written a UART reader / writer to load and retrieve data to SRAM memory. It sometimes had a few or a lot of errors. Out of frustration, I loaded the memory in a stable way, then changed the software to hardwire the the WE_not pin to 1 (only allowing reading), and each time I retrieved data, more errors would pop up!! So, I knew it was "crosstalk" between the write and the address pins which are right next to each other.The solution was to change the LVTTL drive current from max (24mA, which is the default) to the minimum of only 4 mA. After this, all my software worked like a champ. BTW, I used a state machine to register the signals (address, data ,r/w), but with this change, I never went back to check that this was really required. I know many people struggle with SRAM, and this is probably the number one cause (the cross-coupling of the signal paths on the DE1 kit) -- too much current drive. The errors I would get would be perfectly repeatable, and data dependent, to the extent that changing one word later in a stream would produce an error earlier in the stream of data!! Totally unexplainable until I hit upon this solution. So, good luck with this tip !
- Intel® Cyclone®
Hey, I had the same problem and the same solution: set the current drive strength to 4mA.Note that it seems that only the control lines (address, WE_N, OE_N, etc.) need the setting changed. The data lines don't seem to matter. Also, this is only a problem on newer DE2 boards with SRAM chips with built-in error detection (they have "ED" in their part number, e.g. IS[...]edBLL).
I believe with the high current drive strength, there are lot of reflections which will degrade the signal integrity of the link. Also, increase the coupling issue possibility. Lowering down the drive strength will have slower rise edge but relatively lesser reflection issue.
Cornell University has been using DE2/DE1 for 9 years in course teaching and collected all their students projects to share in their webpage:http://people.ece.cornell.edu/land/courses/ece5760/finalprojects/ More than hundreds of complex projects were implemented using SRAM on DE2/DE1 boards; all the source code with complete reports were also shared on the web. I learned a lot in SRAM/DRAM control from their website and even built our company products using the code/skills learned from the Cornell Website. Hope this can help! Ledo
Many thanks to all. Skyranger66, I visited the website you cited, and it is very overwhelming and excellent! KNfLrPn, I will take you word, although it must have been a trying experience to determine this. Thanks also, bfkstimchan!jamie_ct