Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
VAMS-LRM-2-3-1.pdf
Скачиваний:
43
Добавлен:
05.06.2015
Размер:
3.73 Mб
Скачать

 

Accellera

Analog and Mixed-signal Extensions to Verilog HDL

Version 2.3.1, June 1, 2009

occur in a single-point dc analysis or the first point of a multipoint dc sweep analysis, but does not occur for subsequent points of a dc sweep.

During a dc sweep analysis, the values of variables at the conclusion of the operating point analysis for one dc point shall be used as the starting values for those variables for the next dc point. However, variable values shall not be carried over between two independent dc sweep analyses (from the last dc point of one analysis to the first dc point of the next analysis). Variables shall be re-initialized to zero (or x, for integers whose values are assigned in a digital context) at the start of each new analysis.

4.6.3 AC stimulus

A small-signal analysis computes the steady-state response of a system which has been linearized about its operating point and is driven by a small sinusoid. The sinusoidal stimulus is provided using the ac_stim() function. The general form is:

ac_stim ( [ analysis_name [ , mag [ , phase ] ] ] )

The AC stimulus function returns zero (0) during large-signal analyses (such as DC and transient) as well as on all small-signal analyses using names which do not match analysis_name. The name of a small-signal analysis is implementation dependent, although the expected name (of the equivalent of a SPICE AC analysis) is “ac”, which is the default value of analysis_name. When the name of the small-signal analysis matches analysis_name, the source becomes active and models a source with magnitude mag and phase phase. The default magnitude is one (1) and the default phase is zero (0). phase is given in radians.

4.6.4 Noise

Several functions are provided to support noise modeling during small-signal analyses. To model large-sig- nal noise during transient analyses, use the $random() or $arandom() system tasks. The noise functions are often referred to as noise sources. There are three noise functions, one models white noise processes, another models 1/f or flicker noise processes, and the last interpolates a vector to model a process where the spectral density of the noise varies as a piecewise linear function of frequency. The noise functions are only active in small-signal noise analyses and return zero (0) otherwise.

The syntax for noise functions is shown in Syntax 4-3.

analog_small_signal_function_call ::=

// from A.8.2

...

 

| white_noise ( analog_expression [ , string ] )

 

| flicker_noise ( analog_expression , analog_expression [ , string ] )

 

| noise_table ( noise_table_input_arg [ , string ] )

 

Syntax 4-3—Syntax for the noise functions

 

4.6.4.1 white_noise

White noise processes are those whose current value is completely uncorrelated with any previous or future values. This implies their spectral density does not depend on frequency. They are modeled using:

white_noise ( pwr [ , name ] )

which generates white noise with a power of pwr.

81

Copyright © 2009 Accellera Organization, Inc. All rights reserved.

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

For example, the thermal noise of a resistor could be modelled using:

I(a,b) <+ V(a,b)/R +

white_noise(4 * ‘P_K * $temperature/R, "thermal");

The optional name argument acts as a label for the noise source used when the simulator outputs the individual contribution of each noise source to the total output noise. The contributions of noise sources with the same name from the same instance of a module are combined in the noise contribution summary.

4.6.4.2 flicker_noise

The flicker_noise() function models flicker noise. The general form is:

flicker_noise ( pwr , exp [ , name ] )

which generates pink noise with a power of pwr at 1Hz which varies in proportion to 1/f exp.

The optional name argument acts as a label for the noise source used when the simulator outputs the individual contribution of each noise source to the total output noise. The contributions of noise sources with the same name from the same instance of a module are combined in the noise contribution summary.

4.6.4.3 noise_table

The noise_table() function interpolates a set of values to model a process where the spectral density of the noise varies as a piecewise linear function of frequency. The general form is:

noise_table ( input [ , name ] )

The argument input can either be a vector or a string indicating a filename.

When the input is a vector it contains pairs of real numbers: the first number in each pair is the frequency in Hertz and the second is the power. The vector can either be specified as an array parameter or an array assignment pattern.

When the input is a file name, the indicated file will contain the frequency / power pairs. The file name argument shall be constant and will be either a string literal or a string parameter. Each frequency / power pair shall be separated by a newline and the numbers in the pair shall be separated by one or more spaces or tabs. To increase the readability of the data file, comments may be inserted before or after any frequency / power pair. Comments begin with ‘#’ and end with a newline. The input file shall be in text format only and the numbers shall be real or integer.

The following shows an example of the input file:

#noise_table_input.tbl

#Example of input file format for noise_table

#

freq

pwr

 

1.0e0

1.657580e-23

 

1.0e1

3.315160e-23

 

1.0e2

6.636320e-23

 

1.0e3

1.326064e-22

 

1.0e4

2.652128e-22

 

1.0e5

5.304256e-22

 

1.0e6

1.060851e-21

Copyright © 2009 Accellera Organization, Inc.

82

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