Product Documentation
Virtuoso Text Editor User Guide
Product Version IC23.1, August 2023

2


Working With Text Cellviews

Virtuoso Text Editor provides an environment to work with text cellviews. For an overview of this editor, see Chapter 1, “Introduction.”

This chapter includes the following topics on working with text cellviews:

Creating Cellviews

Virtuoso Text Editor lets you create new text cellviews. This application also lets you create a cellview using an existing cellview as the source. The source and new cellviews can be of any type, such as text, schematic, or symbol.

In addition to Virtuoso Text Editor, Virtuoso provides various other tools to create digital and analog text cellviews. For example, Virtuoso Verilog In lets you import modules in an external Verilog file as text cellviews in a Virtuoso library. Other such import tools include Virtuoso VHDL Import for VHDL files and Virtuoso Spice In for CDL, HSpice, Spectre, and SPICE netlists. You can continue to use these tools to create text cellviews, while using Virtuoso Text Editor to edit the text cellviews. For details on these import tools, see the following guides:

You can also use the command cdsTextTo5x to import Verilog, SystemVerilog, and VHDL text files into the Virtuoso design environment. For details, see Importing Design Data by Using cdsTextTo5x.

This section describes the creation of cellviews using Virtuoso Text Editor. It includes the following topics:

Creating a Text Cellview

There are several ways to initiate the creation of a new text cellview, as described in Launching Virtuoso Text Editor. The following figure illustrates how you initiate the text cellview creation from Virtuoso Library Manager.

To create a text cellview:

  1. Open the New File form.
    You can open this form from Virtuoso CIW, Virtuoso Library Manager, and other Virtuoso tools. For details, see Launching Virtuoso Text Editor.
    To open the New File form from Virtuoso Text Editor, choose File — New.
  2. Do the following:
    • Specify the library, cell, and view name in their respective fields.
    • Select the HDL from the Type drop-down list. For example, to create a Verilog text cellview, select Verilog.
    • Set the Open with option to Text Editor.
  3. Click OK.
    A new blank cellview opens in Virtuoso Text Editor and the directory structure of the cellview is created in the specified library.

Edit and save the text cellview. When you close the new text cellview, Virtuoso Text Editor prompts you to save the symbol of the cellview.

When you close the Virtuoso session without saving the changes in a text cellview, the Save All form displays. You can choose to save or discard the changes in the cellview before Virtuoso closes.

You can set up a config cellview using Virtuoso Schematic Editor or Virtuoso Text Editor. For details, refer to Setting Up a Config Cellview using Virtuoso Schematic Editor or Virtuoso Text Editor.
DSPF, Spectre, and Spice views are available by default. You can create a DSPF view using cellview to cellview functionality so that it can be included in a DSPF file in Spectre and AMS netlisting. Create a blank text cellview and copy DSPF file into the cellview. When using the DSPF view in ADE simulation, the DSPF file is automatically included in the netlist.
Performing Check and Save operation on DSPF views may cause significant memory consumption. To avoid this, enable the subcktHeaderAnalyzer parser by setting the cellHeaderAnalyzer .cdsenv variable to t. subcktHeaderAnalyzer checks excessive memory consumption by importing only the interface information of DSPF, such as, subckt name and terminals.

Creating a Cellview from an Existing Cellview

Using Virtuoso Text Editor, you can create a cellview using another cellview as a source. For example, you can create a symbol cellview from a Verilog text cellview.

To create a cellview from an existing cellview, you specify the source library, cell, and view and the destination type and view. The destination cellview is created in the same source library and cell. Depending on the destination cellview type, you can provide additional information. For example, to create a symbol cellview from a Verilog cellview, you can choose to specify additional information, such as the left, right, top, and bottom pins.

Additional Information

The following figure illustrates how you can create a cellview from a cellview.

To create a cellview from a text cellview:

  1. Choose Create — Cellview From Cellview.
    The Cellview From Cellview form appears.
  2. Specify the source and destination cellviews and options.
    The library, cell, and view of the currently opened text cellview appear in the respective fields, which you can change. For this, click Browse and choose the library, cell, and view from Library Browser.
    Field Description

    Source cellview

    Library Name

    Specify the library name of the source cellview.

    Cell Name

    Specify the cell name of the source cellview.

    From the View Name

    Select the source view name.

    Destination cellview

    To View Name

    Specify the destination view name.

    Tool / Data Type

    Select the destination view type.

    The To View Name field gets updated with the default view name of the selected type.

    Options

    Display Cellview

    Select to open the new cellview in a new window.

    Edit Options

    Select to edit any additional options before the cellview creation.

  3. Click OK or Apply.
    If you selected Edit Options and the destination cellview has additional edit options, the appropriate form with those options appears. For example, if you chose to create a symbol view and have selected Edit Options, the Symbol Generation Options form appears when you click OK.
    If the form for additional edit options appears, specify the required options and click OK.

The destination cellview is created using the data in the source cellview.

For VHDL views, you can also create an entity view from the architecture when symbol view is present. For this, set the vhdlCreateEntityFromArch SKILL flag to t.

Additionally, if Display Cellview was selected, the new cellview opens in the appropriate editor. You can also access this cellview from Virtuoso Library Manager.

You can copy and rename text cells from Virtuoso Library Manager. Virtuoso Library Manager also provides comprehensive features to copy data. For details, see Working with Text Cellviews and Copying Data in Cadence Library Manager User Guide.

Editing Text Cellviews

This section described the following topics:

Switching Between Edit Mode and Read-Only Mode

You can edit a text cellview opened in Virtuoso Text Editor in edit mode. You can switch the text cellview mode between read-only and edit. The default background color of the content indicates the mode, as described in the following table.

Default Background Color Description

White

The text cellview is opened in edit mode.

Gray

The text cellview is opened in read-only mode.

You can change the default background color using the environment variables inScopeReadBGColor and inScopeWriteBGColor. For details, see Appendix B, “Environment Variables.”

To switch between read-only and edit modes:

Checking Syntax

After editing a text cellview, ensure that there are no syntax errors. If the text cellview has syntax errors, operations like file parsing and database generation fail.

Virtuoso Text Editor lets you check syntax errors in the text cellview opened in edit or read-only mode. The editor highlights the syntax errors. When you place the cursor over a syntax error, the error description appears as a tool tip.

The following figure provides an example of checking a text cellview for syntax errors.

To check for syntax errors in the text cellview opened in Virtuoso Text Editor:

The syntax errors get highlighted.

Tip:
  • Virtuoso Text Editor also checks and saves the text cellview when you generate the database of that cellview. See “Generating the Databases of Text Cellviews”.
  • You can remove the syntax error markers by choosing Check — Remove All Markers.
  • For further information on the syntax errors in the text cellview file, view the parser log. To access this log, choose View — Parser Log File.
  • To save the text cellview file without checking the syntax, choose File — Save. This option is useful when you want to save an intermediate version of the file that you plan to update later.

Showing Line Numbers and Going to a Line Number

You can view the line numbers of the text cellview file opened in Virtuoso Text Editor. You can also go to a specific line number. This feature is useful if the file is large and you want to go to a specific line number.

To show or hide the line numbers:

If the line numbers are hidden, they become visible.

You can configure Virtuoso Text Editor to display the line number by default using the showLineNumbersInSideBar environment variable. For details, see showLineNumbersInSideBar.

The following figure illustrates how you go to a line number.

To go to a line number:

  1. Choose File — Go to Line.
    The Go to Line form appears.
  2. Type the line number.
  3. Click OK or Apply.

The cursor is placed in the beginning of the specified line number and that line is highlighted.

Notes:

Editing a Text Cellview File in an External Editor

From Virtuoso Text Editor, you can open a text cellview file in an external editor, like the vi editor. You can set the external editor through the shell variable EDITOR or the SKILL variable editor.

When you open the file in the external editor, that file becomes read-only in Virtuoso Text Editor. After you edit and close the file in the external editor, Virtuoso Text Editor prompts you to reload the file. You can then edit that file in Virtuoso Text Editor.

When you edit, save, and close the file in the external editor, the file is parsed. You can view the parser messages in Virtuoso CIW. If the parsing fails, a message appears, prompting you to view the parse error log and correct the errors.

The following figure illustrates how you open a text cellview file in the external editor.

To open the displayed text cellview file in an external editor:

The file becomes read-only in Virtuoso Text Editor and opens in the external editor.

Notes:

You can configure Virtuoso to always open text cellviews in the external editor for editing. For this, use the useExternalEditor environment variable, or the Text Editor Options Form. To  always open text cellviews in an external editor, select the option, select the option Always Edit in External Editor in the Text Editor Options Form and set the SKILL variable hdlReadOnlyModeEditorCommand to the external editor or viewer.

For details on the SKILL variables hdlReadOnlyModeEditorCommand and editor, see “Specifying an Editor for Text Files” in Virtuoso NC-Verilog Environment User Guide.

Checking Pins

You can check the name, order, and number of ports in the different views of the current cell. This feature is useful for text cellview files that connect terminals of instances sequentially. Virtuoso Text Editor also checks the ports when it extracts the database of the text cellview.

To check the ports in all the views parallel to the current text cellview:

The results of the port checks appear in Virtuoso CIW. The application checks ports in the different views of the cell. If any discrepancies are found, the Port Mismatch form appears. This form lists the views with mismatching ports, along with the issues and recommended corrective actions.

You can configure the behavior of the port check functionality using the environment variables disablePortOrderPopup and disablePortOrderCheck. For details, see Resolving Pin Mismatch.

If the current cell does not contain a symbol view, running the Check and Save command creates the symbol view automatically. Once the symbol view has been created in the current cell, choose Check – Cellview From Cellview to either regenerate the symbol view or generate a new symbol view.

By default, the text-to-symbol generator sorts the pins for this symbol view in alphanumeric order. You can change the order in which pins for the symbol are displayed in the schematic by using the environment variable ssgSortPins.

For example, consider a text cellview with the following module definition:

module cellA ( a , c , b , d )
    input a;
    input c;
    input b;
    output d;
endmodule

If a symbol view does not exist in the current cell, cellA, run the Check and Save command, otherwise, choose Create – CellView to CellView. Double-click the symbol view in the Library Manager window to view the symbol in the Virtuoso Symbol Editor. Observe that the pins are displayed in the default order where pins are sorted by their names.

Check the current value of the ssgSortPins environment variable by running the following command in the Virtuoso CIW:

envGetVal("schematic" "ssgSortPins")

It is set to alphanumeric.

Now, set the environment variable ssgSortPins as follows in the CIW and regenerate the symbol by choosing Create – CellView to CellView:

envSetVal("schematic" "ssgSortPins" 'cyclic "geometric")

The Virtuoso Symbol Editor then displays the symbol with the pins sorted in the same order as the module definition.

Using Other Editing Features

You can use the following features to edit the text cellview opened in Virtuoso Text Editor:

Use the Edit menu and Edit toolbar to perform these edit operations. For details on the menu bar and toolbars, see “Understanding the Graphical User Interface”.

You cannot undo operations such as text cellview database generation. Additionally, you cannot undo changes performed before database generation.
Virtuoso Text Editor supports copying and pasting content up to a maximum limit of 8KB, which is equivalent to 8192 characters. An error message is displayed when this limit is exceeded.

Generating the Databases of Text Cellviews

Virtuoso Text Editor creates the database of instances, nets, and pins in a text cellview when you save and close the text cellview file. You can also manually create or update the database of a text cellview opened in edit or read-only mode.

Virtuoso Text Editor does not provide the option to extract the text cellview databases from Spectre, SPICE, HSPICE, and CDL files.

Before generating the database of a text cellview, Virtuoso Text Editor checks the syntax in the file. To generate the database of a text cellview, Virtuoso Text Editor uses the appropriate parser, depending on the cellview HDL file. For example, to parse a Verilog, Verilog-AMS, or SystemVerilog file, the editor uses the Native Code Verilog compiler (ncvlog). For a VHDL file, the editor uses the Native Code VHDL compiler (ncvhdl). Similarly, the editor uses different parsers for different types of HDLs. The parser checks the syntax, design, connectivity, and masters. If the checks pass, it creates and stores the database information in the netlist.oa and data.dm files within the directory structure of the text cellview.

If the application encounters file parse errors, the database is not generated. In this case, you can view the log of the file parse operation to investigate the errors. For details, see “Viewing the File Parse Log”.

It is possible that some instances in a text cellview are not bound. In such cases, Virtuoso Text Editor indicates the issues in Virtuoso CIW. The following report is an example of how instance binding information appears in Virtuoso CIW. The first four instances mentioned in the report are not bound to any cellview.

Instance binding report.
----------------------------------------------------------
master name       lib              cell             view
----------------------------------------------------------
PLL_160MHZ_MDIV   nil              nil              nil
PLL_160MHZ_PDIV   nil              nil              nil
gpdk090_nmoscap2v nil              nil              nil
or2_4x_hv         nil              nil              nil
PLL_ARST_DIG      amsPLL           PLL_ARST_DIG     symbol
PLL_ARST          amsPLL           PLL_ARST         symbol
PLL_VCO_320MHZ    amsPLL           PLL_VCO_320MHZ   symbol
PLL_PFD           amsPLL           PLL_PFD          symbol
PLL_CP            amsPLL           PLL_CP           symbol
PLL_160MHZ_LF     amsPLL           PLL_160MHZ_LF    symbol

If there are unbound instances and the design flow requires you to correct such issues, perform corrective actions and regenerate the database. For example, if the design flow requires netlist generation, the unbound instance must be corrected to avoid issues.

After generating the database, Virtuoso Text Editor checks for any mismatch in the ports across different views of the cell.

You can configure the behavior of the port check functionality. For details, see Resolving Pin Mismatch in Virtuoso Schematic Editor L User Guide.

To generate the database of the text cellview opened in Virtuoso Text Editor manually, do one of the following:

If you edit the text cellview and close it without regenerating the database, the application checks and parses the file, and generates the database automatically.

Viewing the File Parse Log

Virtuoso Text Editor uses the appropriate parser to parse the file of a text cellview to perform operations, such as generating the cellview database. When the parser processes a file, it maintains a log. You can view this log for details. For example, you can view the log to investigate parse errors.

In addition to information about any errors, the parse log of a text cellview file provides additional information, such as:

Verilog-A files are parsed using the Spectre binary. The parse log of a Verilog-A file does not include additional information.

The following figure illustrates how you can view the log of a file parsing operation in Virtuoso Text Editor.

To view the file parse log of the currently opened text cellview:

The Parse Log File window appears with the log.

Navigating a Design Hierarchy Containing Text Cellviews

You can instantiate a symbol of a text cellview in a schematic view. You can then descend to this text cellview from the schematic view. The following figure illustrates how you navigate a design containing text cellviews. In this example of the drink_machine design, the drink_machine_top schematic view contains the symbol of the SystemVerilog text cellview can_counter. The figure illustrates how you can descend to can_counter instance I0 from drink_machine_top.

To descend to a text cellview from a schematic:

  1. Select the text cellview symbol instantiated in the schematic view.
  2. Do one of the following to open the Descend form:
    • Press E.
    • Double-click the symbol.
    • Choose Edit — Hierarchy — Descend Edit, or Descend Read.
  3. Specify the mode and location to open the text cellview.
  4. Press OK.
    The text cellview opens. You can open multiple text, schematic, and layout views in different tabs of the same window. You can also open them in the same tab or in a different window.

The Navigator assistant shows the design hierarchy, including the text cellviews.

To access the Navigator assistant, do one of the following:

The Navigator assistant is available in Virtuoso Text Editor, Virtuoso Schematic Editor L and XL, and Virtuoso Layout Suite L. For details, see The Navigator Assistant in Virtuoso Schematic Editor L User Guide.

Note the following:

Ignoring Explicitly Inherited Terminals for Text Cellviews

The Cross-View Checker form lets you ignore explicitly inherited terminals for text cellviews, such as functional, systemverilog, verilogams, or symbol cellviews.

For example, consider that you have a cell cellA and it has three views, schematic, symbol, and SystemVerilog.

Here,  

To ignore inherited terminals:

  1. From the schematic window, open the Cross-View checker form.
  2. Select Match Inherited Terminals.
  3. Select Ignore Terminals with Net Expression and no Terminals in the Other View.
  4. Specify a text view type in the View Names field. For example, specify the functional view.
  5. Select the Terminal Names option and specify the name of the terminal in the adjacent field.
  6. Click OK.
  7. Open the view in the Text Editor window and click Check and Save.

The inherited terminals are matched while the explicitly inherited terminals with pin mismatches are ignored for the specified cellviews.


Return to top
 ⠀
X