10-02-2018 03:43 AM
I need to lock a register to a PIN in my project. My problem is that the same project has 2 versions differing by the physical position of that pin in the pin association map. Is it possible to have an "intelligent" constraint file interpreted at compilation stage like:
set_property LOC OLOGIC_X1Y146 [get_cells TRGBUS_TX_BLOCK/RSYNC_reg]
set_property LOC OLOGIC_X1Y0 [get_cells TRGBUS_TX_BLOCK/RSYNC_reg]
10-02-2018 03:46 AM
I wonder too if xdc accepts that kind of pragmas.
The "intelligence" I would suggest is the common sens and organization to keep two sets of files associated to each project variant.
It happens everywhere, is not a thing to be ashamed of.
10-02-2018 05:36 AM - edited 10-02-2018 05:44 AM
---- <projectA> folder | |-----------<variant1> folder |-----------<variant2> folder
Actually, Vivado allows having a number of constraint files that can be activated or deactivated (so chosen). I bet a tcl command can do that, so without duplicating files it could be reduced to that operation.
Pragmas and conditional pre-compile stuff is something that some sw folks love. It creates an apparent simplicity based on a clear complexity. That's not smart in my opinion, just cool from the outside, in power point, etc.
If your justification for that conditional constraining is "one more less thing I can forget to set up", remember that you (or some human) will still be responsible for setting the right value of the condition for each project, so, at the end, you have more lines of code and the same chances of making a mistake,