RODEO
Hierarchy and Hierarchical
Context
Rodeo Hierarchy
Rodeo is able to operate both in flat and
in hierarchical modes. Any PSCAN name belongs to
exactly one name group, and the mode determines the way in which
Rodeo recognizes and groups the names. The name groups are;
- Circuit Parameters
- Names introduced with the external PSCAN keyword.
- Circuit Functions
- Names introduced with the internal and value
PSCAN keywords, and also all basic circuit functions (currents,
voltages, and phases) and the current time TCURR.
- Circuit Elements
- Instance names describing the circuit elements in the net list.
- SFQHDL Rules
- Names of the SFQHDL rules introduced with the rule PSCAN
keyword.
These name groups are totally independent and may overlap (i.e., it is
perfectly legal to have a circuit element and a circuit parameter with
the same name).
In the flat model, Rodeo operates
exactly with the same names that are present in the PSCAN description
of the circuit (in the .cir files). In the
hierarchical model, an additional level of
indirection is introduced, so that the names visible to the user may
(but need not) be different from the PSCAN names. This approach is
natural when using hierarchical CAD systems for the schematic capture
and circuit description generation.
Mapping Files
The hierarchical name spaces are built out of the contents of the
mapping files. The mapping files are loaded in accordance
with the MPFileTab variable. Here is an example of this
variable which is actually stored in the defaults.tcl file:
{"extern.map" {%1} {%2:%3:%4} "cp" }
{"xextern.map" {%1} {%2} "cp" }
{"script.map" {%1} {%2} {[MPIsRule %1]}}
{"netlist.map" {%1} {%2} "elt" }
The first column of each list element names a mapping file to be
considered (e.g., extern.map). The second column tells
Rodeo how to build the flat (system-visible) name out of each
string of the mapping file (here, take the first -- %1 --
field of the string). The third column says how to build the
hierarchical (user-visible) name (here, take the second, the third and
the fourth fields of the string and concatenate them using the
colon). Finally, the fourth column specifies the name group of the
newly created name pair. This column may contain any of the following
descriptors: cp for circuit parameters, cf for
circuit functions, elt for circuit elements, or rul
for SFQHDL rules. It may also contain any valid Tcl expression. In the
latter case, for each string of the mapping file, all required
substitutions of the fields will be performed, and the expression
will be evaluated, and it should return the valid descriptor for this
string.
Rodeo assumes the following format of the mapping files
and hierarchical files.
- File: extern.map -- mappings of the
master circuit parameters
- Input line ::= <flat name> <library
name> <cell name> <parameter
name>
- Flat name ::= <flat name>
- Hierarchical name ::= <library
name>:<cell
name>:<parameter name>
- Example:
- Input line ::= Q13 dzBB dzPSrc JJTL
- Flat name ::= Q13
- Hierarchical name ::= dzBB:dzPSrc:JJTL
- File: xextern.map -- mappings of the
instance circuit parameters
- Input line ::= <flat name> <pseudo-hier
name>
- Flat name ::= <flat name>
- Hierarchical name ::= processed(<pseudo-hier
name>)
The pseudo-hierarchical name is expected to be in the form of
<prefix>@<path>, where
<prefix> is any string that does not contain characters
@ or /, and <path> is the hierarchical path to the
circuit parameter:
<path> ::= /[<cell
name>/]*<element>/<cp
name>
The hierarchical name coincides with the pseudo-hierarchical name,
except when it is shown in the circuit parameters
control block. In the latter case, it is built out of the
pseudo-hierarchical name by removing the <prefix> from
the beginning of the name, stripping off the leading
@, and appending the <prefix> to the
<cp name>.
- Example:
- Input line ::= XL12 X@/SINK/L3
- Flat name ::= XL12
- Hierarchical name ::= X@/SINK/L3
- Hierarchical name as displayed in the CP control block ::=
/SINK/XL3
- File: script.map -- mappings of circuit
functions, instance circuit parameters and SFQHDL rules that occur in
the script.cir file
- Input line ::= <flat name> <hier
name>
- Flat name ::= <flat name>
- Hierarchical name ::= <hier name>
The hierarchical name is expected to be in the form of
/[<cell
name>/]*<name>
- Example:
- Input line ::= W1 /SINK/PASS
- Flat name ::= W1
- Hierarchical name ::= /SINK/PASS
File: netlist.map -- mappings of
circuit elements
Input line ::= <flat name> <hier
name>
Flat name ::= <flat name>
Hierarchical name ::= <hier name>
The hierarchical name is expected to be in the form of
/[<cell
name>/]*<element>
Example:
Input line ::= J15 /SINK/J0
Flat name ::= J15
Hierarchical name ::= /SINK/J0
File: cells.map -- mappings of
cell instances. This file is used only to construct the herarchy tree
of the design.
Input line ::= <hierarchical name> <library
name> <cell name>
Please note that the hierarchical name must start with a slash (/)
and end with a slash, except when it consists of a single slash.
Example:
Input line ::= /TL1/ dzBB dzJTL
Mapping Functions
Every Rodeo function that deals with the names' hierarchy has
two versions: one that expects flat names, and another that expects
hierarchical names. However, there also exists a way to do an explicit
conversion. The explicit conversion can be done using the mapping
functions:
<mode><group>name
Here, <mode> can be either f (obtain the flat
name) or h (obtain the hierarchical name), and
<group> can be any of the name groups' descriptors
(cp, cf, elt, or rul). For
example, the function fcpname invoked with the hierarchical
name of a circuit parameter would return its flat name.
If any of the mapping functions cannot perform the conversion, it
returns its argument unchanged. This is how Rodeo operates in
the flat mode.
Hierarchical Context
Certain parts of Rodeo (namely, the circuit
parameters control block, the circuit functions
observation block, and the 1D parameter
window calculator), operate within a certain hierarchical
context. This means that Rodeo:
- displays only the names that belong to a certain logical part of
the circuit (e.g., instance of a cell or library master cell) and
share a common hierarchical prefix (which is called
context) and
- strips off the hierarchical prefix of all these names.
The context is shown as a red label on a push button. You must click
onto the button to change the local context. A pull-down menu appears
that contains sub-menus corresponding to the global
context (global,or context-less, names), instance cell hierarchy
(starting from the root cell /), and library cell
hierarchies for each library involved in the design. You have to
select the . (self) item in order to change
the context.
The context for each context-sensible Rodeo block is
saved in the .pscanrc.tcl file among the other customization
parameters.