Добавил:
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

M – 1

 

nksk

 

k = 0

 

H(s) = -------------------

 

N – 1

 

dksk

 

k = 0

 

where nk is the coefficient of the kth power of s in the numerator and dk

is the coefficient of the kth power

of s in the denominator.

 

4.5.11.5 Examples

 

V(out) <+ laplace_zp(V(in), '{-1,0}, '{-1,-1,-1,1});

implements

 

 

 

 

H(s) =

 

1 + s

 

 

s

 

s

 

1 +

1 +

 

1----------+ j

1---------- j

 

 

and

V(out) <+ laplace_nd(V(in), '{0,1}, '{-1,0,1});

implements .

 

H(s) =

s

s-------------2 – 1

This example

V(out) <+ laplace_zp(white_noise(k), , '{1,0,1,0,-1,0,-1,0});

implements a band-limited white noise source as .

 

 

 

 

k

 

 

vout2

=

 

 

 

s2 – 1

 

2

 

 

 

 

 

 

 

4.5.12 Z-transform filters

The Z-transform filters implement linear discrete-time filters. Each filter supports a parameter T which specifies the sampling period of the filter. A filter with unity transfer function acts like a simple sample-and-hold which samples every T seconds and exhibits no delay. The zeros argument may be represented as a null argument. The null argument is characterized by two adjacent commas (,,) in the argument list.

All Z-transform filters share three common arguments: T, τ, and t0. T specifies the period of the filter, is mandatory, and shall be positive. τ specifies the transition time, is optional, and shall be nonnegative.

If the transition time is specified and is non-zero, the timestep is controlled to accurately resolve both the leading and trailing corner of the transition. If it is not specified, the transition time is taken to be one (1) unit

75

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

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

of time (as defined by the `default_transition compiler directive) and the timestep is not controlled to resolve the trailing corner of the transition. If the transition time is specified as zero (0), then the output is abruptly discontinuous. A Z-filter with zero (0) transition time shall not be directly assigned to a branch.

Finally t0 specifies the time of the first transition, and is also optional. If not given, the first transition occurs at t=0.

4.5.12.1 zi_zp

zi_zp() implements the zero-pole form of the Z-transform filter. The general form is:

zi_zp ( expr , ζ , ρ , T [ , τ [ , t0 ] ] )

where ζ (zeta) is a vector of M pairs of real numbers. Each pair represents a zero, the first number in the pair is the real part of the zero (0) and the second is the imaginary part. Similarly, ρ (rho) is the vector of N real pairs, one for each pole. The poles are given in the same manner as the zeros. The transfer function is

 

M – 1

 

1 – z–1kr + jζki )

H(z) =

--------------------------------------------------k = 0

 

N – 1

 

1 – z–1kr + jρki )

 

k = 0

where ζrk and ζki are the real and imaginary parts of the kth zero, while ρrk and ρki are the real and imaginary parts of the kth pole. If a root (a pole or zero) is real, the imaginary part shall be specified as zero. If a root is complex, its conjugate shall also be present. If a root is zero (0), then the term associated with it is implemented as z, rather than (1 – z r) (where r is the root).

4.5.12.2 zi_zd

zi_zd() implements the zero-denominator form of the Z-transform filter. The form is:

zi_zd ( expr , ζ , d , T [ , τ [ , t0 ] ] )

where ζ (zeta) is a vector of M pairs of real numbers. Each pair represents a zero, the first number in the pair is the real part of the zero and the second is the imaginary part. Similarly, d is the vector of N real numbers containing the coefficients of the denominator. The transfer function is

 

M – 1

 

1 – z–1kr + jζki )

H(z) =

k = 0

--------------------------------------------------

 

N – 1

 

dkzk

 

k = 0

where ζrk and ζki are the real and imaginary parts of the kth zero, while dk is the coefficient of the kth power of s in the denominator. If a zero is real, the imaginary part shall be specified as zero (0). If a zero is

Copyright © 2009 Accellera Organization, Inc.

76

 

Accellera

Analog and Mixed-signal Extensions to Verilog HDL

Version 2.3.1, June 1, 2009

complex, its conjugate shall also be present. If a zero is zero (0), then the term associated with it is implemented as z, rather than (1 – z ζ).

4.5.12.3 zi_np

zi_np() implements the numerator-pole form of the Z-transform filter. The general form is:

zi_np ( expr , n , ρ , T [ , τ [ , t0 ] ] )

where n is a vector of M real numbers containing the coefficients of the numerator. Similarly, ρ (rho) is a vector of N pairs of real numbers. Each pair represents a pole, the first number in the pair is the real part of the pole and the second is the imaginary part. The transfer function is

M – 1

 

nkzk

H(z) =

k = 0

N-------------------------------------------------- 1

 

1 – z–1kr + jρki )

 

k = 0

where nk is the coefficient of the kth power of s in the numerator, while ρrk and ρki are the real and imaginary parts of the kth pole. If a pole is real, the imaginary part shall be specified as zero (0). If a pole is complex, its conjugate shall also be present. If a pole is zero (0), then the term associated with it is implemented as z, rather than (1 – z ρ).

4.5.12.4 zi_nd

zi_nd() implements the numerator-denominator form of the Z-transform filter. The general form is:

zi_nd ( expr , n , d , T [ , τ [ , t0 ] ] )

where n is an vector of M real numbers containing the coefficients of the numerator and d is a vector of N real numbers containing the coefficients of the denominator. The transfer function is

 

M – 1

 

nkzk

H(z) =

k = 0

----------------------

 

N – 1

 

dkzk

 

k = 0

where nk is the coefficient of the kth power of s in the numerator and dk is the coefficient of the kth power of s in the denominator.

4.5.13 Limited exponential

The limexp() function is an operator whose internal state contains information about the argument on previous iterations. It returns a real value which is the exponential of its single real argument, however, it internally limits the change of its output from iteration to iteration in order to improve convergence. On any iteration where the change in the output of the limexp() function is bounded, the simulator is prevented

77

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

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

from terminating the iteration. Thus, the simulator can only converge when the output of limexp() equals the exponential of the input. The general form is:

limexp ( expr )

The apparent behavior of limexp() is not distinguishable from exp(), except using limexp() to model semiconductor junctions generally results in dramatically improved convergence. There are different ways of implementing limiting algorithms for the exponential1 2.

Other nonlinearities besides the exponential may be in behavioral models. The $limit() system function described in 9.17.3 provides a method to indicate these nonlinearities to the simulator to improve convergence.

4.5.14 Constant versus dynamic arguments

Some of the arguments to the analog operators described in this section, the events described in Clause 5, and the $limit() function in 9.17.3 expect dynamic expressions and others expect constant expressions. The dynamic expressions can be functions of circuit quantities and can change during an analysis. The constant expressions remain static throughout an analysis.

Table 4-20 summarizes the arguments of the analog operators defined in this section.

Table 4-20—Analog operator arguments

Operator

Constant expression arguments

Dynamic expression arguments

 

 

 

absdelay

maxdelay

expr, td

ddt

abstol

expr

ddx

wrt_what

expr

idt

abstol

expr, ic, assert

idtmod

abstol

expr, ic,modulus, offset

laplace_zp

poles, abstol, zero

expr

laplace_zd

 

 

laplace_np

 

 

laplace_nd

 

 

last_crossing

 

expr, dir

limexp

 

expr

slew

 

expr, max_pos_slew_rate,

 

 

max_neg_slew_rate

transition

time_tol

expr, td, rise_time,

 

 

fall_time

zi_zp

zeros, poles, T , t0

expr, t

zi_zd

 

 

zi_np

 

 

zi_nd

 

 

1Laurence W. Nagel, "SPICE2: A computer program to simulate semiconductor circuits," Memorandum No. ERL-M520, University of California, Berkeley, California, May 1975.

2W. J. McCalla, Fundamentals of Computer-Aided Circuit Simulation. Kluwer Academic Publishers, 1988.

Copyright © 2009 Accellera Organization, Inc.

78

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