This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “All Keywords in VHDL – 1”.
1. What is the use of ABS keyword?
a) To use only complete number
b) To convert integer operand into real number
c) To convert decimal real operand into integer
d) To return absolute value of the operand
Explanation: ABS keyword is used to return the absolute value of the operand. It uses only one operand and returns its absolute value. This keyword is useful when we need absolute value after division.
2. Which of the following keyword was not present before VHDL 93?
Explanation: All the logic functions except EXNOR operation were present in VHDL 87. XNOR keyword was added in VHDL 93. To perform XNOR function, NOT and XOR were used collectively. It was not available to use.
3. Which of the following keyword is used to declare a pointer?
Explanation: An ACCESS type is very similar to the pointers in traditional programming languages like C etc. ACCESS type is always an address or a handle to a specific object.
4. ACCESS type can’t be used in ________ directly.
Explanation: Access types are always variable types. By the nature of access types, they can be used in sequential processing. Therefore, it can’t be used in architecture directly. Also, access type is not synthesizable in VHDL.
5. AFTER keyword is generally used with which of the following?
Explanation: Generally, AFTER keyword is generally used with concurrent assignment statement. It is used in conjunction with assignment statement to produce delays in assignment. For both type of delays, AFTER keyword is used.
6. Which of the following assignment is associated with OTHERS keyword?
Explanation: There are three assignment operators in VHDL. Among which <= is used for signal assignment and := is used for variable assignment. Third assignment operate is => used with OTHERS keyword only.
7. Which of the following keyword is not associated with arrays?
Explanation: TO and DOWNTO are the keywords used to describe the range of array and the array keyword is used for defining an array type in VHDL. Moreover, GROUP has nothing to do with arrays. It is used to group some names.
8. Which of the following is not a reserved word in VHDL?
Explanation: Constant, Variable and Signal are the reserved words for defining three different types of data objects. However, identifier is a name and not a keyword. It is not in the list of reserved words of VHDL.
9. Which of the following is a reserved word, which may be used to terminate a loop?
Explanation: There is only one keyword in VHDL which may be used to terminate the loop which is EXIT. There is no keyword like BREAK and CONTINUE. Only EXIT is used to come out of the loop and start concurrent statements.
10. GUARDED keyword is associated with ______
Explanation: GUARDED is a reserved word used to define a guarded block. A guarded block is like a block that executes conditionally. It contains some guard expression which is first simplified and then only the block is executed.
Sanfoundry Global Education & Learning Series – VHDL.
To practice all areas of VHDL, here is complete set of 1000+ Multiple Choice Questions and Answers.