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: 
Adventurer
Adventurer
747 Views
Registered: ‎11-27-2010

Linux access PL register to program port of another block

Hi Team,

             Is there any Xilinx block which can do the job.

 

[1] PL based register IP block which can be accessible from Linux.

[2] once written this value should be applied to next block.

[3] one of the internally created IP requires switching modes by writing to 4 bit line [3:0].

[4] I wanted to be able to write from Linux to that axi register and then the register will apply the value b'0101 to custom IP block port.

[5] I wanted to see if there is a IP from Xilinx which can do the job.

 

Linux ---AXI protocol--> register [3:0] --> internally created IP's port [3:0].

 

axi_register.jpg

[6] i explored AXI-register slice, but it did not fit my purpose, please comment if i am wrong.

[7] i am ok with DDR based access or OCM based access. dont want to waste too much memory for this. 32/64 bit implementation fits usage.

 

Thanks

 

0 Kudos
3 Replies
Highlighted
Explorer
Explorer
706 Views
Registered: ‎11-24-2013

Re: Linux access PL register to program port of another block

Hi @optivareddy,

 

you can create an AXI Peripheral (register map) and then connect the registers of your module to the registers of this peripheral. You can do this by instantiating your logic inside the AXI Peripheral. There is a Xilinx video where the creation of an AXI Peripheral is explained: https://www.xilinx.com/video/hardware/creating-an-axi-peripheral-in-vivado.html

 

On the Linux side, you will need a kernel driver to access the register. You can write your own one or use a UIO driver. If you don't need an extreme performance, UIO is a good solution because it avoids writing some kernel code. If you just have to write some values on the register and manage one interrupt, I would go this way. Maybe you find this blog post useful: http://fpga.org/2013/05/28/how-to-design-and-access-a-memory-mapped-device-part-two/

 

Regards,

Ignacio

0 Kudos
Adventurer
Adventurer
666 Views
Registered: ‎11-27-2010

Re: Linux access PL register to program port of another block

Hi,

   Thanks for response. 

 

0 Kudos
Moderator
Moderator
629 Views
Registered: ‎09-12-2007

Re: Linux access PL register to program port of another block

You can just use an AXI GPIO with a UIO:

http://www.wiki.xilinx.com/Testing+UIO+with+Interrupt+on+Zynq+Ultrascale

http://www.wiki.xilinx.com/How+to+debug+Linux+Application+in+SDK+2017.4

 

The above uses a interrupt, which you prob dont need. However, the steps to add the UIO

are usefull. The second wiki has some example code you can use.

 

 

0 Kudos