Lec2.643 - EECE 643 Computer-Aided Circuit Engineering -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 EECE 643 Computer-Aided Circuit Engineering - Arithmetic Operations & Types In VHDL, constants, signals, variables, functions, and parameters can be declared with a type that defines and restricts their characteristics. Each object can hold or return values of these types. Each type has a set of values and a set of operations. When objects are assigned to a type, they are restricted to the values and operations for that type. - Altera recommends using the following types: - STD_LOGIC and STD_LOGIC_VECTOR types. These types are defined in IEEE Std 1164-1993. A copy of the STD_LOGIC_1164 package, which includes these types, is provided in the ieee library in the \maxplus2\max2vhdl \ieee directory. - BIT and BIT_VECTOR types. These types are defined in IEEE Std 1076-1987. A copy of the standard package, which includes these types, is provided in the std library in the \maxplus2\max2vhdl \std
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
directory. - Signed and Unsigned Types 1. Unsigned types represent numerical values of positive or zero only. “0110” represents +6, “1010” represents +10. 2. Signed types represent numerical values of positive, zero, or negative. “0110” represents +6, “1010” represents –6. - Conversion Functions The std_logic_ari th package in the ieee library includes three sets of functions to convert values between SIGNED and UNSIGNED types and the predefined type INTEGER. Four versions of each function are available; the correct version for each function call is determined through operator overloading. - CONV _INTEGER-Converts a parameter of type INTEGER, UNSIGNED, SIGNED, or STD_ULOGIC to an INTEGER value. The size of operands in CONV _INTEGER functions are limited to the range - 2147483647 to 2147483647, i.e., to a 31-bit UNSIGNED value or a 32-bit SIGNED value. -
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Lec2.643 - EECE 643 Computer-Aided Circuit Engineering -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online