PYNQ: PYTHON PRODUCTIVITY

Converting hls::stream<ap_axiu<64,1,1,1>> to hls::Mat<>

I am trying to convert type hls::stream<ap_axiu<64,1,1,1>> to hls::Mat using hls::AXIvideo2Mat() in order to do some filtering using the hls_video library. I was wondering if this will cause any problem since the maximum data width of the hls::Mat<> is 32.

The HLS video library is assuming one pixel per clock hence the 32-bit limit on the stream width. The 64-bit streams for the ZCU104 base overlay are two pixels per clock so you will need to perform some form of stream-width conversion before calling the AXIvideo2Mat function.

Depending on what functions you are calling you may be better off using the xfopencv or Vitis Vision Libraries which are both newer and natively support some functions on 2 pixels per clock streams. Of the two I’d recommend the Vitis Vision Library as it is both newer and the L1 level of libraries are designed to work well with pure HLS.

Peter

So the output of pixel pack has the data width of 48 bit but I am curious how many pixel is output if I am configuring the bit per pixel of pixel pack to 8.

Pixel pack on the ZCU104 has an input of 48 bits and 2PPC and an output of 64 bits at either 2, 2+2/3, 4 or 8 PPC depending on how it’s configured. The pixel packers and unpackers were designed to fulfill a very specific need of getting data into and out of the VDMA at various numbers of channels which the VDMA can’t do on it’s own. I wouldn’t necessarily use it for anything else.

If you want to add your own IP I recommend either using the 48-bit 2PPC side of the pipeline or 64-bit side in 2PPC (32-bit) mode. Running at anything other than 2PPC in your pipeline is not going to be efficient.

Peter

Is there a way for me to drop to 1 PPC for the whole entire pipeline? The HDMI 1.4/2.0 Receiver Subsystem IP has only the option for 2 or 4 pixels.

I was looking to setup the the base overlay pipeline with a resolution 12 bit per channel with one pixel per clock cycle. The thing is that by the time the data is getting to the vdma, I just want to reduce it down to one channel since I am working with gray scale image. Is this possible with the base overlay with minor tweak to it?