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: 
Contributor
Contributor
602 Views
Registered: ‎11-26-2018

Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi,

I've a problem with the interrupt of the "Buffer frame video write", if I use a 4k 30Hz video (hdmi rx subsystem) the system works fine (the interrupt of the "Buffer frame video write" is generated every 33.3ms), if I put a 4k 60Hz the system fails. In particular the interrupt of the "Buffer frame video write" is generated every 1.5s and not every 16.6ms, I checked the Tuser and it's correct (16.6ms). 

The design is done in this way: Hdmi rx -> an AXI4-Stream Switch -> FIFO -> buffer frame video write -> vcu

 

Andrea

Tags (1)
1 Solution

Accepted Solutions
Contributor
Contributor
400 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

I've found that adding a queue in gstreamer solve the problem and now the interrupt of "Buffer video write" it's correct.

17 Replies
Scholar drjohnsmith
Scholar
590 Views
Registered: ‎07-09-2009

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution
Two things come to mind

Is your FIFO filling, due to not being emptied fast enough
Does the IP your using support 60 Hz, 4K ,
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Scholar watari
Scholar
554 Views
Registered: ‎06-16-2013

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi andrea@ross 

 

It seems bandwidth issue.

Would you make sure the followings ?

 

- Consider and make sure clock frequency in your video path

- Consider and make sure bus width in your video path

- Make sure QoS setting of VCU, if necessary.

 

I recommend to share block diagram and your clock tree, if you want more suggestion.

 

Best regards,

Contributor
Contributor
528 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

For 4k 60 the hdmi bus is setted to 4 pixels per clock; the "Buffer frame video write" for 4 pixels uses a bus of 256bit, but the zynq (S_AXI_HP0_FPD) can manage a maximum of 128bit so I need to "convert" 4 pixel to 2 pixel per clock, for this purprose I used a clock converter from 148.5MHz (used by 4 pixels per clock) to 330MHz (for 2 pixels per clock) and than I put an "AXI4-Stream Data Width Converter" to get 2 pixel per clock at 330MHz (In this way I can manage 1080p 60 and 4k 30). I have the same problem also when I use the "Buffer frame video write" to write the frames into the memory without the vcu working.

Andrea

diagram.JPG
0 Kudos
Scholar watari
Scholar
521 Views
Registered: ‎06-16-2013

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi andrea@ross 

 

Whould you share FIFO size ?

 

It seems bandwidth issue. Your design and clock and bus setting seems over limit.

 

Best regards,

0 Kudos
Contributor
Contributor
515 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

The FIFO it's 4096x64 bits

Andrea

0 Kudos
Highlighted
Scholar watari
Scholar
513 Views
Registered: ‎06-16-2013

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi andrea@ross 

 

As you mentioned before, it's bandwidth issue.

 

Would you change the following ?

 

Plan a) Change FIFO size to 8192x64bit.

Plan b) Change clock frequency to over 356.4[MHz].

Plan c) Consider bus witdh and so on.

 

Best regards,

0 Kudos
Contributor
Contributor
503 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

I'm using the xilinx board zcu106, so I can't go over 333MHz, the zynq bus width it's fixed to 128bits and I've already tried the FIFO with 8192 but it does not solve the problem.

Andrea

Scholar drjohnsmith
Scholar
486 Views
Registered: ‎07-09-2009

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Its a zynq ultra scale plus part,

   That can do over 350 MHz internal clock.

The Zynq bus width fixed at 128 bits ? thats interesting.

    Are you feeding the video through the processor ?

   ( sorry I can't see the orriginal posts on the phone )

Is this 333  MHz your processor speed / external memory speed ?

   what speed is the PL side clock ?

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Scholar drjohnsmith
Scholar
482 Views
Registered: ‎07-09-2009

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Ive just checked,

 

have you tried the TRD for this board ?

https://www.xilinx.com/support/documentation/boards_and_kits/zcu106/2019_1/ug1250-zcu106-vcu-trd.pdf

This says it can work at 4K 60Hz

Its always easier and quicker to modify a working design,

I'd suggets you take that desing and prove the system as is works,

    then take bits out / add to it as you want.

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Contributor
Contributor
468 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

The 333 MHz it's the limit of the ps bus (S_AXI_HP0_FPD), I can set 360MHz but I get this critical warning (" [BD 17-146] Maximum Supported frequency for  zynq_ultra_ps/saxihp0_fpd_aclk is 333.333"). The zynq ps bus can be set to a maximum 128bit, the "Buffer frame video write" needs 128bits for 2 pixels per clock.

0 Kudos
Scholar drjohnsmith
Scholar
465 Views
Registered: ‎07-09-2009

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Is it the PS speed that you think is causing the problem ?

What have you set the PL clock to ?

Is it the PS width that you think is causing the problem ?

   What have you se tthe PL AXI bus bandwidth for ?

 

have you tried the TRD ?

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Contributor
Contributor
447 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

In the PL I have two clocks: one (148.5MHz) for the hdmi 4 pixels per clock than I use a 333MHz when I convert from 4 pixels to 2 (I'm going at the maximum speed "allowed"). Maybe the problem is the "Buffer frame video write" that uses 128 bits for only two pixels (YUV422) when with 128 bits you can put more pixels (YUV422). If the ps bus had 256 bits then I could stay with the current clock and set the "Buffer frame video write" to 4 pixels per clock, if instead it supported a higher clock I could leave the bus width unchanged and go faster. I've started from the TRD.

0 Kudos
Scholar drjohnsmith
Scholar
429 Views
Registered: ‎07-09-2009

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Let us know how yo uget on with the TRD,

It says that can run at 4K60Hz, so should be a good pointer as to what you can do.

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Scholar watari
Scholar
423 Views
Registered: ‎06-16-2013

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi andrea@ross 

 

Would you make sure the following ?

 

- What frequency do you use DRAM in Zynq ?

- Did you set QoS parameter ?

  => I'm not familiar with it. But I guess the following URL might help for you.

      https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842098/Zynq+UltraScale+MPSoC+Cache+Coherency

 

Best regards,

0 Kudos
Contributor
Contributor
401 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

I've found that adding a queue in gstreamer solve the problem and now the interrupt of "Buffer video write" it's correct.

Scholar watari
Scholar
337 Views
Registered: ‎06-16-2013

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

Hi andrea@ross 

 

That sounds good.

Could you share your gstreamer pipeline ?

 

Best regards,

 

0 Kudos
Contributor
Contributor
202 Views
Registered: ‎11-26-2018

Re: Buffer frame video write fails to go to 60 fps at 4k

Jump to solution

This is my gstreamer pipeline:

gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=dmabuf ! queue ! video/x-raw,format=NV16,width=3840,height=2160,framerate=60/1,alignment=nal ! omxh264enc target-bitrate=80000 gop-mode=basic control-rate=low-latency gop-length=60 periodicity-idr=60 ! mpegtsmux ! tcpserversink port=8888 host=0.0.0.0