ipbus / ipbb

IPbus Builder Tool
GNU General Public License v3.0
12 stars 12 forks source link

Improve support for .tcl constraints files #197

Closed jhegeman closed 6 months ago

jhegeman commented 6 months ago

So far, ipbb treated xdc and tcl constraints files differently. XDC files would follow the default Vivado behaviour, and be used for both synthesis and implementation. TCL files would only be used in implementation.

These changes make both xdc and tcl constraints files follow the default Vivado behaviour, and add an optional '--usefor' flag in the dependency files to specify where/when to use the file. For example: '--usefor implementation', to only use the file in the implementation step, or '--usefor synthesis,implementation', to use the file in both the synthesis and the implementation step.

jhegeman commented 6 months ago

For what it's worth: I have now tested this for several builds in the context of the Phase-2 CMS TCDS. I only ran across two instances of .tcl constraints files that can only be used in implementation (and not in synthesis). In one case this was already mentioned in the comments in that file (by me, admittedly). The other case was obvious after a careful read of the Vivado error messages. (These referred to objects that don't exist at synthesis time, but only at implementation time.)

So I don't see any worry in merging this.

tswilliams commented 6 months ago

I also ran some tests with the some other phase-2 CMS builds (Serenity S1 EMP) - after updating depfiles so that some constraints files were only applied in implementation, the builds were successful.

tswilliams commented 6 months ago

BTW, I've just created a new tag after merging this: dev/2024a