Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ЛО САПР / VHDL.PDF
Скачиваний:
42
Добавлен:
17.04.2013
Размер:
5.27 Mб
Скачать

Expressions

Miscellaneous Arithmetic Operators

Foundation Express predefines the absolute value (abs) and exponentiation (**) operators for all integer types. There is one restriction placed on the ** operator. When you are using ** exponentiation, the left operand must be the computable value 2 (see the “Computable Operands” section of this chapter).

The following example shows how these operators are used. The figure that illustrates the synthesized design follows the example.

signal A, B: INTEGER range -8 to 7; signal C: INTEGER range 0 to 15; signal D: INTEGER range 0 to 3; A <= abs(B);

C <= 2 ** D;

B[0]

ND2

NR2

B[1]

 

IV

NR2

B[3]

IV

 

B[2]

 

D[1]

 

D[0]

 

 

IV

 

IV

X8666

 

A[0]

EN A[1]

EO A[2]

AN3 A[3]

NR2 C[0]

NR2 C[1]

NR2 C[2]

NR2 C[3]

Figure 4-6 Design with Arithmetic Operators

VHDL Reference Guide

4-13

Соседние файлы в папке ЛО САПР