Leep
Junior Member level 3
I've been reading the Micron **broken link removed** on their MT45W8MW16 70ns PSRAM over and over and over, searching Google for any type of examples, making TONS of notes, and I'm going cross-eyed trying to understand it fully. It should be fairly simple to do synchronous read/write from/to the PSRam, right? Normally I'm pretty quick at picking up on how to do things from manuals and Google searching, but this is just evading my comprehension. I feel I understand it MUCH MUCH better now than, say, 2 or 3 days ago, but I'm still not grasping it deeply enough to be able to make a simple Verilog test that simply writes some values out to RAM (addresses 0 - 256) and lets you retrieve them by setting the address (0-256) on the 8 switches and hitting a button to show the lower 8 bits of the value at that address on the LEDs.
I'm very confused on the difference between synchronous and asynchronous access. From what I understand, in asynchronous mode access is 70 ns which is ~14MHz, and in synchronous mode access can be up to 80MHz (according to the Nexys 3 ref manual). Since my primary interest at the moment is for video ram, I need to access it at 25+MHz, so I'm guessing I need to use synchronous mode.
I understand the contents of the RCR and BCR registers fairly well now, but I'm not clear on how to actually read/write them. There's a Latency (Initial & Counter) in the BCR that seems to control how many clock cycles after you initiate the Read/Write operation (when ADV/WE activates?) the data will be available on DQ. Since this deals with clock cycles, I assume it's for synchronous access.
By default though, the PSRam is in asynchronous mode, so the first thing I need to do is put it in synchronous mode right? Which involves setting BCR[15] to 0 (Synchronous), and BCR[2:0] to the Burst Length... Do I read BCR first, set the bits, then write BCR so I'm only changing those bits? And I have to do this write asynchronously, but as soon as I do then I have to use synchronous means to do any further reads/writes?
Any pointers/tips would be greatly appreciated. I feel like I'm right on the verge of all of this making sense (it doesn't help that I just started learning digital circuit design, FPGAs and Verilog about a month ago). If anyone has any example code (Verilog preferably, but I'll figure out VHDL if that's what it takes) for writing asynchronously to BCR and doing synchronous read/write bursts, that may help all this click into place.
P.S. I have checked out the opb_psram_controller from OpenCores, but that just confused me even more. It had ports (in and out) on it's top-level "module" named DQ_I, DQ_O, DQ_T, etc., each (15 downto 0), but two are out and one is in. There are only 15 DQ pins in the .UCF... I'm seriously missing something here. :|
-----
Lee
I'm very confused on the difference between synchronous and asynchronous access. From what I understand, in asynchronous mode access is 70 ns which is ~14MHz, and in synchronous mode access can be up to 80MHz (according to the Nexys 3 ref manual). Since my primary interest at the moment is for video ram, I need to access it at 25+MHz, so I'm guessing I need to use synchronous mode.
I understand the contents of the RCR and BCR registers fairly well now, but I'm not clear on how to actually read/write them. There's a Latency (Initial & Counter) in the BCR that seems to control how many clock cycles after you initiate the Read/Write operation (when ADV/WE activates?) the data will be available on DQ. Since this deals with clock cycles, I assume it's for synchronous access.
By default though, the PSRam is in asynchronous mode, so the first thing I need to do is put it in synchronous mode right? Which involves setting BCR[15] to 0 (Synchronous), and BCR[2:0] to the Burst Length... Do I read BCR first, set the bits, then write BCR so I'm only changing those bits? And I have to do this write asynchronously, but as soon as I do then I have to use synchronous means to do any further reads/writes?
Any pointers/tips would be greatly appreciated. I feel like I'm right on the verge of all of this making sense (it doesn't help that I just started learning digital circuit design, FPGAs and Verilog about a month ago). If anyone has any example code (Verilog preferably, but I'll figure out VHDL if that's what it takes) for writing asynchronously to BCR and doing synchronous read/write bursts, that may help all this click into place.
P.S. I have checked out the opb_psram_controller from OpenCores, but that just confused me even more. It had ports (in and out) on it's top-level "module" named DQ_I, DQ_O, DQ_T, etc., each (15 downto 0), but two are out and one is in. There are only 15 DQ pins in the .UCF... I'm seriously missing something here. :|
-----
Lee