This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Data Objects and Types”.
1. What is the correct method to declare a SIGNED type signal ‘x’?
a) SIGNAL x : IN SIGNED
b) SIGNAL x : IN SIGNED
c) SIGNAL x : IN SIGNED (7 DOWNTO 0)
d) SIGNAL x : IN SIGNED_VECTOR (7 DOWNTO 0)
2. An UNSIGNED type is always greater than zero.
3. SIGNED and UNSIGNED data types are defined in which package?
a) std_logic_1164 package
b) std_logic package
c) std_logic_arith package
d) standard package
4. What is the decimal equivalent of x in the following code?
SIGNAL x : OUT SIGNED (3 DOWNTO 0 ); x <= “1101”;
5. What will be the value of x in the following code?
SIGNAL x : IN UNSIGNED (3 DOWNTO 0 ); x <= “1101”;
6. Which of the following option is completely legal, given that a and b are two UNSIGNED type signals?
a) x <= a + b; y <= a – b;
b) x <= a OR b; y <= a AND b;
c) x <= a + b; y <= a OR b;
d) x <= a OR b; y <= a + b;
7. What do we call the data type used for representing distance, current, voltage, time, etc?
8. If a and b are two STD_LOGIC_VECTOR input signals, then legal assignment for a and b is?
a) x <= a.b
b) x <= a OR b
c) x <= a + b
d) x <= a && b
9. What is the meaning of the base unit?
a) Smallest possible unit of any physical literal
b) SI unit of any physical literal
c) CGS unit for any physical literal
d) Fundamental building block of any design
10. SIGNAL a : REAL; which of the following is illegal assignment for a?
a) a <= 1.8
b) a <= 1.0 E10
c) a <= 1.0 E-10
d) a <=1.0 ns
11. Which of the following is only predefined physical literal in VHDL?
12. RECORD in VHDL is similar to________ in C.
13. Access types are similar to _________ in traditional programming languages.
14. Multidimensional arrays can be used for the implementation of memories.
15. What is the difference between SIGNAL and VARIABLE?
a) The value of SIGNAL never varies whereas VARIABLE can change its value
b) SIGNAL can be used for input or output whereas VARIABLE acts as intermediate signals
c) SIGNAL depends upon VARIABLE for various operations
d) SIGNAL is global and VARIABLE is local to the process in which it is declared