Repeating Common Circuits in NI Multisim: Hierarchical Blocks

Publish Date: Jun 10, 2011 | 12 Ratings | 4.00 out of 5 |  PDF

Overview

Frequently PCB designers need to reuse a particular circuit module. In these cases, for maximum efficiency it is desirable to use a PCB design tool to easily create re-usable sub-circuits both at the schematic and PCB layout stages of a design.

National Instruments provides a platform of PCB design tools which combines the ease-of-use, powerful capture features, and advanced simulation of NI Multisim, with the quick and flexible layout environment of NI Ultiboard.

In this specially featured article we will learn how to begin applying hiearchical design decisions both in NI Multisim and NI Ultiboard.

Hierarchical blocks are re-usable circuit modules which exist at the circuit level. In this article we will learn more about how to apply this particular modular design practice.

Also available is a companion article in which you will learn how to apply a modular design practice for PCB layout (similar to a hierarchical block at schematic level) in NI Ultiboard for repeating common circuit elements: Repeating Common Circuits in NI Ultiboard.

Table of Contents

  1. Introduction
  2. Creating a Hierarchical Block in Multisim
  3. Placing the New Block onto the Schematic
  4. Customizing the Hierarchical Block's Connectors

1. Introduction

Modularization and reuse is valuable not only in software design, but also in the creation of circuitry for PCBs.  Rather than constantly redesigning a common piece of circuitry, you can save it in a modular and repeatable format known as a Hierarchical Block in Multisim.

Hierarchical Blocks, along with Sub-Circuits, are one of two features offered in Multisim to easily organize and modularize any schematic design. They are similar in that they take sections of a circuit and replace its representation in a design with a block that can be repeated. This block can be treated as a component, and it has input and output pins based upon the net-connections of the original section of circuit it represents. The circuit represented by the block is listed in the design box as a child to the original design project.

Once a Hierarchical Block has been created as a part of your design, you can also repeat its circuit elements in the layout stage. To learn how to repeat the physical layout and traces of these Hierarchical Blocks in Ultiboard, see the related article: Repeating Common Circuits in NI Ultiboard.

Note: There is a subtle difference between Hierarchical Blocks and Sub-circuits: Sub-circuits are saved as a part of the root project and therefore exist only as a part of that root project. A Hierarchical Block, however, is saved as a separate Multisim file and therefore can be considered similar to a component in its ability to be easily re-used and placed in multiple designs.

 

Back to Top

2. Creating a Hierarchical Block in Multisim

Hierarchical Blocks can be created in one of three ways:

  • Option 1: Define a new circuit where Hierarchical Block Connectors are placed to represent the input and output pins of that circuit.
  • Option 2: Use the New Hierarchical Block definition to create a file with the number of input and output pins.
  • Option 3: Take a pre-existing circuit and replace part of its circuit representation with a Hierarchical Block.

In the following example we will explore Option 3. We will take a section of a shipping example ( SpeechFilter.ms11) circuit and replace it with a hierarchical block named CircuitBlock.

  1. Open up the example file <installation path>\samples\SpeechFilter.ms11.
  2. Zoom into the circuit around the Operational Amplifier named U1 (Figure 1).
  3. Select the components outlined in the dashed black box by left clicking in the work area at Point 1 and drag to Point 2.


Figure 1. Circuitry to be Replaced with Hierarchical Block in Multisim.

  1. Select Place >> Replace by Hierarchical Block.
  2. In the Hierarchical Block Properties dialog box enter the name of the new block. It is important to note that this is also the name of the Multisim 11 file that will be created to save the circuit. For this example, name the file CircuitBlock.
  3. Click the OK button.

 

Back to Top

3. Placing the New Block onto the Schematic

The hierarchical block has now been created. Multisim takes the selected components (Figure 1) and creates a file named CircuitBlock.ms11. In Multisim you will now see the ghosted image of a block attached to the mouse cursor.

Place the block onto the schematic. The output and input pins will automatically connect to the original SpeechFilter circuit (Figure 2).


Figure 2. The new, modularized Speechfilter.ms11 design.

 

Back to Top

4. Customizing the Hierarchical Block's Connectors

The block appears similar to a Multisim component with inputs and outputs, a symbol, and a reference description (in this case X1). The pin names can be changed by editing the circuit the block represents. To edit, you can use either of the following methods:

  • Method 1: Double-click on the X1 block component. In the Hierarchical Block/Subcircuit dialog box that appears, click on the Edit HB/SC button.
  • Method 2: Select the block in the Design Toolbox.


In the Multisim work area, you will now see the circuit you selected in Step 3 (Figure 3).


Figure 3. The Hierarchical Block circuit.


To change the names of the input and output pins;

  1. Double-click on the I03 Hierarchical Block connector.
  2. In the Connector dialog box, type IN_1.
  3. Click the OK button.

You can repeat steps 7-9 for the two remaining Hierarchical Block connectors and re-name them IN_2 and OUT respectively. If you now return to the original SpeechFilter.ms11 design by selecting it in the design toolbox, you will notice the new pin definitions.

The saved Hierarchical Block, CircuitBlock.ms11 is now available to be used many times over in any new circuit. If, for example, you wish to place it into a schematic, you would simply have to select "Place Hierarchical Block From File" in Multisim, and browse to its file name (as it was named in step 5 above). It will be placed as a part of the new design and can be connected to a circuit.


 

Back to Top

Bookmark & Share

Ratings

Rate this document

Answered Your Question?
Yes No

Submit