cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
optivareddy
Adventurer
Adventurer
1,372 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
Reply
3 Replies
imgignacio
Explorer
Explorer
1,331 Views
Registered: ‎11-24-2013

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
Reply
optivareddy
Adventurer
Adventurer
1,291 Views
Registered: ‎11-27-2010

Hi,

   Thanks for response. 

 

0 Kudos
Reply
stephenm
Moderator
Moderator
1,254 Views
Registered: ‎09-12-2007

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
Reply