Some Predefined Packages

VHDL

This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Some Predefined Packages”.

1. Which of the following package need not to be a part of the VHDL code?
a) STANDARD
b) STD_LOGIC_1164
c) TEXTIO
d) STD_LOGIC_ARITH

2. In which of the following library, the package STANDARD defined?
a) IEEE
b) STD
c) WORK
d) STD_LOGIC

3. Which of the following is not defined in the STANDARD package?
a) Basic data types
b) Functions for different operations for data types
c) Functions to read from the text files
d) Functions for arithmetic operators

4. Which statement is correct to include a package in the code where we need to read from and write to text files?
a) USE STD.TEXT.all;
b) USE STD.TEXTIO.all;
c) USE IEEE.TEXTIO.all;
d) USE IEEE.TEXT.all;

5. TEXTIO package is included in the code by default.
a) True
b) False

6. Among the four packages given below, which is the most used package of VHDL?
a) STD_LOGIC_1164
b) TEXTIO
c) STD_LOGIC_ARITH
d) NUMERIC_STD

7. The STD_LOGIC_1164 package is contained by _______ library.
a) STD
b) WORK
c) STD_LOGIC
d) IEEE

8. What is the most important use of STD_LOGIC_1164 package?
a) To define and use parallel operations
b) To use concurrent code
c) To use sequential code
d) Multi value logic system

9. Which package defines the data type STD_LOGIC_SIGNED?
a) STD_LOGIC_1164
b) STD_LOGIC_ARITH
c) STD_LOGIC_NUMERIC
d) IEEE

10. What is another name for STD_LOGIC_ARITH package?
a) STD_LOGIC_1164
b) STD_LOGIC_NUMERIC
c) NUMERIC_STD
d) ARITH_STD

11. The basic arithmetic function provided by STD_LOGIC_ARITH is for ______ data type.
a) STD_LOGIC_VECTOR
b) STD_LOGIC
c) INTEGER
d) CHARACTER

12. The following statement must be in _______ package.

TYPE my_type IS RANGE (0, 1);

a) STD_LOGIC_1164
b) STANDARD
c) STD_LOGIC_ARITH
d) IEEE

13. Which of the following package may contain the given statement?

TYPE color IS RANGE (red, green, blue, black)

a) STD_LOGIC_1164
b) STANDARD
c) STD_LOGIC_ARITH
d) WORK

14. Following lines are a part of _______ package.

TYPE my_type IS (‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘ L’, ‘H’, ‘-‘);

a) STANDARD
b) STD_LOGIC_ARITH
c) STD_LOGIC_1164
d) WORK

15. In STD_LOGIC_1164, the resolution function for ______ is not provided.
a) STD_LOGIC
b) STD_LOGIC_VECTOR
c) STD_ULOGIC
d) STD_ULOGIC_VECTOR

Leave a Reply

Your email address will not be published. Required fields are marked *