

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Type Possible values Operation(by priority) Example INTEGER At least -2147483647~
= /= < <= > >= REAL At least: -1.0E38 ~ 1.0E
= /= < <= > >= TIME At least: -2147483647 ~ (fs, ps, ns, us, ms, sec, min, hr)
= /= < <= > >= BIT ‘0’,’1’ NOT = /= < <= > >= AND NAND OR NOR XOR XNOR BIT_VECT OR
Unconstrained array of BIT
128 characters in VHDL’87 [ISO 646-1983] 256 characters in VHDL’93 [ISO 8859-1 : 1987(E)] STRING Unconstrained array of CHARACTER
architecture sample1 of consts is signal A, B, Z : integer range 0 to 3; constant A1: real :=0.1231; constant PERIOD : time := 50 ns; signal A2 : bit := ’1’; signal A3, B3, Z3: bit_vector (1 downto 0); constant A4: Boolean :=FALSE; constant A5: charater :=’c’; constant A6: string := "This is a string"; begin A <= 2; A2 <= not A2 after PERIOD*2; A3 <= "10"; B3<=” 11” process(Z3,A3,B3) begin if Z3 = '1' then Z 3<= A3; else Z3 <= B3; end if; end process;
end smaple1;
Logical operators The logical operators and, or, nand, nor, xor and xnor are used to describe Boolean logic operations, or perform bit-wise operations, on bits or arrays of bits.
Operator Description Operand Types Result Types
and And Any Bit or Boolean type Same Type
or Or Any Bit or Boolean type Same Type
nand Not And Any Bit or Boolean type Same Type
nor Not Or Any Bit or Boolean type Same Type
xor Exclusive OR Any Bit or Boolean type Same Type
xnor Exclusive NOR Any Bit or Boolean type Same Type
Relational operators Relational operators are used to test the relative values of two scalar types. The result of a relational operation is always a Boolean true or false value.
Operator Description Operand Types Result Type
= Equality Any type Boolean /= Inequality Any type Boolean
< Less than Any scalar type or discrete array Boolean <= Less than or equal Any scalar type or discrete array Boolean
Greater than Any scalar type or discrete array Boolean
= Greater than or equal^ Any scalar type or discrete array^ Boolean
Adding operators The adding operators can be used to describe arithmetic functions or, in the case of array types, concatenation operations.
Operator Description Operand Types Result Type
& Concatenation Any numeric type Same type
& Concatenation^ Any array or element type^ Same array type
Multiplying operators The multiplying operators can be used to describe mathematical functions on numeric types.
Note: Synthesis tools vary in their support for multiplying operators.
Operator Description Operand Types Result Type
Same as left
Same as left
Same as right