The Spectre AMS Designer Simulator supports hierarchical designs by allowing you to embed models in other models. Levels of hierarchy in a design are called scopes. To create a scope, you nest objects within design units by instantiating them. Instantiation allows one design unit to incorporate a copy of another into itself.
Each scope in a design hierarchy has a unique hierarchical path. For Verilog-AMS, elements in the path are separated by a period ( . ). You can specify paths
- Fully from the top level of the hierarchy
Full paths begin with the name of a Verilog-AMS top-level module. For example:
top.board.countertop.vending.drinks.count_cans.in1
- Relative to the current debug scope
For example, if the current debug scope istop.board, the pathcounterrefers to a scope within the scopeboard, which is within the top-level moduletop.
You traverse the model hierarchy by setting the scope to an instantiated object. If you are using the Tcl command-line interface, use the scope -set command. For example, if the current debug scope is the top level, and you want to move down one level to a scope called board, use the following command:
scope -set board
If you are at the top level and want to move down to a scope within board called counter, use the following command:
scope -set board.counter
You can specify a full path from any debug scope. For example, if the current scope is board:counter, you can move up to the top level (module top) with the following command:
scope -set top
The scope command has several options besides -set. These options let you
- Describe the items declared within a scope (
-describe)
- Display the drivers of the objects declared within a scope (
-drivers) - Print the source code, or part of the source code, for a scope (
-list) - Display scope information (
-show)
