Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
AMS.pdf
Скачиваний:
70
Добавлен:
05.06.2015
Размер:
2.68 Mб
Скачать

Virtuoso AMS Environment User Guide

Netlisting

Notice the elaboration_binding attribute in the netlist. When amsScalarInstances is set to t, the elaborator uses this attribute to determine what the master iterated instance is, and therefore what the instance binding is, for each of the logical copies. When amsScalarInstances is set to nil, the elaboration_binding attribute is unnecessary and does not appear in the netlist.

(For more information about the amsScalarInstances variable, see “amsScalarInstances” on page 386.)

Passing Model Names as Parameters

This section describes how the AMS netlister handles the modelname, model, modelName, and componentName parameters. For additional information, see “Special Handling of model, modelName, modelname, and componentName” on page 597.

Effect of the modelname, model, and modelName Parameters

The modelname, model, and modelName parameters (together referred to as model* parameters) allow you to pass a model name through the hierarchy. A model* parameter must be an AEL expression that has parseAsCEL = t and parseAsNumber = nil. The AMS netlister handles a model* parameter as follows.

If the value of the parameter is a...

Then the AMS netlister...

 

 

Literal string, for example,

Evaluates it as a literal (foo)

model="foo"

 

pPar expression, for example, model="pPar("foo")"

iPar expression that resolves to a literal, for example, model="iPar("foo")", foo="bar"

Evaluates it to be the parameter (foo), which must be declared as a parameter to the module being netlisted (parameter foo=defVal;)

The netlister also instantiates an analogmodel construct.

Replaces the name of the cell on the instantiation to which the modelname parameter applies

The examples below illustrate these scenarios. These examples use the modelname parameter to pass model names, but they could also use model or modelName.

April 2004

134

Product Version 5.3

Virtuoso AMS Environment User Guide

Netlisting

Example 1

Assume an instance, i0, of a pmos device to be bound to a model called pmos395.

If i0 has the parameter modelname="pmos395" the resulting Verilog-AMS netlist contains the following instantiation:

pmos395 #(.l(3u), .w(9.5u)) (*integer library_binding = "analogLib";*) i0 ( .D( vref3 ), .G( vref1 ), .S( cds_globals.\vdd! ) );

The syntax used for the Verilog-AMS instance in this case is:

model_name #(prop_list) (* attr_list *) inst_name (port_connections);

Example 2

Assume an instance, i0, of a pmos device to be bound to a model called pmos395.

If i0 has the parameter modelname=pPar("mod1") and the default value for mod1 in the pmos instance master CDF is "pmos395", the resulting Verilog-AMS netlist contains the following parameter declaration and analogmodel instantiation:

parameter mod1="pmos395";

...

analogmodel #(.l(3u), .w(9.5u)) , .modelname(mod1) ) (*integer library_binding = "analogLib";*)

i0 ( .D( vref3 ), .G( vref1 ), .S( cds_globals.\vdd! ) );

The syntax used for the Verilog-AMS in this case is:

analogmodel #(prop_list) (* attr_list *) inst_name (port_connections);

Note that in example 1, the name of the model is used. In example 2, the keyword analogmodel is used along with the parameter, modelname, which is set to the parameter specifying the name of the model.

Example 3

Assume an instance, i0, of a pmos device to be bound to a model called pmos395.

A modelname parameter value that is an iPar expression results in the same behavior as a literal string. The AMS netlister finds the parameter referenced in the iPar expression on the instance and replaces the iPar expression with the value of the parameter. For example, given:

modelname=iPar("foo")

foo="pmos395"

April 2004

135

Product Version 5.3

Virtuoso AMS Environment User Guide

Netlisting

The AMS netlister resolves this to:

modelname="pmos395"

The resulting instantiation is:

pmos395 #(.l(3u), .w(9.5u)) (*integer library_binding = "analogLib";*) i0 ( .D( vref3 ), .G( vref1 ), .S( cds_globals.\vdd! ) );

The syntax used for the Verilog-AMS instance in this case is:

model_name #(prop_list) (* attr_list *) inst_name (port_connections);

This is the same as the Verilog-AMS produced in example 1.

Handling of the model* and componentName Parameters

The values of the model* and componentName parameters are considered to be literal strings, and are substituted for the cell name of the instances to which they apply. If the AMS netlister detects a Par expression in the value of any of the model* parameters, it uses the analogmodel construct as explained in the previous section. However the value of componentName must be a literal string.

When the values of the model, modelName, and componentName parameters are of type string, their values are substituted for the cell name of the instance to which they apply. This is the behavior illustrated in “Example 1” on page 135.

If, rather than simple string literals, the values of the model* parameters are AEL expressions like pPar("mod1"), the parameters are handled as described in “Example 2” on page 135. In this case, the AMS netlister generates an analogmodel construct using the parameter modelname rather than what is found in the CDBA data (model or modelName).

The componentName parameter is always handled as in “Example 1” on page 135. If the value of a componentName parameter is an AEL expression, the AMS netlister produces an error message and does not generate a netlist.

Precedence of the model* and componentName Parameters

When an instance has more than one model* or componentName parameter, the modelname parameter has the highest precedence, followed by model, modelName, and componentName.

April 2004

136

Product Version 5.3

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]