A PCIe interface for the ECP5 FPGA written in nMigen
  • Python 99.5%
  • C++ 0.5%
Find a file
2023-05-16 23:48:44 +02:00
.vscode actually added SCI 2021-04-03 16:46:01 +02:00
Datasheets A lot of updates 2022-06-27 21:30:48 +02:00
Documentation More tests 2022-12-26 15:41:16 +01:00
Firmware PLL testing 2020-05-16 14:10:25 +02:00
Gateware Latest changes 2023-05-16 23:48:44 +02:00
Images PHY mostly done 2020-08-20 14:52:21 +02:00
ispCLOCK Added speed switching support for relevant classes (not in LTSSM yet) and fixed ispCLOCK configs 2020-11-03 01:00:04 +01:00
PCIe-Adapter virtual simulations, SERDES improvements 2021-08-05 15:23:36 +02:00
Tests Latest changes 2023-05-16 23:48:44 +02:00
.gitignore Latest changes 2023-05-16 23:48:44 +02:00
.gitmodules ATMega programmer and basic code for it, 16 MHz clock generator and UART passthrough, PLL diff pairs added 2020-05-15 15:19:51 +02:00
Block Diagram.svg x4 SERDES 2020-10-15 12:57:15 +02:00
README.md Compile flowchart as SVG and link new Wiki 2021-12-20 18:27:11 +01:00
TODO actually added SCI 2021-04-03 16:46:01 +02:00

ECP5-PCIe

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.

TODO

  • 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

INSTALL

Execute python setup.py develop in the Gateware folder

SIMULATE

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

SETUP

See the Setup page in the Wiki

RUN

  • 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