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

The min(), max(), and abs() functions have discontinuous derivatives; it is necessary to define the behavior of the derivative of these functions at the point of the discontinuity. In this context, these functions are defined so:

min(x,y) is equivalent to (x < y) ? x : y max(x,y) is equivalent to (x > y) ? x : y abs(x) is equivalent to (x > 0) x : –x

4.3.2 Transcendental functions

The trigonometric and hyperbolic functions supported by Verilog-AMS HDL are shown in Table 4-15. All operands shall be numeric (integer or real) and are converted to real if necessary. Arguments to the trigonometric functions (sin, cos, tan) and return values of the inverse trigonometric functions (asin, acos, atan, atan2) are in radians. Input values outside of the valid range for the operator shall report an error.

Table 4-15—Trigonometric and hyperbolic functions

Verilog function

Traditional

Equivalent C

 

 

Verilog-AMS

Description

Domain

style

function

function style

 

 

 

 

 

 

 

 

 

 

 

$sin(x)

sin(x)

sin(x)

Sine

All x

$cos(x)

cos(x)

cos(x)

Cosine

All x

$tan(x)

tan(x)

tan(x)

Tangent

x != n (π / 2), n is odd

$asin(x)

asin(x)

asin(x)

Arc-sine

-1 <= x <= 1

$acos(x)

acos(x)

acos(x)

Arc-cosine

-1 <= x <= 1

$atan(x)

atan(x)

atan(x)

Arc-tangent

All x

$atan2(y,x)

atan2(y,x)

atan2(y,x)

Arc-tangent of y/x

All x, all y ;

 

 

 

 

atan2(0,0) = 0

$hypot(x,y)

hypot(x,y)

hypot(x,y)

x2 + y2

All x, all y

$sinh(x)

sinh(x)

sinh(x)

Hyperbolic sine

All x

$cosh(x)

cosh(x)

cosh(x)

Hyperbolic cosine

All x

$tanh(x)

tanh(x)

tanh(x)

Hyperbolic tangent

All x

$asinh(x)

asinh(x)

asinh(x)

Arc-hyperbolic sine

All x

$acosh(x)

acosh(x)

acosh(x)

Arc-hyperbolic cosine

x >= 1

$atanh(x)

atanh(x)

atanh(x)

Arc-hyperbolic tangent

-1 < x < 1

4.4 Signal access functions

Access functions are used to access signals on nets, ports, and branches. There are two types of access functions, branch access functions and port access functions. The name of the access function for a signal is taken from the discipline of the net, port, or branch where the signal or port is associated and utilizes the () operator. A port access function also takes its name from the discipline of the port to which it is associated but utilizes the port access (< >) operator.

If the signal or port access function is used in an expression, the access function returns the value of the signal. If the signal access function is being used on the left side of a branch assignment or contribution state-

59

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

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