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

@(final_step) begin

 

if (crossings < 2)

 

$strobe("Could not measure period.");

 

else

 

$strobe("period = %g, crossings = %d",

 

latest-previous, crossings);

 

end

 

end

 

endmodule

 

Before the expression crosses zero (0) for the first time, the last_crossing() function returns a negative value.

4.5.11 Laplace transform filters

The Laplace transform filters implement lumped linear continuous-time filters. Each filter takes an optional parameter ε, which is a real number or a nature used for deriving an absolute tolerance (if needed). Whether an absolute tolerance is needed depends on the context where the filter is used. The zeros argument may be represented as a null argument. The null argument is characterized by two adjacent commas (,,) in the argument list.

4.5.11.1 laplace_zp

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

laplace_zp ( expr , ζ , ρ [ , ε ] )

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, ρ (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

 

 

s

 

 

 

1

 

H(s) =

 

ζ------------------kr + jζki

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

 

 

 

 

 

 

N – 1

 

 

 

s

 

 

 

 

1

ρ-------------------kr + jρki

 

k = 0

 

 

 

 

 

whereζrk andζki are the real and imaginary parts of the kth zero (0), 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 (0). If a root is complex, its conjugate shall also be present. If a root is zero, then the term associated with it is implemented as s, rather than(1 – s r) (where r is the root).

4.5.11.2 laplace_zd

laplace_zd() implements the zero-denominator form of the Laplace transform filter. The general form is:

laplace_zd ( expr , ζ , d [ , ε ] )

73

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

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

M – 1

s

 

1 –

ζ------------------kr + jζki

H(s) = -------------------------------------------k = 0

 

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

N – 1

dksk

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 complex, its conjugate shall also be present. If a zero is zero (0), then the term associated with it is implemented as s, rather than (1 – s ζ).

4.5.11.3 laplace_np

laplace_np() implements the numerator-pole form of the Laplace transform filter. The general form is

laplace_np ( expr , n , ρ [ , ε ] )

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

 

 

nksk

H(s) = N – 1

 

k = 0

 

 

 

s

1 –

 

ρ-------------------kr + 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 s, rather than (1 – s ρ).

4.5.11.4 laplace_nd

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

laplace_nd ( expr , n , d [ , ε ] )

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:

Copyright © 2009 Accellera Organization, Inc.

74

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