Enable bitstream compression for Xilinx projects

Enabling bitstream compression reduces the size of the generated bitstream.

This means on one hand it will consume less storage, which is especially
useful for the BOOT partition of the ADI images where we store BOOT.BIN
files for all supported platforms.

On the other hand a smaller bitstream is faster to load from the storage
medium and it is also faster to program to the FPGA. So it reduces the
overall boot time as well.

The only downside of bitstream compression is that the bitstream size is no
longer constant, but depends on the actual design and resource utilization.
This will not work with bootloaders that expect a fixed size.

When building a bitstream using the tcl scripts bitstream compression can
be disabled by setting the ADI_NO_BITSTREAM_COMPRESSION environment
variable.

Initial tests show a reduction of a round 50% in size for most ADI
projects.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2016-07-13 18:46:34 +02:00 committed by dbogdan
parent 130bfdd408
commit fe08222bdf
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1 @@
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]

View File

@ -126,6 +126,12 @@ proc adi_project_create {project_name {mode 0}} {
} else {
write_hwdef -file "$project_name.data/$project_name.hwdef"
}
if {![info exists ::env(ADI_NO_BITSTREAM_COMPRESSION)] || ![info exists ADI_NO_BITSTREAM_COMPRESSION]} {
add_files -norecurse -fileset sources_1 \
"$ad_hdl_dir/projects/common/xilinx/compression_system_constr.xdc"
}
}
proc adi_project_files {project_name project_files} {