QuadSPI Flash
by dgisselq on Jun 26, 2016 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
||
Greetings!
I am currently working on updating the wishbone accessed Quad SPI flash core, to make an interface appropriate for this chip: Micron's N25Q128A. Currently, my goals are:
Since I've noticed the last core I wrote and posted here was well loved, I thought I'd offer the opportunity for anyone who has worked with it to comment on what they loved or didn't love about it. Such comments would help me improve the core. Thoughts? Dan |
RE: QuadSPI Flash
by dgisselq on Jun 28, 2016 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
||
Perhaps I should mention that this driver is only one of many that I'm in the process of writing for the Arty. This is a rather popular board--it's cheap and feature rich. When fully implemented, this Quad SPI flash driver should allow:
Other wishbone interfaces I intend to build for this board include an opensource DDR3 SDRAM controller, ethernet controller. Further, the wishbone ICAPE2 interface should already work for the board (with minor modifications to get to a 200MHz interface clock). Dan |
RE: QuadSPI Flash
by dgisselq on Jul 23, 2016 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
||
As with the first QSPI flash core, this core for the Arty will have two separate address spaces: one for the data and another for control. Reads from the data address space will be made as fast as possible--these will be the purpose of the core. Writes to the data address space, as before, will issue a program command to the device. The control address space will consist of the following set of registers:
This leaves me with three unused register locations. While it was never my purpose to use Dual I/O mode, I may need to do so for speed since the fast read instruction doesn't support Quad I/O at 100MHz with an integer number of 8-bit delay cycles ... I'd love to hear anyone's comments that is interested in this core. Dan |
RE: QuadSPI Flash
by cva1977 on Aug 4, 2016 |
cva1977
Posts: 1 Joined: Aug 19, 2013 Last seen: Apr 25, 2017 |
||
Dan,
Your QuadSPI flash development sounds very interesting and I would be interested in taking a closer loop at it. Is there a first version of the module already available? Thanks, Chris |
RE: QuadSPI Flash
by dgisselq on Aug 4, 2016 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
|||||||||||||||||||||||||||||||||||||
Chris,
Yes, the controller is available to try. Both the original, and the newer/updated module are available in the Wishbone Quad SPI Flash controller project directory. The older controller is named wbqspiflash.v, and depends upon llqspi.v. The newer controller is named eqspiflash.v and depends upon lleqspi.v (a very similar file to llqspi.v). The old controller, though, has the specification written for it, and the documentation is a touch lacking on the newer controller. The big thing that's missing is the control register map (below):
So far, I've only tested this on an Arty, and therefore can only vouch for its performance on the Arty. Indeed, I can only vouch for it's read performance--I haven't yet tried writing with it outside of the simulator. In a similar fashion, I have not fully tested it on the hardware--so your mileage might vary. In general, to program any register, you will want to set the Write Enable. To do this, write a 32'h4000_0000 to register 0, then write to the register of interest. For example, you'll want to set the volatile configuration register to 8'h85, or all your data reads will be off. (Okay, I'm testing it now, and every value I read has an extra clock delay in it--so I thought it worked. Hence, I wrote a 8'h85 to the volatile configuration register, only to read a 8'hc5 in return. In a like fashion, the ID register which should read 32'h20ba1810 is instread reading 32'h905d0c08. I swear, though, it _was_ working ;) Please feel free to experiment with it. In the meantime, I'll take a pause from working on the DDR3 SDRAM controller and see if I can find where that extra bit delay is coming from. Dan |
RE: QuadSPI Flash
by dgisselq on Aug 11, 2016 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
||
Chris,
I chased down the delay mentioned above, and have the core working again. You'll find the eqspiflash.v and lleqspi.v modules in the wishbone controlled Quad SPI flash controller project. You can also find an example of how the controller gets hooked up in the OpenArty project which is using it. In particular, you may find yourself interested in the fasttop.v file within the OpenArty project, showing how the controller can be connected, and the flashdrvr.cpp and wbprogram.cpp files in the same showing the steps to programming a flash device. Furthermore, after typing "make" in the rtl directory, you can then do a "make test" in the bench/cpp directory of the QuadSPI Flash controller and get some test-bench assurance that the entire core works as advertised. Please feel free to let me know if you have any comments or suggesstions, Dan |