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
|+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, ...|