With the SPB16.3 release of PCB SI, the Model Editor has been added to allow you to view, update, and check the syntax and data integrity for various models. The first release of the model editor contains simple functions. More utilities, tools, and features will be added in future releases.
The Model Editor is a standalone executable and can be invoked in the console. The command line syntax is:
modeleditor –v –t title –r scriptfile file1 file2 …
-v View mode - file cannot be edited
-t title Use this as the document title instead of the file path
-r scriptfile Replay the script file
The Model Editor can also be invoked through the Model Browser in the PCB SI tools.
The following environment variables have been added to the global environment file (<cds_inst_dir>/share/pcb/text/env).
- set SI_MODEL_PATH = $DEVPATH
- set SI_MODEL_FILE_EXT = |DML ( dml ) |Espice ( spc , tlsim ) |HspiceInput ( sp ) |HspiceOutput ( lis ) |GenericIBIS ( ibs ) |IBISBuffer ( buf] ) IBISEBD ( ebd ) |IBISICM ( icm ) |IBISPinList ( pin ) |IBISPackage ( pkg ) |Interconnect ( iml ) |Quad ( mod ) |Spectre ( csc , cir ) |GenericSpice ( ckt ) |Touchstone ( s?p , s??p , snp )
The SI_MODEL_PATH variable is used to configure default directories to contain all models in the library, and are used as the search path in the SI model browser. You can configure these directories in the model editor, and the updated value will be stored in the local environment file ($HOME/pcbenv/env).
The variable SI_MODEL_FILE_EXT is used to configure the default file extension for various model formats. The model editor and SI Model Browser use this value to determine the model type for the given model file name and file extension. You can configure these file extensions later in the model editor, and the updated value will be stored in the local environment file ($HOME/pcbenv/env).
Read on for more details ...
The main Model Window editor is shown below:
Format-Associated File Extension Dialog
Model Editor determines the model format based on the given file extension. The mapping between the file extension and the model format is stored in the system variable SI_MODEL_FILE_EXT. You can change this mapping through the File — File Extension menu. Any changes to this mapping are stored in the local environment file ($HOME/pcbenv/env).
The fields in the form are defined below:
DML Specifies the file extension for a Cadence DML file
ESpice Specifies the file extension for a Cadence ESpice model
Interconnect Specifies the file extension for a Cadence interconnect file
Spectre Specifies the file extension for a Cadence Spectre model
Generic IBIS Specifies the file extension for a generic IBIS file
IBIS Buffer Specifies the file extension for an IBIS Buffer model
IBIS EBD Specifies the file extension for an IBIS EBD model
IBIS ICM Specifies the file extension for an IBIS ICM model
IBIS PinList Specifies the file extension for an IBIS Pin List
IBIS Package Specifies the file extension for an IBIS Package model
HSpice Input Specifies the file extension for an HSpice input model
HSpice Output Specifies the file extension for an HSpice output model
Quad Specifies the file extension for a Quad model
Generic Spice Specifies the file extension for a generic Spice model
TouchStone Specifies the file extension for a Touchstone model
The model library directories are displayed and explored in the dockable Explorer window. You can specify the directories containing all models using the system environment SI_MODEL_PATH. This window explores all model files and directories as a tree. When you change the model library path, the updated value is stored in the local environment file ($HOME/pcbenv/env).
All supported model files with previously-registered file extensions in the system environment SI_MODEL_FILE_EXT are listed in the explorer tree with the appropriate images. You can open a model file by double-clicking the model file in the tree.
By right-clicking in the explorer view, a popup menu is displayed with the following selections:
Syntax-Coloring Editor View
Model Editor provides with the ability to view and edit model files in a convenient way. It uses a color textual key to distinguish between model data elements and components, such as comment, keyword, operators, or a preprocessor symbol. Syntax-coloring enables you to quickly and correctly identify various elements of the model file.
The primary features of the editor view include:
- Text selection, insertion, and deletion
- Customizable syntax color highlighting
- Full support for Find/Replace
- Support for multiple Undo/Redo
- Support for drag-and-drop
- Line highlighting
Color Font setting
You can set the colors and fonts for the syntax-coloring editor.
The component view is associated with the active opened file and acts as a quick navigator for the data and components in the file. When the model file is opened in the editor view, the component hierarchy is displayed in this component view as a tree.
Different images are displayed before the object names to indicate the object type in the model file. You can quickly locate the data in the model file by double-clicking on the item in the component hierarchy tree.
Output Window — Parser Results
When a model file is opened for view and editing, you can select Tools — Parse to check the data. The appropriate parser is invoked to parse the given model file and display results in this output window. When errors are reported, you can double-click the message to quickly locate the line with the error.
Output Window — Find Results
You can find and replace text on active or all opened documents in Model Editor. All search or replace information is displayed in the Find Results window. You can double-click the message to quickly locate the contents in the editor.
Please share how you're using the new Model Editor in SPB16.3.
Jerry "GenPart" Grzenia