2 Setup
x44203 edited this page 5 months ago


The setup consists of one ECP5 Versa evaluation board plugged into the PCIe slot of a ROCKPro64.

A second computer to program on and conduct the tests is required.

Versa configuration

  1. Set SW4 to 1: Down, 2: Up, 3: Down, 4: Down
  2. Connect pins 2-4 and 5-6 on J50
  3. Run openocd -f ispCLOCK/ispCLOCK-200MHz.cfg
  4. Connect pins 1-2 and 3-5 on J50
  5. Connect 2-4 and 3-5 on J4 (Connects the PRSNT signals on the PCIe connector and sets the ispCLOCK to PCIe clock input)

ROCKPro64 configuration

  1. Get an SD card and connect it to your computer
  2. Download this and this
  3. Execute dd if=mmc_idbloader.img of=/dev/your_sd_card seek=64 status=progress
  4. Execute dd if=mmc_u-boot.itb of=/dev/your_sd_card seek=16384 status=progress
  5. Execute sync
  6. Remove the SD card and plug it into the ROCKPro64
  7. Plug the Versa into the ROCKPro64, connect a 12 V adapter to the ROCKPro64 but not to the Versa and do not power it yet, connect a USB cable from the Versa to your computer
  8. Connect a UART configured to 3.3 V (for example a CH340) to the ROCKPro64, GND to pin 6 on the PI-2-bus, RX to pin 8, an unconnected cable to pin 10
  9. Open a serial terminal
  10. Power the 12 V adapter and watch the terminal
  11. As soon as you can see it booting on the terminal, connect the unconnected cable from pin 10 to TX on the UART
  12. As soon as it says that it is going to start the OS, press some key on the terminal to abort it, such that it goes to u-boot
  13. Now there should be a prompt showing =>
  14. Execute python test_pcie_phy.py run or python test_pcie_ltssm.py run from the Tests folder and wait until it is uploaded (sometimes the timing doesn't pass and you need to repeat it)
  15. Execute pci enum on the ROCKPro64. Sometimes it says Link down, then you need to repeat and it should say PCIE-0: Link up (Bus0) and immediately crash / reboot
  16. Press some key again to abort booting and you can try again

You can re-upload the last compiled gateware by executing

For more information read Physical Tests

Frequency measurements

On X3:4 is a clock output of the RX clock and on X4:28 for TX.