250+ TOP MCQs on All Keywords in VHDL – 1 and Answers

This set of VHDL Multiple Choice Questions & Answers (MCQs) 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
Answer: d
Clarification: 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?
a) OR
b) NOT
c) XNOR
d) XOR
Answer: c
Clarification: 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?
a) ACCESS
b) POINT
c) POINTER
d) USE
Answer: a
Clarification: 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.
a) Process
b) Architecture
c) Functions
d) Loop
Answer: b
Clarification: 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?
a) IS
b) IF
c) Assignment
d) When
Answer: c
Clarification: 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?
a) <=
b) =>
c) :=
d) >=
Answer: b
Clarification: 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?
a) TO
b) DOWNTO
c) ARRAY
d) GROUP
Answer: d
Clarification: 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?
a) Constant
b) Identifier
c) Variable
d) Signal
Answer: b
Clarification: 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?
a) BREAK
b) CONTINUE
c) EXIT
d) NULL
Answer: c
Clarification: 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 ______
a) BLOCK
b) PROCESS
c) FUNCTION
d) COMPONENT
Answer: a
Clarification: 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.