The fpgas.online Acorn design¶
This page says what the fpgas.online Acorn design is, its two images and how they sit in the card’s flash. It does not say how to load or write it. Loading into SRAM is on How to check an Acorn’s PCIe link by hand on a Raspberry Pi 5. Writing the flash is on How to install the fpgas.online images on an Acorn. What the boot check tests of it is under Acorn tests and their wires on a Raspberry Pi 5.
Images¶
The fpgas.online Acorn design is
designs/acorn-pcie
in fpgas.online-test-designs. It has PCIe Gen2 x1 (10ee:7021), a UART bridge on P2, device DNA, XADC, the SPI flash
core and ICAP. The board is named in the PCI subsystem ID: 1e24:021f for a CLE-215+ and 1e24:0101 for a CLE-101.
It builds with Vivado, because the XC7A200T is too large for openXC7, in two images.
Image names the image and Build is the command that makes it. File is the file that goes into the flash, and Flash slot is where it sits.
Image |
Build |
File |
Flash slot |
|---|---|---|---|
Golden |
|
|
0x0 |
Operational |
|
|
0x400000 |
The golden image has no DDR3 and no P2 GPIO, so nothing in it can fail calibration. The .bit of each build is for a
JTAG SRAM load.
Warning
Do not use the pcie-enumeration_acorn-* assets as a golden or recovery image. They are in the prebuilt release
vivado-bitstreams-v0.0-496-gf162f60.
On a x1 host the PCIe core in them never leaves Detect.
Their I/O reports put the PCIe lane on package pins D9/D7 (GTP channel X0Y7, M.2 lane 3). It should be on B10/B6 (X0Y6, lane 0). The Xilinx PCIe IP’s own XDC pins a x1 core’s transceiver and overrides the port constraints. The fpgas.online Acorn design’s build fails if any port is not on the pin it was constrained to.
The release’s pmod-pin-id Acorn build configures but never toggles a pin; build that design from main instead.
The release’s other designs are unaffected. For a CLE-215+ use the *_acorn-cle-215p_* files, whose .bit header
reads 7a200tfbg484 (IDCODE 0x3636093).
What the flash holds¶
Which image a card boots shows in its PCI ID. Reading it is on How to check an Acorn’s PCIe link by hand on a Raspberry Pi 5. Two images other than the fpgas.online one are in service:
SQRL factory firmware (
1e24:021f): a cryptocurrency mining design, not LiteX, so neitherspi_flash.pynorlitepcie_utilcan talk to it. Its BAR0 (128 KB) is a repeating mining parameter pattern. It is itself a multiboot pair. Its header at0x0setsWBSTAR = 0x680000and issuesIPROG, so the mining design lives at0x680000, clear of the fpgas.online operational slot.The vendor (RHS Research) XDMA sample image (
10ee:7011): x4-capable, two BARs, also not LiteX.
A board on either needs the fpgas.online Acorn design loaded into SRAM over JTAG before its flash can be written. A board whose JTAG does not answer cannot be moved off it.
SPI flash layout¶
The Acorn has a Spansion S25FL256S (256 Mbit = 32 MB) quad-SPI NOR flash.
┌──────────────────────────────────────────────────┐
│ 0x00000000 Golden image (fallback) │ 4 MB
│ - Always boots first │
│ - Sets NEXT_CONFIG_ADDR = 0x400000 │
│ - PCIe, UART, flash, ICAP │
│ - PROTECTED: see the safety rules │
├──────────────────────────────────────────────────┤
│ 0x00400000 Operational image (updatable) │ 4 MB
│ - Chain-loaded by the golden image │
│ - Has the TIMER_CFG watchdog │
│ - If broken, watchdog → golden │
├──────────────────────────────────────────────────┤
│ 0x00800000 Free │ 24 MB
└──────────────────────────────────────────────────┘
The safety rules are on How to recover an Acorn with a bad image.
Multiboot¶
At power-on the FPGA loads the golden image from flash address 0x0. The golden image’s NEXT_CONFIG_ADDR (0x400000)
makes the FPGA load the operational image straight away, and the operational image runs with PCIe, UART and the rest.
If the operational image fails, the TIMER_CFG watchdog detects the configuration failure and falls back to address
0x0. The golden image then boots, PCIe comes up, and the host can rewrite the operational slot.
The operational image carries CONFIGFALLBACK Enable and TIMER_CFG 0x0001fbd0. If it hangs during configuration, the
watchdog fires and the FPGA ignores WBSTAR, rebooting from 0x0.
ICAPE2 warm boot reconfigures without a power cycle. The target flash address goes to WBSTAR, then IPROG goes to
the ICAPE2 command register. The PCIe link drops and retrains once the loaded image is running. LiteX’s ICAP core
(self.icap = ICAP(); self.icap.add_reload()) exposes it.
The two flavours of another design are built by hand as on How to generate multiboot bitstreams by hand.