PeterOgden / overlay_tutorial

Premade bitstreams and block designs to complemented the PYNQ overlay tutorial
http://pynq.readthedocs.io/en/v2.0/overlay_design_methodology/overlay_tutorial.html
BSD 3-Clause "New" or "Revised" License
38 stars 19 forks source link

[build_all.tcl] grep for *.bd isn't specific enough #1

Closed ekiwi closed 6 years ago

ekiwi commented 6 years ago

Hi,

first at all thank you very much for the simple PYNQ overlay examples, they have been very helpful in creating my own overlays.

I based my tcl scripts on you examples and just found a tricky bug that resulted from the following line:

add_files -norecurse [make_wrapper -files [get_files *.bd] -top]

My problem was based on the fact that I added a AXI SmartConnect instance to my block design which in turn generates its own .bd file (e.g. sources_1/bd/system/ip/system_axi_smc_1_0/bd_0/bd_2721.bd). This seems to lead to vivado trying to create a wrapper for the smc instead of the toplevel block design as intended. I fixed this in my project by being more specific about which block design I want to create a wrapper for:

add_files -norecurse [make_wrapper -files [get_files *system.bd] -top]

Since people will be using your scripts as a starting point (as this repo is linked from the official documentation) it might be a good idea to do something similar in the build_all.tcl script. This way the script won't fail if other block designs are added.

PeterOgden commented 6 years ago

Thanks for the feedback. I was looking into the issue you described and think the best solution might be to use get_files "[current_bd_design].bd" which should ensure that only the block design currently loaded is found (I hope). Would you be able to give it a try in your design and check that it works?

ekiwi commented 6 years ago

It works, however, I do not have the smc components in my project any more. Either way, this seems to be a safer way of selecting the block design. 👍

PeterOgden commented 6 years ago

Change made. Hopefully this is sufficient.