User Defined Models and Parameter Mapping Rules

User Defined Models

Spectre functions are single line expressions, all arguments are real and can be defined at the top level only. Only functions of the type "real" are supported. The following example shows how Spectre Functions are translated into their ADS equivalent.

Spectre Netlist syntax:

real myfunc \( \[real arg1, ... real argn\] \{
  return <expr of arg1..argn>
\}

ADS Netlist syntax:

myfunc\(arg1, ... argn\)=<expr of arg1..argn>
Note
This document refers to source dialect to indicate a generic modelling dialect. The rules and examples relate to any modelling dialect, including Spectre.

The Spectre mapping rules reside in a file called spectre.rul . The file can be edited or copied for your customizing needs. Customizing can consist of modifying the mapping rules for existing model translations or adding new models to the translation portfolio.

OpenTranslator Mapping Rules

Type

This refers to the type of entry in the map file. This is necessary because some spice dialects can have the same InputName for components and models. This distinguishes those cases from each other.

The following are possible entries:

Input Name

This is the identifier that source dialect uses to indicate the type of component.

Output Name

This is the reference used to indicate the type of ADS component. This is a comma delimited list to support the mapping of many names. This is useful, for example, if you need to map to a different name depending upon if you are generating IFF versus Netlist output.

Pin Mapping

The pin mapping is straight forward. Each pin has a comma delimiter and groups have a semi-colon delimiter. The following is an example:

|1,2;2,1|

Here source dialect pin #1 maps to ADS pin #2 and source dialect pin #2 maps to ADS pin #1

Parameter Mapping

Parameters are mapped in the order of source dialect parameter, ADS parameter, then source dialect default value. If the source dialect and ADS names are the same, only list the source dialect name. If the source dialect and ADS default values are the same, do not list the source dialect default value. The following is an example:

|c, C, 0.0|

Here "c" is the source dialect parameter name, "C" is the ADS parameter name (case sensitive), and the default is set to 0.0.

Multiple Parameters Mapping to a Single ADS Parameter


If there are multiple parameters that map to the same ADS parameter name, they will be separated with a tilde. The following is the general rule:

|X[~Y ~Z],[W],[value];...|

The following is an example:

|R,,50;W~Width,Width,;...|

Here the source dialect parameter "R" maps to ADS parameter "R" and it will use the default value of 50. Note that only list the source dialect name is listed since ADS uses the same name. In the second case, either "W" or "Width" can be the source dialect parameter and they both map to the ADS parameter "Width". Note that the default value is not specified since source dialect and ADS use the same value.

Perl Callbacks

There are two entries for Perl callbacks. The first is the Perl file and the second is the Perl routine to be called.

The order of the callbacks are as follows:

  1. Component name
  2. Pin operations
  3. Parameter name
  4. Model operations
  5. Last Chance

The order of the callbacks is the same as the order of the map rule structure with the addition of the two callbacks, Model operations and Last Chance.

Component name

The Component name callback will map source dialect component names to the appropriate ADS name. This is necessary to support either Netlist output or IFF output from the translator.

Pin operations

The Pin operations callback can handle more sophisticated pin manipulation than just straight pin mappings. For example, some BJT devices require either three or four pins depending upon the configuration.

Parameter name

The Parameter name callback will translate the source dialect parameter names to ADS names that are listed in the rules file.

Model operations

The Model operations callback handles cases where more model processing is needed that just a straight across mapping.

Last Chance

The Last Chance callback is user configurable and is the last called in the sequence of callbacks.

Perl Callback Syntax

The following is the rule syntax for callbacks:

| filename , callback ; [ filename ,] callback ;...|

Note
Any entry that does not have filename listed is assumed to be a callback in the last known filename.

The following is an example:

|bsim.pl,model_mapping;,param_mapping|

Here, at the appropriate time during post processing the Perl code will call bsim.pl to source the perl file and then call the routine model_mapping.
The next routine that will be called is param_mapping and it is assumed to be in the same file.

The following paths will be searched to locate the Perl files:

Where dialect could be anything you want to call it; dialect will be set from the command line argument -pl <dialect>.

Note
The continuation character \ can be used at any time to keep the line from getting excessively long.

The comment character # can be used at the beginning of any line.

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources