Altera_Forum
Honored Contributor
11 years agoSRAM Difficulties Solved on DE1 Cyclone II
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 !