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: 
Visitor russelljoyce
Visitor
9,325 Views
Registered: ‎11-08-2012

Problem with AXI_VDMA S2MM reset

I'm trying to use the axi_vdma core (v5.02.a) on a Digilent Atlys board to receive HDMI input, write it to memory (for processing), then output it over HDMI.

 

I have been using the axi_hdmi core and following the documentation provided by Digilent in DSD-0000332 (from http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,836&Prod=ATLYS), just making the addition of setting "C_USE_FSYNC = 0" in the VDMA core, otherwise the output from the HDMI port doesn't work.

 

So far, I've managed to get the output working, displaying a pattern I've generated and put into memory using the MicroBlaze.

 

The problem comes when I add in HDMI input, by enabling S2MM in axi_vdma and connecting it up to the reciver of the axi_hdmi core. With the same code running on the MicroBlaze, the initialisation of the VDMA core now fails and returns an error.

 

I've tracked it down to the write channel reset timing-out in xaxivdma.c (around line 259), which explains why it works fine when S2MM is not enabled, but I have no idea why the channel won't complete its reset. I've tried increasing the timeout, but it just never seems to finish the reset.

 

Does anyone have any suggestions as to why the write channel isn't resetting correctly?

 

I've attached my system.mhs and the C file that works fine for initialising the VDMA core when it just has output connected.

Tags (4)
0 Kudos
8 Replies
Xilinx Employee
Xilinx Employee
9,321 Views
Registered: ‎08-02-2011

Re: Problem with AXI_VDMA S2MM reset

Hmm, there was a known issue in another function of the driver with an incorrect soft reset being called. This looks like the same kind of thing. Can you try and just comment out the soft reset in the driver and see if it helps?

www.xilinx.com
0 Kudos
Visitor russelljoyce
Visitor
9,306 Views
Registered: ‎11-08-2012

Re: Problem with AXI_VDMA S2MM reset

If I remove the reset of the write channel, it doesn't come up with the error, and the C file I attached last time does run, however the write channel then doesn't work later in the program.

 

For example, if I use the full xaxivdma_example_intr.c file (attached), it fails when trying to set the frame store of the write channel, which is the next operation that uses it.

 

Therefore it does look like the reset is necessary in xaxivdma.c, so I can't just get round the problem by removing it.

 

Do you have any other suggestions about what could be causing the reset to never complete?

As far as I can see in my system.mhs file, the read and write channels are both connected up the same, so I don't see why one is resetting fine while the other isn't.

0 Kudos
Visitor russelljoyce
Visitor
9,301 Views
Registered: ‎11-08-2012

Re: Problem with AXI_VDMA S2MM reset

I've found if I also comment out the reset on line 1183 of xaxivdma.c (in the set frame store function) the program gets further, but I'm still not sure if these resets are actually needed at the moment, as I'm still not getting video displaying.
0 Kudos
Xilinx Employee
Xilinx Employee
9,298 Views
Registered: ‎08-02-2011

Re: Problem with AXI_VDMA S2MM reset

Yes, the reset in XAxiVdma_SetFrmStore is the one I was talking about before (known in v5.02.a of the core and v4.01.a of the driver). This one can be safely removed and I suspect the other one you found is in the same boat. The core actually wipes the configuration registers (back to their initial state) after a soft reset. Therefore, you can see why calling at the end of a configuration function is self-defeating.

 

Anyway, moving on. It sounds like you're making progress slowly. So where does the code get stuck now? You might try reading back the VDMA registers with XMD and posting those as well.

 

So that example code assumes you have hooked up the interrupts from the VDMA to an interrupt controller in the system. I see your interrupt controller isn't connected to any of the VDMA signals.

 

From xaxivdma_example_intr.c


#ifdef XPAR_INTC_0_DEVICE_ID
static XIntc Intc;    /* Instance of the Interrupt Controller */
#else
static XScuGic Intc;    /* Instance of the Interrupt Controller */
#endif


 

 

 

 

 

www.xilinx.com
0 Kudos
Highlighted
Visitor russelljoyce
Visitor
9,279 Views
Registered: ‎11-08-2012

Re: Problem with AXI_VDMA S2MM reset

Thanks again for your help.

 

After connecting up the interrupts, and trying a different HDMI source (one that doesn't appear to care about EDIDs and things, and just transmits continuously) I've managed to get some kind of video input.

 

I've tried re-enabling the reset code that I commented out, now that I'm using a diffent HDMI input, and the system still seems to work. I think the hanging may have been caused by the S2MM interface not getting any fsync signal (or something similar) due to the way it's wired up to get this from the axi_hdmi core, and no HDMI input being present to send a signal.

 

I think a poor axi_hdmi core from Digilent is to blame for some of the issues (as well as slightly incomplete documentation that doesn't mention connecting interrupts or changing FSYNC settings), and the EDID/DDC implementation in the core also doesn't appear to work properly, or at least not for the HDMI devices I've tried.

 

Now, my HDMI input is working to a point, but the signal isn't syncing properly (see attachment). This may be down to the axi_hdmi core though, rather than axi_vdma as it doesn't seem to like actual HDMI input (i.e. HDMI with audio rather than DVI-style) - something like http://forums.xilinx.com/t5/Spartan-Family-FPGAs/xapp495-bugs-S6-DVI-HDMI-input/m-p/137964.

 

I had similar problems with sync with the PLB HDMI example from Digilent - both that and what I'm using now are based on xapp495.

 

My idea now is to try to get parts of xapp460 (which has both DVI and HDMI decoders) and mix it with the xapp495 bits in the axi_hdmi core (which has just a DVI decoder) and hopefully that will sort out syncs (unless the problem is still with the axi_vdma core).

HDMI Sync Issues.jpg
0 Kudos
Visitor chiachen89
Visitor
9,052 Views
Registered: ‎09-14-2012

Re: Problem with AXI_VDMA S2MM reset

Hi russelljoyce, I am wondering if you manage to solve this problem  with the digilent axi hdmi and axi vdma? I am trying to do the same thing, and I just see noises on the display.

0 Kudos
Adventurer
Adventurer
9,016 Views
Registered: ‎06-26-2008

Re: Problem with AXI_VDMA S2MM reset

I have having the same problem.

 

In xaxivdma.c, line 256, the reset to the write channel does not complete.

 

Is this fixed in the newer version or is the workaround just to comment out the reset.  Russel, did you have any luck in getting this to work?  What was the final workaround?

 

Any info would be great.

Visitor russelljoyce
Visitor
8,978 Views
Registered: ‎11-08-2012

Re: Problem with AXI_VDMA S2MM reset

In the end I found that the write channel will reset only if it has an active signal on the HDMI input port - I believe a part of the core clocks off the HDMI signal, so if it's not there it will just time-out while waiting for the channel to reset.

 

One thing to note though: a lot of HDMI sources require valid EDID information to be received before they'll start transmitting any other data over the cable. I've found some sources don't need an EDID (a cheap component-to-HDMI box I have, for example, sends video as soon as it detects a cable), but most do (all computers that I've tried just ignore the HDMI connection until they get an EDID). Also some are more picky than others about reading an EDID (my MacBook seems to want to read the EDID about three times before it's satisfied with it, where a different PC just reads it once).

 

I've found the default EDID implementation in the axi_hdmi core to not work reliably for some sources. In the end, I disabled it (through the core options in EDK) and connected up an I2C core to the DDC pins on the HDMI input port instead, like is done in the older HDMI demo from Digilent (DSD-0000326 at http://www.digilentinc.com/atlys). I did have to tweak the MicroBlaze C code from this a bit in order to get it working, as the default seemed to send the EDID too fast and it wasn't getting to the source properly.

 

I've attached a cut-down copy of what I'm using for the MicroBlaze code to set up my HDMI, VDMA, and control the EDID over I2C. It won't work as it is, but will hopefully make a useful starting point. What I did intially to get this working was have the VDMA setup trigerred by a button on the board, so I could start it manually once I knew the EDID transmission was successful.

 

It certainly took a fair bit of time and effort to get AXI HDMI working nicely on the Atlys, but it's definitely possible in the end.

 

Also, regarding my HDMI sync issues above and getting the garbled image input, this was due to the HDMI core by defualt not liking HDMI signals that include audio data. I've posted a fix to http://forums.xilinx.com/t5/Spartan-Family-FPGAs/xapp495-bugs-S6-DVI-HDMI-input/m-p/297505/ which solves this problem.