Manuals >spicent >Chapter 2: Importing a SPICE File
Print version of this Book (PDF file)

Using Imported Designs in ADS

This section provides additional information that can help you prepare for simulating your imported designs in Advanced Design System. Depending on your specific needs and the way your translation was performed, you may be required to perform these steps before your design can be simulated. For information on simulating your design, refer to Simulating the Translated Netlist.

Checking for Unconnected Nodes

If the log file reported any components that could not be translated, there will be open connectors, which show up as red diamonds on the pins in the schematic. Pins that have a red diamond when the schematic is complete are not connected to any other pins. To check for unconnected nodes on a large schematic where the red diamonds are hard to see:

  1. From the schematic window, choose Options > Check Representation. The Check Representation dialog box is displayed.

  2. Ensure the Unconnected pins check box is active and then click OK. A Check Representation Report is displayed that will list all unconnected pins. Note that the components with unconnected pins are highlighted on the schematic.

  3. In the Check Representation Report, click Print to save the report to a file. Click OK to clear the dialog.

  4. To clear the highlighted components on the schematic, choose Layout > Clear Highlighted Components.

If a pin is not connected, it may be because the component it was connected to was not included in the original SPICE file. More likely though, the translation of that component failed because of a syntax error or there is no equivalent ADS component. In this case, you should manually place a component and connect them using the Insert > Node Name command.

A message will be written to the translation log file (spctoiff.log) in the case of any failures. For more information on the translation log, refer to Viewing the Translation Log.

Note    There is no visible indicator in the output ADS Netlist, so the log file must be checked for the names of un-translated components.

Including Models and Subcircuits

This section describes how to include models and subcircuits in your existing design using several example files. Before continuing, create the two example files shown in Table 2-5 and Table 2-6. Save each of the files in the project directory that was used for storing the example SPICE netlist (ex1.sp) in Accessing the Import Dialog.

The two new example SPICE files make up a simple transmission line inverter. The first SPICE netlist (tline.sp) is a subcircuit.

Table 2-5. Transmission Line Subcircuit (tline.sp) Netlist
T1 1 2 3 4 Z0=50 TD=1.5NS
T2 2 0 4 0 Z0=100 TD=1NS

The next SPICE netlist (inverter.sp) includes additional components that complete the transmission line inverter design.

Table 2-6. Transmission Line Inverter (inverter.sp) Netlist
V1 1 0 PULSE 0 1 0 0.1NS 0.1NS 20NS 40NS
R1 1 2 50
R2 4 0 50

Import both of your new SPICE files individually using the information in Importing a SPICE File from the User Interface. These two files should be imported using the PSpice dialect and the Named Connections import method. Remember to close all designs before starting each import.

After the designs have been imported, leave the design inverter.dsn open. Notice the red diamonds on this schematic indicating that something is missing from the file. In some cases, this is caused by components that could not be translated (see Checking for Unconnected Nodes). In this case however, the original SPICE file did not supply this component so the tline.dsn subcircuit will be used to complete the circuit.

Including a Subcircuit

Your SPICE netlist may contain one or more subcircuit definitions. A subcircuit in the SPICE file becomes a reusable component in the ADS schematic. To use a subcircuit, you can place an instance of it in a new or existing design.

To browse for a component and include it in your design:

  1. From the schematic window, choose Insert > Component > Component Library or click the Display Component Library List button on the toolbar.

The Component Library/Schematic dialog box is displayed.

  1. In the Libraries field, scroll down in the list until you find either the Spice Netlists library or the Sub-networks library.

  2. Click either the Spice Netlists library or the Sub-networks library in the Libraries field to see the list of subcircuits that can be placed as components.

  3. In the Components field, click the Component that you want to use (tline in the example case) and move the cursor back into the schematic window.

  4. Click to place the component in your schematic.

  5. Click the End Command And Return to Select Mode icon from the tool bar to stop placing instances of your component.

If you know the name of the subcircuit without looking it up, you may type it directly into the Component History drop-down list box, as illustrated below.

When you enter the name of the subcircuit in the component history box, the case must match exactly with the design name in ADS. Your subcircuit name will be all lower case unless you checked the Suppress name mapping option in the Import SPICE Options dialog box. For more information on capitalization and name mapping, refer to Understanding Capitalization and Suppress name mapping:.

Note    If your SPICE netlist contains a set of models outside of any subcircuit block, the models will be placed in a separate top level design that has the same name as the SPICE file. To use these models, copy them into the design that references them. Optionally, a design with models only can be placed as a subcircuit within another design, but all of the models have to be edited to have global scope. To do this, select a model, open the edit parameter dialog, click the Component Options button, and change Scope to Global.

Connecting a Component

This section describes how to set pin number preferences and assign node names in order to connect a subcircuit to a design. After placing the instance of the Transmission-Line Inverter subcircuit in the last example, you can use the ADS Node Names to connect the subcircuit pins to the rest of the circuit. You may need to turn the pin number visibility on to help identify the proper pins when naming nodes.

To set the Pin Numbers schematic preference in order to see the pin numbers:

  1. From the schematic window, choose Options > Preferences. The Preferences for Schematic dialog box is displayed.

  1. Select the Pin/Tee tab.

  2. Click the Pin Numbers check box in the Visibility (on/off) section to activate the pin number visibility.

  3. Click OK to save the settings and close the dialog.

Defining the Node Names

To define the node names to connect the subcircuit:

  1. Choose the Insert > Node Name menu selection or click the Node Name icon in the tool bar.

The Node Name dialog box appears.

  1. Enter _node2 in the Node Name field but DO NOT click the Done button. An instance of _node2 is attached to your cursor.

  2. Drag your cursor onto the schematic and click pin 1 of the subcircuit symbol.

  3. In the Node Name dialog box, change the node name to _node4. Again, DO NOT click the Done button. Drag your cursor onto the schematic and click pin 2 of the subcircuit symbol.

  4. Save your new design as tline_inv.dsn.

This completes the circuit. Your combined inverter.dsn and tline.dsn should now appear similar to the tline_inv.dsn schematic design shown in Figure 2-3. This design is used in the simulation example in Simulating the Translated Netlist.

Figure 2-3. Translated Schematic with Subcircuit (tline_inv.dsn)

Creating a Hierarchical Project

You can create hierarchical projects using the Include/Remove Projects command. This command creates a reference, or link to another project.

If the import has produced a set of models or subcircuits that will be maintained in a project directory other than the one a designer will be working in, that project directory should be included into the working project directory so the simulator can see the imported items. The Include & Remove dialog can be accessed from the Main window. To include a project directory:

  1. Open the working project directory from which you want to reference designs in other projects.

  2. From the Main window, choose File > Include/Remove Projects. The Include & Remove dialog appears.

  3. Use the File Browser to locate and select the project you want to include. This would be the project containing the set of models or subcircuits.

  4. Click the Include button. The project is added to the Project Hierarchy listing.

  5. Repeat as needed, then click OK.

Using the spiceInclude Component

If you selected ADS Netlist in Choosing the Import Method, your translated schematic will contain a spiceInclude component. This section describes how you can view and modify the spiceInclude component and then use the component within another design.

The spiceInclude component in this section is created by modifying and translating a previous example SPICE Netlist into an ADS Netlist with a spiceInclude component. The newly translated design is then used to show how you can place an instance of your spiceInclude component into another design and then simulate the design.

To setup and translate your example SPICE Netlist into an ADS Netlist with a spiceInclude component:

  1. Close any open designs. Choose File > Close All

  2. If it's not already opened, open your project that you created in Importing a SPICE File from the User Interface. Choose File > Open Project.

  3. From the ADS Main window, choose Options > Text Editor to open the ADS text editor.

  4. In the text editor, choose File > Open and open the file tline.sp that you created in Table 2-5 in Including Models and Subcircuits.

  5. Choose File > Save As to save the file with a new name, tline2.sp.

  6. Edit the new file to change the subckt name to TLINE2 as shown in Table 2-7, then re-save and close the new file.

Table 2-7. Transmission Line Subcircuit (tline2.sp) Netlist
T1 1 2 3 4 Z0=50 TD=1.5NS
T2 2 0 4 0 Z0=100 TD=1NS

  1. From a blank schematic window, import the new file tline2.sp. In the Import SPICE Options dialog box, select PSPICE as the Spice Dialect and ADS Netlist as the Connection Method For Schematic. In the Netlist Options section, enter the Component Name as tline2 and set the number of pins to `2' as shown in the dialog box below. If you need more information on importing a SPICE file, refer to Importing a SPICE File from the User Interface.

  1. Click OK to exit the Import SPICE Options dialog box.

  2. In the Import dialog box, click OK to translate the netlist. Once your translation is complete, ADS displays a schematic window with the tline2.dsn that contains two ports and a spiceInclude component similar to the one in Figure 2-4.

Figure 2-4. Design Containing Two Ports and a spiceInclude Component
  1. Note that the File parameter in the spiceInclude component is called The translated file is now in the project directory and looks like the netlist in Table 2-8. You can use the ADS text editor to open and view the ADS Netlist.

Table 2-8. Translated Transmission Line Subcircuit ( Netlist

define tline2 ( _node1 _node3)
TLIN4:t1 _node1 _node2 _node3 _node4 Z=50 E=(1.5e-09)*360 F=1
TLIN4:t2 _node2 0 _node4 0 Z=100 E=(1e-09)*360 F=1
end tline

To view the design details of your spiceInclude component:

  1. From the schematic window, choose File > Design Parameters. The Design Parameters dialog box appears. The General tab is displayed by default.

    • The Name and Description fields display the current design name by default.

    • The Component Instance Name field default is X. The text in this field is used as a prefix in building a unique name (ID) for every item. This prefix becomes part of the annotation displayed with the symbol representing the parametric subnetwork when you place it in a design.

    • The Symbol Name field displays the standard symbol with the number of ports that you specified for the circuit in the Import SPICE Options dialog.

    • The Library Name field displays the name of the library that the design is owned by. This might be something like Spice Netlists. For more information, refer to Including Models and Subcircuits.

  1. Click the Parameters tab. The Parameters tab does not apply to this particular example; however, you may find it helpful to understand the function of this dialog box for future reference.

When you import a SPICE file containing a subcircuit with parameters to an ADS schematic, you can use this tab to view or edit the parameter details. Each parameter is listed in the Select Parameter field and has characteristics that determine how it is handled when the network is reused. These include the Parameter Name, the Value Type assigned to the parameter, the Default Value, and optional control attributes. Default values are listed only if they were specified in the SPICE file.

For more information on subcircuit parameters, refer to .SUBCKT, .ENDS. For more information on using the Design Parameters dialog, refer to "Defining Parameters" in the ADS User's Guide.

  1. Click OK to continue.

To add an instance of your imported design:

  1. Open the schematic tline_inv.dsn that was created as a result of Including Models and Subcircuits and shown in Figure 2-3.

  2. Save the tline_inv file as tline_inv2.dsn using the File > Save As command.

  3. In the tline2_inv schematic design, delete the tline component.

  4. In this example, tline2 is the imported design with the spiceInclude component. An instance of this component can be placed in your tline_inv2 design by entering the name tline2 in the component history box. This attaches an instance of the component to your cursor that you can now click into place. Place the instance of tline2 in an appropriate location on the tline_inv2 schematic.

  1. Connect the appropriate circuitry to the new subcircuit by naming pin 1 _node2 and pin 2 _node4. For more information on naming nodes, refer to Defining the Node Names.

  2. This completes the circuit. This circuit can now be simulated using the example shown in Simulating the Translated Netlist.


You may create your own symbol by drawing it in the symbol view (View > Create/Edit Schematic Symbol) and changing the Symbol Name in the Design Parameters dialog to the name of the design, tline2 in this example. Save the AEL file from the Design Parameters dialog and the design file from the File menu. A new symbol will not automatically appear in the design in which it is used. For the new symbol to appear in your design, replace the instance of tline2 in your test circuit.

For additional information about the spiceInclude component, refer to Adding the spiceInclude Component.