cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
5,613 Views
Registered: ‎01-15-2008

bitstream compression in Zynq

Jump to solution

Is it possible to use bitstream compression in Zynq?  UG585 only makes brief reference to it.

 

I have a custom board with XC7Z100, no DDR, 32MB QSPI.  The bitstream is 16.7MB, just larger than can be accommodated in the 16MB linear addressing space of the QSPI.  After much torture, I have an FSBL/app code which will boot from QSPI on a zedboard, which I'm using for development until I receive assembled boards.  But the XC7Z020 of the zed requires a bitstream of only 4MB, thus fitting in the 16MB linear space, so I can tell the FSBL to treat the QSPI as a linear device; this works.  But the XC7Z100 bitstream will not fit, so requiring either that I compress the bitstream, or rework the FSBL to read and transfer data in smaller chunks.  Seems like compression/decompression would be the easier approach.

 

I'm not using Execute-In-Place, just transferring the elf to OCM for execution.

 

In UG 585, in the PCAP discussion, it says that PCAP can "Process PL bitstream compression commands as needed."  But no other info is given.

 

Thanks for any help

 

Rick

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
9,534 Views
Registered: ‎02-27-2008

Re: bitstream compression in Zynq

Jump to solution

rk,

 

The 'compression is simple:  it sees if the next frame is identical to the last, and only increments the frame counter.

 

Depending on the design, it may do a lot, or nothing at all.

 

The cost of memory keeps going down, so better compression is not justified to invest in.

 

It may be the tools are not actually implementing the 'compression' as this is a Zynq part.  I would expect some compression if there are areas that are unused in the PL (large enough to cover entire frames).

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
5 Replies
Highlighted
Scholar
Scholar
5,606 Views
Registered: ‎02-27-2008

Re: bitstream compression in Zynq

Jump to solution

rk,

 

Did you select the bitstream compress option (ug908)?

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Highlighted
Explorer
Explorer
5,594 Views
Registered: ‎01-15-2008

Re: bitstream compression in Zynq

Jump to solution

Hi Austin,

Thanks for the near-instantaneous reply.  No, I hadn't done that, it's not a feature I've ever used.  But I found it now (in Vivado 2016.2, Bitstream->Settings->EnableBitstreamCompression), and generated a new bitstream (for the zedboard design),.... and it's just the same size as before.  

 

I understand that there's no guarantee that the bitstream will compress, but shouldn't I expect some effect?  The design is almost empty.

 

If the bitstream is compressed, does the decompression just happen automatically during PCAP transfer, or would the FSBL have to do something?

 

It'd be great if this worked.

 

Thanks for your help.

0 Kudos
Highlighted
Scholar
Scholar
9,535 Views
Registered: ‎02-27-2008

Re: bitstream compression in Zynq

Jump to solution

rk,

 

The 'compression is simple:  it sees if the next frame is identical to the last, and only increments the frame counter.

 

Depending on the design, it may do a lot, or nothing at all.

 

The cost of memory keeps going down, so better compression is not justified to invest in.

 

It may be the tools are not actually implementing the 'compression' as this is a Zynq part.  I would expect some compression if there are areas that are unused in the PL (large enough to cover entire frames).

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
Highlighted
Explorer
Explorer
5,576 Views
Registered: ‎01-15-2008

Re: bitstream compression in Zynq

Jump to solution

My mistake!  It turns out I had to re-run implementation (the tools warned me, but I thought I knew better).  After that, bitstream goes from 4MB to 588K.  New boot image works, no FSBL changes necessary.

 

Thanks a lot, I was not looking forward to a trip down the PartitionMove rabbit-hole.

 

Cheers,

Rick

0 Kudos
Highlighted
Advisor
Advisor
2,531 Views
Registered: ‎02-12-2013

Re: bitstream compression in Zynq

Jump to solution

Also, watch out about the state of Vivado when you try to enable bitstream compression. It won't show the compression option unless you have an implemented design open.

----------------------------------------
DSP in hardware and software
-----------------------------------------
0 Kudos