enjoy-digital / litepcie

Small footprint and configurable PCIe core
Other
468 stars 116 forks source link

Add PCIe <-> Wishbone function? #94

Open tongchen126 opened 2 years ago

tongchen126 commented 2 years ago

How about adding this PCIe <-> Wishbone bridge to litepcie? Basically, it can transfer data between the Host PCIe Bus and SoC's wishbone bus. Code is here. The LiteWishbone2PCIeDMA/LitePCIe2WishboneDMA receives control from PCIe Driver and LiteWishbone2PCIeDMANative/LitePCIe2WishboneDMANative receives control from internal circuit.

You can see how to start a dma transaction from PCIe to Wishbone here by using LitePCIe2WishboneDMA started by Host PCIe driver. Or starting a dma transaction by pull up the start signal using LitePCIe2WishboneDMANative.

The stability has been tested over 24 hours as I used it to build a Gigabyte PCIe Ethernet Adapter.

In my local repo, I placed this code under 'litepcie/frontend' but it may also serve as a demo under 'example' folder in the first place.

enjoy-digital commented 2 years ago

Thanks @tongchen126, that's a really great new feature! Please give me a few days to look at it and get back to you to see how to integrate it.