VHDL Questions and Answers – All Keywords in VHDL – 1

«
»

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
View Answer

Answer: d
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.
advertisement

2. Which of the following keyword was not present before VHDL 93?
a) OR
b) NOT
c) XNOR
d) XOR
View Answer

Answer: c
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?
a) ACCESS
b) POINT
c) POINTER
d) USE
View Answer

Answer: a
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.
a) Process
b) Architecture
c) Functions
d) Loop
View Answer

Answer: b
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?
a) IS
b) IF
c) Assignment
d) When
View Answer

Answer: c
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.
advertisement

6. Which of the following assignment is associated with OTHERS keyword?
a) <=
b) =>
c) :=
d) >=
View Answer

Answer: b
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?
a) TO
b) DOWNTO
c) ARRAY
d) GROUP
View Answer

Answer: d
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?
a) Constant
b) Identifier
c) Variable
d) Signal
View Answer

Answer: b
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?
a) BREAK
b) CONTINUE
c) EXIT
d) NULL
View Answer

Answer: c
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.
advertisement

10. GUARDED keyword is associated with ______
a) BLOCK
b) PROCESS
c) FUNCTION
d) COMPONENT
View Answer

Answer: a
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.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn