cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cospandesign
Observer
Observer
3,864 Views
Registered: ‎07-23-2013

Python Interface for PCIE Driver

I wrote this a while ago and recently fixed a few bugs and wrote a couple of examples. It's not intended to be used for high throughput applications but it's very helpful to interact and test out cores quickly using Python.

 

Python PCIE

 

Dave

Tags (1)
4 Replies
jmcclusk
Mentor
Mentor
3,857 Views
Registered: ‎02-24-2014

Dave!   This is an awesome project!   But after looking at your Readme.md file for a few minutes,  I can't quite tell.. Is this a Linux only project?  or have you tried it with Windows 7 (or 10)?

 

I need something exactly like this for a Windows 7 project  (and also Linux, later on), and I'm wondering how much work it will be to get it up and running on Win7.

 

John

 

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Reply
cospandesign
Observer
Observer
3,848 Views
Registered: ‎07-23-2013

Unfortunately I have only tried this on Linux.

 

I tried to make the cpp source driver and sip as platform independent as possible but I don't have much experience with coding for Windows. I used the example userland drivers provided by Xilinx to write the library but after looking at my two Makefiles, they don't seem to be compatible with Windows.

 

It seems as though the right path to get this running on Windows is probably the following:

1. Modify the 'Makefile' in the base directory to build a library for Windows. (Err, just tried this... where is 'make' in windows?)

2. Install SIP for Windows and run the 'configure.py' in the sip directory, this should generate a windows friendly 'Makefile'

3. Make and install the sip module generated.

4. Figure out how to tell the python module where the AXI Lite Interface is on Windows, as an example on my Linux system the AXI Lite Interface is located "/dev/xdma/card0/user".

5. Modify the device_map.json file with your addresses of the core.

6. Run the 'demo_block_ram_driver.py' with the flag --driver "Address\of\axi lite pcie"

 

I tried to write the python to be 2/3 agnostic but there might be some issues with Python3. There isn't much code so it shouldn't be too hard to fix any issues.

 

I wish you luck

 

Dave

0 Kudos
Reply
jmcclusk
Mentor
Mentor
3,819 Views
Registered: ‎02-24-2014

Thanks Dave,

 

If I have any luck any porting to Windows 7,  I'll drop you a note, and maybe a pull request, if you feel like merging any changes.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Reply
merlin_windriver
Observer
Observer
3,274 Views
Registered: ‎05-22-2018

Hi John, jmcclusk

 

I saw you are interested in a Python PCI-E solution for Windows 7/8/10 and Linux, and wanted to let you know that WinDriver now supports this natively.

 

Just have a look at https://www.jungo.com/st/document/python-device-driver-development/

 

Best Regards Merlin

 

 

0 Kudos
Reply