05-26-2016 10:54 AM - edited 05-26-2016 11:22 AM
I'm working on scripting our department's FPGA design flow.
We've got a design with a Microblaze in it, and I'd like to be able to decouple the Microblaze software development from the FPGA implementation flow (so that our software guys don't need to mess around with the FPGA implementation tools).
I've already got an automated flow up and running, and I also figured out how to use updatemem to add a .elf to an existing .bit file. Updatemem doesn't support bitstream compression, however. :( We're working on the Kintex Ultrascale KCU040, so compressing the bitstream makes a huge difference in the FPGA boot time.
Is it possible to add a .elf file post-implementation? Ideally, I'd love to be able to do something like the following:
1. Run Synthesis
2. Run Implementation and do a software export
3. (software team creates a .elf file)
4. Open the implemented design (or import some post-implement files into a new project)
5. Add the .elf file
6. Set BITSTREAM.GENERAL.COMPRESS and generate an updated .bit file (without reimplementing the design).
I'm pretty comfortable with TCL and shell scripting - anybody got some hints for the right sequence of commands?
05-27-2016 04:43 AM
I use updatemem to update a compressed bitstream / .bin file since vivado 2014.4 in a non-project flow See the below tcl commands to update the bitstream.
set_property BITSTREAM.GENERAL.COMPRESS True [current_design] # Available options: False, True Default: False #write_bmm -force $filename_bd.bmm write_mem_info -file $report_dir/mem_info.mmi write_bitstream -force -bin_file $filename.bit update_mem -meminfo $report_dir/mem_info.mmi -data software1.elf -proc path/to/microblaze -data software2.elf -proc $path/to/another/microblaze -bit $projectName.bit -out $projectName.bit -force write_cfgmem -force -format BIN -interface SPIx4 -loadbit "up 0x0 $projectName.bit" $projectName.bin
Another option I used previously is to read and associate the .elf file and open the post_route.dcp, after that rerun write_bitstream and you get an updated bitstream. This took about a half an hour for my project. The method above about 10 mintues.
05-27-2016 04:43 AM
I use updatemem to update a compressed bitstream / .bin file since vivado 2014.4 in a non-project flow See the below tcl commands to update the bitstream.
set_property BITSTREAM.GENERAL.COMPRESS True [current_design] # Available options: False, True Default: False #write_bmm -force $filename_bd.bmm write_mem_info -file $report_dir/mem_info.mmi write_bitstream -force -bin_file $filename.bit update_mem -meminfo $report_dir/mem_info.mmi -data software1.elf -proc path/to/microblaze -data software2.elf -proc $path/to/another/microblaze -bit $projectName.bit -out $projectName.bit -force write_cfgmem -force -format BIN -interface SPIx4 -loadbit "up 0x0 $projectName.bit" $projectName.bin
Another option I used previously is to read and associate the .elf file and open the post_route.dcp, after that rerun write_bitstream and you get an updated bitstream. This took about a half an hour for my project. The method above about 10 mintues.
05-27-2016 09:36 AM
Awesome! I didn't know that got added to updatemem. Thanks, rik.visser!