URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Show entire file |
Details |
Blame |
View Log
Rev 70 |
Rev 72 |
Line 35... |
Line 35... |
configuration registers.
|
configuration registers.
|
|
|
[TIP]
|
[TIP]
|
An example program for the XIP module is available in `sw/example/demo_xip`.
|
An example program for the XIP module is available in `sw/example/demo_xip`.
|
|
|
[WARNING]
|
|
Debugging XIP code execution using the on-chip debugger is constrained. The debugger cannot insert breakpoints
|
|
(`ebreak` instructions) into XIP code as the XIP access is read-only.
|
|
|
|
[NOTE]
|
[NOTE]
|
Quad-SPI (QSPI) support, which is about 4x times faster, is planned for the future. 😉
|
Quad-SPI (QSPI) support, which is about 4x times faster, is planned for the future. 😉
|
|
|
|
|
**SPI Protocol**
|
**SPI Protocol**
|
Line 118... |
Line 114... |
|
|
Example: to map the XIP flash to the address space starting at `0x20000000` write a "2" (`0b0010`) to the _XIP_CTRL_XIP_PAGE_
|
Example: to map the XIP flash to the address space starting at `0x20000000` write a "2" (`0b0010`) to the _XIP_CTRL_XIP_PAGE_
|
control register bits. Any access within `0x20000000 .. 0x2fffffff` will be forwarded to the XIP flash.
|
control register bits. Any access within `0x20000000 .. 0x2fffffff` will be forwarded to the XIP flash.
|
Note that the SPI access address might wrap around.
|
Note that the SPI access address might wrap around.
|
|
|
|
.Using the FPGA Bitstream Flash also for XIP
|
|
[TIP]
|
|
You can also use the FPGA's bitstream SPI flash for storing XIP programs. To prevent overriding the bitstream,
|
|
a certain offset needs to be added to the executable (which might require linker script modifications).
|
|
To execute the program stored in the SPI flash simply jump to the according base address. For example
|
|
if the executable starts at flash offset `0x8000` and the XIP flash is mapped to the base address `0x20000000`
|
|
then add the offset to the base address and use that as jump/call destination (=`0x20008000`).
|
|
|
|
|
**Using the XIP Mode**
|
**Using the XIP Mode**
|
|
|
The XIP module is globally enabled by setting the _XIP_CTRL_EN_ bit in the device's `CTRL` control register.
|
The XIP module is globally enabled by setting the _XIP_CTRL_EN_ bit in the device's `CTRL` control register.
|
Clearing this bit will reset the whole module and will also terminate any pending SPI transfer.
|
Clearing this bit will reset the whole module and will also terminate any pending SPI transfer.
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.