Altera_Forum
Honored Contributor
8 years agoqsys-script: how to decent into hierarchy
How do I list a full hierarchy of instances using qsys-script? When opening a qsys-system file with the qsys-script utility and running a script on it I can loop over all the toplevel instances and their direct childs, but decending further into the hierarchy does not work. Note that I use . (dot) as hierarchy delimiter. I also tried _ (underscore) and spaces but to no avail.
package require -exact qsys 16.1
foreach level0 {
puts ${level0}
foreach level1 {
puts "${level0}.${level1}"
foreach level2 {
puts "${level0}.${level1}.${level2}"
}
}
}
But how do I decent further into the hierarchy to produce a tree similar to the Hierarchy-View in the qsys GUI?