05 Arithmetic in VHDL
05 Arithmetic in VHDL 05 Arithmetic in VHDL
Arithmetic Package Functions- II • Signed Arithmetic Functions: Function Argument 1 Argument 2 Returns + signed signed signed signed integer signed - signed signed signed signed integer signed • i.e. functions to add/ subtract signed numbers – Note integer as a +ve/ -ve argument for signed op’s 118
Arithmetic Package Functions- III • Unsigned Arithmetic Functions: Function Argument 1 Argument 2 Returns + unsigned unsigned unsigned unsigned natural unsigned unsigned unsigned unsigned - unsigned natural unsigned • i.e. functions to add/ subtract unsigned numbers – Note natural as a +ve only argument since no notion of sign 119
- Page 1 and 2: Arithmetic Packages- Introduction
- Page 3 and 4: Arithmetic Package Overview- II •
- Page 5 and 6: Declaring Arithmetic Signals & Vari
- Page 7: Arithmetic Package Functions- I •
- Page 11 and 12: Arithmetic Package Functions- V •
- Page 13 and 14: Arithmetic Package Functions- VII
- Page 15 and 16: Arithmetic Package Example- I • S
- Page 17 and 18: Arithmetic Package Example- III •
<strong>Arithmetic</strong> Package Functions- III<br />
• Unsigned <strong>Arithmetic</strong> Functions:<br />
Function Argument 1 Argument 2 Returns<br />
+<br />
unsigned unsigned unsigned<br />
unsigned<br />
natural<br />
unsigned<br />
unsigned<br />
unsigned<br />
unsigned<br />
-<br />
unsigned<br />
natural<br />
unsigned<br />
• i.e. functions to add/ subtract unsigned numbers<br />
– Note natural as a +ve only argument s<strong>in</strong>ce no notion of sign<br />
119