Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

qsys-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?
No RepliesBe the first to reply