Hardware Reference
In-Depth Information
• arithmetische Operatoren:
function
"-"
(x: tSigned)
return
tSigned;
-- (1)
function
"abs"
(x: tSigned)
return
tSigned;
-- (1)
function
"+"
(a, b: tUnsigned)
return
tUnsigned;
-- (2)
function
"+"
(a, b: tSigned)
return
tSigned;
-- (2)
function
"-"
(a, b: tUnsigned)
return
tUnsigned;
-- (2)
function
"-"
(a, b: tSigned)
return
tSigned;
-- (2)
function
"*"
(a, b: tUnsigned)
return
tUnsigned;
-- (3)
function
"*"
(a, b: tSigned)
return
tSigned;
-- (3)
function
"/"
(a, b: tUnsigned)
return
tUnsigned;
-- (4)
function
"/"
(a, b: tSigned)
return
tSigned;
-- (4)
function
"rem"
(a, b: tUnsigned)
return
tUnsigned;
-- (5)
function
"rem"
(a, b: tSigned)
return
tSigned;
-- (5)
function
"mod"
(a, b: tUnsigned)
return
tUnsigned;
-- (5)
function
"mod"
(a, b: tSigned)
return
tSigned;
-- (5)
(1) Negation und Betragsbildung. Indexbereich des Ergebnisses:
x'length-1 downto 0
(2) Addition und Subtraktion. Indexbereich des Ergebnisses:
max(a'length, b'length) - 1 downto 0
(3) Multiplikation. Indexbereich des Ergebnisses:
a'length+b'length-1 downto 0
(4) Division. Indexbereich des Ergebnisses:
a'length-1 downto 0
Bei einer Division durch Null wird im Simulations-Package das Ergebnis
auf ungültig gesetzt und eine Warnung ausgegeben.
(5) Divisionsrest und Modulo-Operation. Indexbereich des Ergebnisses:
b'length-1 downto 0
Bei einer Division durch Null wird im Simulations-Package das Ergebnis
auf ungültig gesetzt und eine Warnung ausgegeben.
• logische Operatoren:
function
"not"
(a: tUnsigned)
return
tUnsigned;
function
"not"
(a: tSigned)
return
tSigned;
function
"and"
(a: tUnsigned)
return
tUnsigned;
function
"and"
(a: tSigned)
return
tSigned;
function
"nand"
(a: tUnsigned)
return
tUnsigned;
function
"nand"
(a: tSigned)
return
tSigned;
function
"or"
(a: tUnsigned)
return
tUnsigned;
function
"or"
(a: tSigned)
return
tSigned;
function
"nor"
(a: tUnsigned)
return
tUnsigned;
function
"nor"
(a: tSigned)
return
tSigned;
function
"xor"
(a: tUnsigned)
return
tUnsigned;
function
"xor"
(a: tSigned)
return
tSigned;
function
"xnor"
(a: tUnsigned)
return
tUnsigned;
function
"xnor"
(a: tSigned)
return
tSigned;