UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
1,515 Views
Registered: ‎05-14-2017

Questions on CPU and FPGA communication through Linux drivers

Dear Xilinx Support community and all users,

 

I am working with Microzed board, I can successfully run a Linux distribution and I would like to communicate with the inner FPGA.

 

My main interest is to write data into some custom register implemented through VHDL design (or simply toggle a GPIO ..), from a user space application. I am pretty sure it can be done with some device drivers.

 

If possible, I would like to not use the SDK.

I mean, having the kernel source code, I would like to develope my own driver using the additional xilinx development files (for macro, structure declarations etc.) , compile the driver and use it in my own distribution, as I always did with common drivers testing.

 

I also think I should include another IP block in addition to the Zynq Processing System in Vivado.

 

Could you please provide detailed information on this specific topic ?

Thank you in advance,

 

Best regards,

Simon

0 Kudos
2 Replies
Teacher muzaffer
Teacher
1,472 Views
Registered: ‎03-31-2012

Re: Questions on CPU and FPGA communication through Linux drivers

@simozz no need for a kernel driver. If all you want to do is to toggle a gpio, just mmap the physical address of the IP (axi-gpio?) and write to the virtual address you get as a result to access the registers of the IP. 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Explorer
Explorer
1,466 Views
Registered: ‎05-14-2017

Re: Questions on CPU and FPGA communication through Linux drivers

Hello @muzaffer, thank you for your suggestion.

 

I mentioned the example of toggling a GPIO just as a basic one.

Today I will reading the documentation of the AXI interface.

 

My question arise from the UG873 zio file which can be downloaded here.

Driver code for toggling a GPIO can be found into the zip file.

I could compile that code without sdk, just with arm xilinx gcc from shell, and execute into my Zynq board. The code doesn't work, however this is not big a problem.

 

Regards.

Simon

0 Kudos