A Quad SPI Flash Writer used to program flash. It can be used along with flash controller to program the flash then read from it.
The IP comes with an AHBL Wrapper
EF_QSPI_FLASH_WRITER_APB INST (
.HCLK(CLK),
.HRESETn(RESETn),
.HADDR(HADDR),
.HWRITE(HWRITE),
.HSEL(HSEL),
.HTRANS(HTRANS),
.HWDATA(HWDATA),
.HRDATA(HRDATA),
.HREADY(HREADY),
.HREADYOUT(HREADYOUT),
.fr_sck(fr_sck)
.fr_ce_n(fr_ce_n)
.fr_din(fr_din)
.fr_dout(fr_dout)
.fr_douten(fr_douten)
.fm_sck(fm_sck)
.fm_ce_n(fm_ce_n)
.fm_din(fm_din)
.fm_dout(fm_dout)
.fm_douten(fm_douten)
);
IO name | Direction | Width | Description |
---|---|---|---|
fr_sck | input | 1 | spi clock coming from flash reader |
fr_ce_n | input | 1 | spi slave select coming from flash reader |
fr_din | output | 4 | spi master data in going to the flash reader |
fr_dout | input | 4 | spi master data out coming from flash reader |
fr_douten | input | 4 | spi master data out enable coming from flash reader |
fm_sck | output | 1 | spi clock going to flash (slave) |
fm_ce_n | output | 1 | spi slave select going to flash (slave) |
fm_din | input | 4 | spi master data in coming from flash (slave) |
fm_dout | output | 4 | spi master data out going to flash (slave) |
fm_douten | output | 4 | spi master data out enable going to flash (slave) |
The following table is the result for implementing the EF_QSPI_FLASH_WRITER IP with different wrappers using Sky130 HD library and OpenLane2 flow.
Module | Number of cells | Max. freq |
---|---|---|
EF_QSPI_FLASH_WRITER | N/A | N/A |
EF_QSPI_FLASH_WRITER_AHBL | TBD | TBD |
Name | Offset | Reset Value | Access Mode | Description |
---|---|---|---|---|
WE | 0000 | 0x00000000 | w | Write Enable; enables flash writer to write to flash |
SS | 0004 | 0x00000000 | w | Slave Select; flash SS signal value |
SCK | 0008 | 0x00000000 | w | Slave Clock; flash SCK signal value |
OE | 000c | 0x00000000 | w | Output enable for the four flash IOs |
DATAO | 0010 | 0x00000000 | w | Output Data from the flash writer or controller going to flash |
DATAI | 0014 | 0x00000000 | r | Input Data coming from flash flash |
Write Enable; enables flash writer to write to flash
Slave Select; flash SS signal value
Slave Clock; flash SCK signal value
Output enable for the four flash IOs
Output Data from the flash writer or controller going to flash
Input Data coming from flash flash
Firmware drivers for EF_QSPI_FLASH_WRITER can be found in the Drivers directory in the EFIS (Efabless Firmware Interface Standard) repo. EF_QSPI_FLASH_WRITER driver documentation is available here. You can also find an example C application using the EF_QSPI_FLASH_WRITER drivers here.
You can install the IP either by cloning this repository or by using IPM.
1. Using IPM:
- [Optional] If you do not have IPM installed, follow the installation guide here
- After installing IPM, execute the following command
ipm install EF_QSPI_FLASH_WRITER
.
Note: This method is recommended as it automatically installs EF_IP_UTIL as a dependency.
- Clone EF_IP_UTIL repository, which includes the required modules from the common modules library, ef_util_lib.v.
git clone https://github.com/efabless/EF_IP_UTIL.git
- Clone the IP repository
git clone github.com/efabless/EF_QSPI_FLASH_WRITER
NOTE: This section is intended for advanced users who wish to gain more information about the interface of the wrapped IP, in case they want to create their own wrappers.
Port | Direction | Width | Description |
---|---|---|---|
fr_sck | input | 1 | spi clock coming from flash reader |
fr_ce_n | input | 1 | spi slave select coming from flash reader |
fr_din | output | 4 | spi master data in going to the flash reader |
fr_dout | input | 4 | spi master data out coming from flash reader |
fr_douten | input | 4 | spi master data out enable coming from flash reader |
fm_sck | output | 1 | spi clock going to flash (slave) |
fm_ce_n | output | 1 | spi slave select going to flash (slave) |
fm_din | input | 4 | spi master data in coming from flash (slave) |
fm_dout | output | 4 | spi master data out going to flash (slave) |
fm_douten | output | 4 | spi master data out enable going to flash (slave) |