Open RasmusGOlsen opened 1 year ago
This is related to:
Currently, only one UsedIn
attribute called UsedInAttribute is implemented for AMD (former Xilinx) Vivado. Vivado uses that attribute like you describe to mention if a file is used in: synthesis, simulation. In addition if the dialog is used with ...
, there are dozens of used in options like for routing, placement, drc, ...
The attribute is used via Pythons element syntax:
usedInAttr = vhdlFile[UsedInAttribute]
So if you're looking to solve the problem for Vivado, I did already implement it. If you think this should be generally available, we can talk about it and also about possible values.
While the Vivado solution is oriented on high-level and low-level steps in one toolchain, I can also read your question to distinguish files for separate toolchains like synthesis and simulation, where some files are shared and others are disjunct.
On dev
branch, I implemented first improvements for this.
Unfortunately, I used __len__()
for number of files and number of filesets. This dunder method is now repurposed to the number of attributes on a file, fileset, design, or project.
As a replacement, FileCount
, TotalFileCount
, FileSetCount
and TotalFileSetCount
are added.
How can I register attributes to a
File
object? I want to register an attribute to specify which scopes I want to use the file in. It could e.g. be in a simulation or synthesis scope or both. Maybe there is another way to specify this, that I have missed.