A PCIe interface for the ECP5 FPGA written in nMigen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ECP5-PCIe 44ba54d3cd Compile flowchart as SVG and link new Wiki 4 weeks ago
.vscode actually added SCI 10 months ago
Datasheets remove lockfile 1 month ago
Documentation Compile flowchart as SVG and link new Wiki 4 weeks ago
Firmware PLL testing 2 years ago
Gateware Fix 5 GT/s speed and fix SKP TX time 4 weeks ago
Images PHY mostly done 1 year ago
PCIe-Adapter virtual simulations, SERDES improvements 6 months ago
Tests Fix 5 GT/s speed and fix SKP TX time 4 weeks ago
ispCLOCK Added speed switching support for relevant classes (not in LTSSM yet) and fixed ispCLOCK configs 1 year ago
.gitignore Moved TLP transmitter into a FSM 1 month ago
.gitmodules ATMega programmer and basic code for it, 16 MHz clock generator and UART passthrough, PLL diff pairs added 2 years ago
Block Diagram.svg x4 SERDES 1 year ago
README.md Compile flowchart as SVG and link new Wiki 4 weeks ago
TODO actually added SCI 10 months ago



ECP5 to PCIe interface development

The goal of this project is to provide a PCIe interface in Amaranth HDL.

Previous work

There already exists a PCIe physical layer by whitequark called Yumewatari and a TLP and DMA layer by enjoy-digital called litepcie written in omigen.


  • Read through Yumewatari and litepcie code
  • Read more of the PCIe spec and summarize relevant parts
  • Get an ECP5 device capable of PCIe
    • Currently an adapter for the ECP5 EVN to PCIe is being built


Execute python setup.py develop in the Gateware folder


  • Execute python test_pcie_virtual.py in the Tests folder to run the simulation
  • Execute gtkwave test.gtkw to view the results


See the Setup page in the Wiki


  • Enable PCIe on the connected device (for example on the ROCKPro64 execute pci init in u-boot)
  • Execute python test_pcie_phy.py run in the Tests folder to upload the gateware to the ECP5
  • Execute python test_pcie_phy.py grab to get DLLPs received in the L0 state (and the time since it has been in the L0 state). Sometimes the last few results are invalid and the program doesn't halt, end it by pressing Ctrl + C. It should show something like this:

Data is composed of the first symbol received in one clock cycle, its representation in hexadecimal, the same for the second symbol. The time is in clock cycles since entering L0, which are 8 ns each.

Time since L0 | RX data | TX data | Temperature

A list of rows showing DLLPs and the temperature of the FPGA and the time it has been in L0