I compiled a large VHDL design in ModelSim successfully. The design is not important here, my question is about ModelSim commands for any VHDL design.
Now let's say I have an entity E1 there and I want to know all the packages and entities that are being used/instantiated by E1. I want to use this command in a Tcl procedure like this
proc get_dependency_list_of_entity { E1 } {
...
}
In other words: How can I extract all dependencies of a vhdl module with a ModelSim command.
My approach is this:
The command write report -tcl
returns enough information to extract the library of E1, say L1.
Now the command vdir -lib L1
returns all the entities and packages that are compiled in L1. But of course these are too much. It lists also packages that are in no way related to E1.
So is there a way to get the dependent modules of a vhdl module with a ModelSim command?