Skip to content

Commit 16bc38f

Browse files
committed
Update README with new QPI and Overclock options
Signed-off-by: Sylvain Munaut <[email protected]>
1 parent 4af8014 commit 16bc38f

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Hardware
1010
--------
1111

1212
The target hardware platform is a Lattice UltraPlus 5k FPGA
13-
connected to 4 x 64 Mbits HyperRAM chips to provide it with
14-
32 Mbytes of RAM.
13+
with 32 Mbytes of RAM attached, either provided by 4 x 64 Mbits
14+
HyperRAM chips or 4 x 64 Mbits SPI PSRAM chips.
1515

1616
* [iCEBreaker](https://1bitsquared.com/products/icebreaker)
1717
* [Quad HyperRAM PMOD](https://1bitsquared.com/products/pmod-hyperram)
1818
(Make sure to select the "Quad" variant)
19+
* [Quad SPI PSRAM PMOD](https://machdyne.com/product/qqspi-psram32/)
1920

2021

2122
How it works
@@ -28,7 +29,7 @@ A quick rundown of the involved parts and what they do.
2829
This is the HDL logic that uses the FPGA fabric to implement a RISC-V
2930
CPU with enough peripherals to run a RV32I Linux kernel. It's mainly
3031
composed of a [VexRiscv](https://github.com/SpinalHDL/VexRiscv/) CPU
31-
connected to an HyperRAM memory controller and associated cache.
32+
connected to a memory controller and associated cache.
3233

3334
The set of peripheral is very minimal:
3435

@@ -46,7 +47,7 @@ reset. This program is hard coded directly in the FPGA bitstream.
4647
Its role are:
4748

4849
* Initialize UART for boot debug
49-
* Initialize the HyperRAM controller
50+
* Initialize the memory controller
5051
* Load the various pieces from flash into RAM
5152
* Jump to the BIOS
5253

@@ -110,6 +111,9 @@ or `BOARD=xxx` to specify another board.
110111

111112
The result file is in `build-tmp/riscv_linux_init.bin`
112113

114+
The default is to build for the HyperRAM option, but if you are
115+
using SPI PSRAM instead, add `MEM=qpi` on the `make` command line.
116+
113117

114118
### BIOS
115119

@@ -203,6 +207,29 @@ make sure to check the following places :
203207
partition layout)
204208

205209

210+
Overclocking
211+
------------
212+
213+
By default the core is run at 15 MHz which is about the fmax given
214+
by `nextpnr`. However there is some margin and I have added an option
215+
to instead run everything at 20 MHz.
216+
217+
To do so, build the gateware with:
218+
219+
```bash
220+
cd iCE40linux/gateware/riscv_linux
221+
make clean
222+
make clean-fw
223+
make OVERCLOCK=1 bin-init
224+
```
225+
226+
This will rebuild the gateware for 20 MHz.
227+
228+
You will also need to update the BIOS and add `UART_DIV=18` on the
229+
`make` command. And then edit the `ice40linux.dts` to change all
230+
references from `15000000` to `20000000`.
231+
232+
206233
License
207234
-------
208235

0 commit comments

Comments
 (0)