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

Virtuoso AMS Environment User Guide

Producing Customized Netlists

Parameter Object

The parameter object contains information about both cellview parameters and instance parameters. Parameters for the cellview come primarily from the base cell CDF, but can also come from pPar references on instance properties and from [@ and [+ NLP expressions on instances. Parameters for instances come either from the base cell CDF of the instance master cellview or from the database properties placed on the instance.

The parameter object always contains the final evaluated value that would be written to the netlist in the absence of any netlisting procedures. Consequently, you do not have to parse any AEL or NLP expressions or track the ams.env variables that affect the parameters.

The parameter object for a cellview is created just prior to calling the parametersProc netlisting procedure and is destroyed when the cellview object is destroyed. The parameter object for an instance is created when the instance is created and is destroyed when the instance is destroyed. As a consequence, to view the fields you need to ask for the information during the netlisting run. You might, for example, use statements like the following in your netlisting procedures override file to obtain a list of the fields.

(defun myPrintParameters (formatterId cvId)

cellview_params = cvId->parameters

;;Consider each parameter (foreach param cellview_params

(printf "Param fields: %L\n" param->?) );; foreach

;;Call the default print parameters function. amsPrintParameters(formatterId cvId)

);;defun

;; Set up the custom netlist procedure netId = amsGetNetlister()

vlog = netId->vlog

vlog->parametersProc = ’myPrintParameters

Running these statements, you find that the parameter object contains the following fields.

Field

Value

Meaning of the Value

 

 

 

name

string

Name of the parameter (as used in the

 

 

Verilog-AMS netlist).

cdfName

string

Name of the parameter (as used in the

 

 

CDBA).

type

string

Type of the parameter (as used when

 

 

declaring the parameter).

April 2004

331

Product Version 5.3

Virtuoso AMS Environment User Guide

Producing Customized Netlists

Field

Value

Meaning of the Value

 

 

 

dbType

symbol int / float,

Type of the parameter (as found in the DB/

 

string / ael /

CDF).

 

aelNoNum / aelNum

 

value

string, integer, or

Value of the parameter. This is a print-

 

float (as specified by ready string which already contains

 

type).

quotation marks, if quotation marks are

 

 

required.

isDefault

boolean t/nil

t means the value is specified in the base

 

 

cell CDF defaults; nil means the value is

 

 

overridden on the instance.

owner

amsobject

Cellview or instance object to which the

 

 

parameter belongs.

ignore

boolean t/nil

t means the parameter is to be left out of

 

 

the netlist; nil means the parameter is to

 

 

be included in the netlist.

 

 

 

Except for value and ignore, these fields are read-only. You can assign a new value to the value field. You can change the value of theignore field to control whether or not the parameter is printed. Note that you cannot change the value of the type field so any changed value for the value field must be the same type as the original.

Instance Object

The instance object contains information about a particular instance of a cellview.

The instance object is created before calling any of the instanceProc, instanceMasterNameProc, instanceParametersProc, or instancePortsProc netlisting procedures and is destroyed when the netlisting procedure returns. As a consequence, to view the fields you need to ask for the information during the netlisting run. You might, for example, use statements like the following in your netlisting procedures override file to obtain a list of the fields.

(defun myPrintInstance (formatterId cvId instanceId)

(printf "\n/*\n Instance fields: %L \n*/\n" instanceId->?)

;;call the default print instance function. (amsPrintInstance formatterId cvId instanceId) );;defun

;;Set up the custom netlist procedure

netId = amsGetNetlister()

April 2004

332

Product Version 5.3

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