Why use Hierarchy?
There are two, not unrelated, reasons for using hierarchy.
- To allow a schematic design to be structured, so that it can be broken down into it’s functional elements. This promotes Top Down design; break down a problem into functional elements, then define the detail of each element.
- To facilitate the re-use of commonly used circuit elements. This promotes Bottom Up design; use predefined elements to build a solution.
In practice, you may want to use a combination of both Top Down and Bottom Up design.
What is a block?
A block should be a functional element which has a well defined purpose and interface. In design terms, a block is a special schematic design which describes the implementation of it’s function, it also has a symbol associated with it which represents the interface.
A block can be instanced in a schematic design (or another schematic block design). The symbol representing the block is placed in the circuit, and can be connected to, in a similar way to a component. However, as well as the symbol being added to the design, all the pages of the block design are also added. Component and net names are resolved so that there are no conflicts. Connecting to the symbol pins joins the nets with those defined in the block instance.
In many respects, a hierarchical schematic design is no different to a normal multi page design. The net lists would be the same, and the drawings are largely the same. However, it is easier to navigate, because you can Push into the pages representing the block instance, from its symbol, and Pop out of the block instance, back to the symbol. It is also possible to update the contents of a block instance, from the original block design.
Top Down Design
To work top down, add a Generated block instance for each part of the design which is, as yet, undefined. At a later stage, you can Push into the pages of the block instance to define it’s implementation. You can then connect to the block instance using Insert Connection, either connecting to an existing pin on the block symbol, or adding a new one by clicking on the symbol outline.
Bottom Up Design
You may want to create libraries of commonly used blocks, such as power supplies or signal converters. You can do this by creating a Schematic Hierarchy Block design and saving it in one of the nominated Schematic Block folders. When creating a Schematic Design it is then possible to insert an instance of one of these existing blocks into the design.
Navigating A Hierarchical Design
To navigate the hierarchy of a design, use the Push and Pop commands. To Push into a block instance, select any part of the symbol and select the Push into block command from the context menu. To Pop out of a block instance, to the symbol, select the Pop out of block option from the context menu. You do not need to select anything it is sufficient that the active page is part of a block instance.
Connecting Through Hierarchy
Instancing hierarchical blocks gives you the internal connectivity of the block, but you will want to connect these nets up through the hierarchy. There are two ways to do this.
If the net in a block is defined as not local (global), then it may be used anywhere in the entire design. So the same global net name can be used inside and outside a block instance, and the attached items will be connected together. This is fine, but you will want to define connectivity inside a block instance which cannot be connected to outside the block instance. This is achieved by using a local name. Net names are defined in the technology dialog. The scope of a local net is either all pages in the current block instance or all pages in the design top level (i.e. all pages not in a block instance). Local net names are governed by a set of rules.
To connect a local net to items outside the block instance, you will need to use a Block Port inside the block. This will match with a pin on the block instance symbol. The mapping between the two is defined in the block properties.
Multiple Instances
It is possible to add more than one instance of the same block design into a schematic. Once they have been instanced, it is possible to edit them independently so that they diverge from the original definition. More likely, you would want to keep the definitions in step, either with the original block design, or with each other. This can be achieved, by Reload Block updating from the original block design, or by applying changes from one instance, to all the others.
A block instance also has a Locked Instance property which prevents the contents of the instance from being edited or changed in any way. This ensures that it remains a copy of the original definition. A block instance also has a Can be Multiply Instanced property. By enabling this, multiple instances of the block are locked together. Only one of these instances can be unlocked and edited. They can be brought back into line using Update Multi-Instanced Block. If you unlock one instance of a block and make edits to it you can throw away these edits to make it the same as the other locked blocks using the Revert Multi-Instanced Block option from the shortcut menu.
Note that to use Multiple Instances, you must enable them in the Design Settings
Updating Block Instances
Use the Reload Block command from the context menu, to reload the block definition from a block design. This will make all instances of the block become the same as that stored in the block design.
Use the Update Multi-Instanced Block command from the context menu to cause all multiply instanced copies of the block to become the same as the unlocked instance (only one unlocked instance is allowed).
You can also update the block instance symbol. For a symbol stored in the library, use Reload From Library. For a generated symbol, use Regenerate Block Symbol.
Related Topics
Properties - Block | Properties - Block Instance | Properties - Block Ports |
Insert - Block Instance | Insert - Block Port | Reload Block |
Folders - Schematic Blocks | Design Settings | Design Settings - Naming | New Design | Edit - Block Instance | Cut To Block