How to run the pin ID test on an Acorn on a Compute Blade¶
You have an Acorn wired to a Compute Blade and want the P2 balls to send their own names.
This page is for a blade the site operator has taken out of service for it; on a blade in the fleet the load is not run (test-designs #241, #237).
Only K2 and J2 answer on a blade, because J5 and H5 are not connected. On a Raspberry Pi 5 the load differs: How to run the pin ID test on an Acorn on a Raspberry Pi 5.
This procedure is waiting for its run: test-designs issue #237.
Warning
Never load pin ID on a blade whose J2 wire has no 470 Ω resistor.
When the load finishes, the design drives J2, which is on GPIO14. openFPGALoader has left GPIO14 an output. With the resistor that is about 7 mA for a moment. Without it, two outputs are shorted together, which costs JTAG until a power cycle (ask the site operator first) and can crash the host.
Warning
Never drive a Pi GPIO against an FPGA output. With the pin-ID design loaded, every P2 ball is an FPGA output, J2 included. Setting GPIO14 to a4 (TXD0) or op while pin-ID runs is then output against output on the J2 wire, and it crashes the Pi. Probe with pinctrl set 14 ip pn (input, no pull). Restore pinctrl set 14 a4 only once a design that treats J2 as an input is loaded.
What you need¶
An Acorn wired as on Acorn wiring on a Compute Blade, with the 470 Ω resistor in the J2 wire (the shared line).
openFPGALoaderwith thelibgpiodcable, the pin order2:3:4:14for--pins, and the header’s chip asgpiochip0.The header’s serial port off in this boot:
The header’s serial port off in this boot:
enable_uart=0, nodtoverlay=uart0…ordtparam=uart0line, and noconsole=serial0word on the kernel command line. Under kernel 6.18 JTAG cannot run otherwise (why); under kernel 6.12 it also answers with the serial port on. In the serial-off boot there is no serial pair to test. Setting it takes a boot of the blade: ask the site operator first, because a reboot ends a visitor’s session on the blade.The card’s PCI address in
BDF:The card’s PCI address in
BDF, set once per shell:0001:01:00.0on a CM5 blade,0000:01:00.0on a CM4 blade. Check it withlspci.$ BDF=0001:01:00.0 # a CM5 blade; 0000:01:00.0 on a CM4 blade
The pin-ID bitstream in
PINID:The loopback and pin-ID designs are in no package. CI builds them and attaches them to the releases of fpgas.online-test-designs as
pmod-loopback_acorn-<variant>_vivado-vivado_sqrl_acorn.bitandpmod-pin-id_acorn-<variant>_vivado-vivado_sqrl_acorn.bit, for example in the releasevivado-bitstreams-v0.0-496-gf162f60. Build the pin-ID design frommain, not from that release. Copy the file to the host and put its name inLOOPBACKorPINID.A card that runs the fpgas.online design needs none of these files for the wiring check: on a Compute Blade, on a Raspberry Pi 5.
A reader for the pins: the repository’s pin-ID host scanner, or
gpiomonedge timestamps decoded by hand.
Steps¶
On the blade, detach the card’s PCIe endpoint before the load (why); the card no longer shows in
lspci.$ echo 1 | sudo tee /sys/bus/pci/devices/$BDF/remove
On the blade, type the load and the restore as one command line, so that the pins are put back even if the load fails. GPIO14 is then an input with no pull.
$ openFPGALoader --cable libgpiod --pins 2:3:4:14 $PINID; pinctrl set 14 ip pn; pinctrl set 2,4 no pu
On the blade, run the host scanner with GPIO14 kept an input throughout, and read the name each pin sends. Do not set GPIO14 to
a0ora4while pin ID runs.The scanner requests both-edge events through gpiod (v1 or v2) and rebuilds the 1200-baud frames from the kernel timestamps. Do not poll the pins from Python: polling mis-frames the bytes even on a clean signal.
On the blade, check the method on a positive control before you trust a negative: drive a spare GPIO and confirm the monitor sees it.
Check¶
Only K2 and J2 answer.
GPIO15 -> "K2"
GPIO14 -> "J2"
If it fails¶
The blade crashes when a GPIO is set to output: pin ID drives all four P2 balls, so a blade output fights an FPGA output. Keep GPIO14 an input (
pinctrl set 14 ip pn) while pin ID runs.JTAG is lost after the load: the J2 wire has no 470 Ω resistor, and the design drives J2 against TMS on GPIO14. Ask the site operator, then power-cycle the blade, and fit the resistor.
gpiod_line_request_set_values_subset: Assertion 'request' failed: the serial driver holds GPIO14. Ask the site operator, then boot with the header’s serial port off.