Pseudostatic RAM (PSRAM) is DRAM combined with a self-refresh circuit. It appears externally as slower SRAM, albeit with a density/cost advantage over true SRAM, and without the access complexity of DRAM.
The controller was designed after:
- https://www.issi.com/WW/pdf/66-67WVS4M8ALL-BLL.pdf and
- https://www.microchip.com/en-us/parametric-search/514
utilizing SPI, QSPI and QPI modes.
The controller was verified against the Verilog model of Microchip M23LC1024 for SPI and QPI modes only.
- Small in size (800 cells)
- Supports PSRAM or serial SRAM memories up to 8MBytes.
- Programmable to configure: read/write commands, number of wait states, enter and exist quad i/o commands.
The IP comes with an AHBL Wrapper
EF_PSRAM_CTRL_V2_ahbl INST (
`TB_AHBL_SLAVE_CONN,
.sck(sck),
.ce_n(ce_n),
.din(din),
.dout(dout),
.douten(douten)
);
NOTE: `TB_AHBL_SLAVE_CONN is a convenient macro provided by BusWrap.
The following table is the result for implementing the EF_PSRAM_CTRL_V2 IP with different wrappers using Sky130 PDK and OpenLane2 flow.
Module | Number of cells | Max. freq |
---|---|---|
EF_PSRAM_CTRL_V2 | TBD | TBD |
EF_PSRAM_CTRL_V2_AHBL | TBD | TBD |
Region | Description |
---|---|
0x07FF_FFFF - 0x0000_0000 |
Data Access |
0x0FFF_FFFF - 0x0800_0000 |
Configuration Registers |
Name | Offset | Reset Value | Access Mode | Description |
---|---|---|---|---|
rd_cmd | 800100 | 0x00000003 | w | RD Command Register |
wr_cmd | 800200 | 0x00000002 | w | WR Command Register |
eqpi_cmd | 800400 | 0x00000035 | w | Enter QPI Command Register |
xqpi_cmd | 800800 | 0x000000FE | w | Exit QPI Command Register |
wait_states | 801000 | 0x00000000 | w | Wait States Register |
mode | 802000 | 0x00000000 | w | I/O Mode Register, {qpi, qspi} |
enter_qpi | 804000 | 0x00000000 | w | Initiate Enter QPI (EQPI) Mode process Register |
exit_qpi | 808000 | 0x00000000 | w | Initiate Exit QPI (XQPI) Mode process Register |
I/O Mode Register, {qpi, qspi}
Initiate Enter QPI (EQPI) Mode process Register
Initiate Exit QPI (XQPI) Mode process Register
Out of reset, the controller is in the standard SPI mode which is supported by all SPI memories.
Performing a memory read or a memory write from/to the data region will trigger the corresponding SPI command and is fully transparent to the CPU and it looks like a normal memory/read operation.
- Set RD/WR/Enter QPI/Exit QPI commands by writing to the corresponding configuration registers based on the memory datasheet.
- Set the number of wait states used by the read command by writing to the Wait States Register.
- Write "1" to the Initiate EQPI Mode process register.
- Perform a memory read/write to a data address
- Write "0" to the Initiate EQPI Mode process register.
- Wait for the memory to switch to quad i/o mode. Consult the datasheet to obtain the latency.
- Write "2" to the i/o mode register
You can either clone repo or use IPM which is an open-source IPs Package Manager
- To clone repo:
git clone https://github.com/efabless/EF_PSRAM_CTRL_V2
- To download via IPM , follow installation guides here then run
ipm install EF_PSRAM_CTRL
TBD