cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
5,091 Views
Registered: ‎09-09-2015

Data from PS side to PL side

How to send data from PS side to PL side
I know this is an often described problem, but even though the vast amount of problems I can't seem to figure it out.

I am reading out a Xadc value on the PS side, wanting to transfer this data to the PL side so I can use it in a self made VHDL program. I am having trouble finding the easiest way to do so. 
I have read a lot about using DMA for transferring data from PS to PL side but im not finding it easy understandable at all.

 

I tried a bunch of different approaches like:

Youtube TutorialJeff Johnson, AXI DMAMicrozed chronicles AXI DMA.
And several others, but for some reason I can't get any of them to work.

Even by using a simple block diagram and using the PS DRAM example codes to check writing to the DRAM isn't giving any results.
For the past weeks I have been reading up on all the latest AXI datasheets but without succes.

Can someone point me in the right direction? 
To repeat myself, my goal is to send a 16 bit value over from the PS side to the PL side.
thanks in advance

0 Kudos
9 Replies
Highlighted
Xilinx Employee
Xilinx Employee
5,084 Views
Registered: ‎08-01-2008

check this XAPP
https://www.xilinx.com/support/documentation/application_notes/xapp1183-zynq-xadc-axi.pdf

The following demo http://www.xilinx.com/training/zynq/zynq-analog-mixed-signal-xadc-wizard-demo.htm helps to set the XADC. The procedure is also applicable for ZEDBOARD.
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Observer
Observer
5,083 Views
Registered: ‎09-09-2015

Thanks for the quick reply,

 

The XADC part on the PS side and the VHDL part on the PL side are both completely finished already.
The only thing I really want to learn still is sending this value from the PS to the PL side.

Its also the last thing I am still struggling with.

0 Kudos
Highlighted
Voyager
Voyager
5,070 Views
Registered: ‎06-24-2013

Hey @remcovink,

 

The only thing I really want to learn still is sending this value from the PS to the PL side.
Its also the last thing I am still struggling with.

There are a bunch of options here, as a matter of fact ... you can:

  • Create an AXI slave peripherial (Register) in the PL and access it via one of the PS Master Ports.
  • Send the data (typically via DMA) from PS to PL (streaming interface).
  • User an AXI master on the PL side to fetch the data directly from memory.
  • Use some of the GPIO pins (EMIO) between PL and PS to transfer the data.
  • Use one of the PS peripherials to transfer the data to the PL (SPI, UART, I2C)

But let me state here that the PL can access the XADC directly and this might as well be the simplest way to achieve your goals.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Observer
Observer
5,068 Views
Registered: ‎09-09-2015

I know the XADC can be accessed directly, but I have been avoiding usings links between PS and PL for a long time because I simply struggle with it and never succeeded into getting it to work. So even though I know of the possibillity of connecting the PL side to the xadc. I really want to get this connection between the PS and PL going.

 

Regarding the other options.
I tried sending the data over DMA but failed miserably none of the things I tried even came close to working.

 

These two sound the same in my opinion? and I tried some stuff with regisers but also without any succes.

  • Create an AXI slave peripherial (Register) in the PL and access it via one of the PS Master Ports.
  • User an AXI master on the PL side to fetch the data directly from memory.

 

I think I have tried this to do a basic tutorial of controlling the LEDs with the PS system once, but I fail to understand how it can easilly help me send 16bits of data.

  • Use some of the GPIO pins (EMIO) between PL and PS to transfer the data.
0 Kudos
Highlighted
Observer
Observer
5,040 Views
Registered: ‎09-09-2015

edit: I was trying to learn more about using the GPIO pins, and came across the following video: https://www.youtube.com/watch?v=JPVTVNtJ7R4

Which is basically exactly the same as interfacing LEDs or buttons through ps side.

Is it possible to just make add a 16 bit wide axi gpio block to the design and interface it through xpar axi gpio 0 device through the PS block???
0 Kudos
Highlighted
Teacher
Teacher
5,031 Views
Registered: ‎03-31-2012

@remcovink all you need is to make an axi slave on PL which includes your VHDL code and connect it to a PS GP interface so that it gets an address of its own and you can access it from PS. It's quite easy. 

When you get comfortable with things little bit more, you can even connect your VHDL code directly to XADC and not have it read by PS in the first place. Then the flow would be xadc -> your vhdl IP  which is controlled by PS ie it has two interfaces: one to PS for control registers over axi-slave and one to XADC to get data over an axi-master interface.

- 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
Highlighted
Observer
Observer
5,028 Views
Registered: ‎09-09-2015

@muzaffer

 

In my Vhdl design I'm using the DDS controller, which is connected to a self made delta sigma converter outputting a bit stream dac through a pmod to a low pass filter creating a DAC. 

 

Would it be possible to the hook up the PS to the M_axis_phase of the DDS compiler, so I can control the frequency of the DDS by changing an input voltage and xadc? 

This is also my goal to achieve by the way. 

 

If this is possible do you have suggestion for hooking the PS to the M_axis_phase 

0 Kudos
Highlighted
Teacher
Teacher
5,006 Views
Registered: ‎03-31-2012

@remcovink m_axis_phase is an AXI stream output from the DDS IP. I don't think this is how you control the frequency of the DDS. Please describe your problem in more detail and more clearly.

- 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
Highlighted
Observer
Observer
4,976 Views
Registered: ‎09-09-2015

I am sorry.. what I meant was he S_AXIS_CONFIG..

Nevertheless what I am trying to do is.

Measure a voltage by using the Xadc on the PS side, converting the voltage to a range which I can use to change the frequency of my DDS core and therefore the frequency of my delta sigma output.

0 Kudos