O'Reilly logo

FPGAs 101 by Gina Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.3. Mathematical Functions

Mathematical functions, such as adder, subtractor, multiplier, and divider, are performed using arithmetic operators; see Table 2-1. The arithmetic operators can be used in concurrent and/or sequential statements; it depends on the circuit. To keep things simple, this example uses only a concurrent statement, and a sequential statement is demonstrated in later examples.

Table 2-1. Mathematical functions
Symbol Data Types Package
Accepts Returns
+Addition std_logic, integer, std_logic_vector std_logic_vector std_logic_unsigned
signed, unsigned, natural, integer signed, unsigned numeric_std
–Subtraction std_logic, integer, std_logic_vector, std_logic_vector std_logic_unsigned
signed, unsigned, natural, integer signed, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required