Package MCQ’s

Read Time:2 Minute, 30 Second

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

1. A package may consist of _________ design units.
a) 2
b) 3
c) 4
d) 5

2. Any item declared in a package declaration section are visible to _______
a) Every design unit
b) Package body only
c) Library containing that package
d) Design unit that USE the package

3. Which of the following is true about packages?
a) Package is collection of libraries
b) Library is collection of packages
c) Package is collection of entities
d) Entity is collection of packages

4. What do you call a constant declared in the package declaration, without its initial value specified?
a) Constant
b) Package constant
c) Deferred constant
d) Undefined constant

5. How to use a package in a VHDL design unit?
a)

USE PACKAGE package_name.part;

b)

    LIBRARY library_name;
    USE package_name.part;

c)

    LIBRARY library_name;
    USE library_name.package_name.part;

d)

USE library_name.package_name

6. Which of the following is the correct syntax to declare a package?
a)

     PACKAGE package_name IS
     declarations;
     END package_name;
     PACKAGE BODY package_name IS
     Functions and procedures descriptions;
     END package_name;

b)

     PACKAGE package_name IS
     declarations;
     PACKAGE BODY package_body_name IS
     Functions and procedures descriptions;
     END package_name;

c)

     PACKAGE package_name IS
     declarations;
     END package_name;
     PACKAGE BODY package_body_name IS
     Functions and procedures descriptions;
     END package_name;

d)

     PACKAGE package_name IS
     declarations;
     PACKAGE BODY package_name IS
     Functions and procedures descriptions;
     END package_name;

7. It is possible to use hierarchical libraries in VHDL.
a) True
b) False

8. Which of the following package is not synthesizable?
a)

     PACKAGE my_pack IS
     SIGNAL x : IN std_logic;
     END my_pack;

b)

    PACKAGE my_pack IS
    CONSTANT x : INTEGER := 5;
     END my_pack;

c)

     PACKAGE my_pack IS
     FUNCTION my_func RETURN BOOLEAN IS;
     END my_pack;
     PACKAGE BODY my_pack IS
     Function description;
     END my_pack;

d)

    PACKAGE my_pack IS
    TYPE color IS (red, green, blue);
    END PACKAGE;

9. Packages increases _______ of the code.
a) Reusability
b) Readability
c) Managing
d) Resolution

10. Among which of the following, it is necessary to declare a package body?
a)

     PACKAGE my_pack IS
     SIGNAL x : IN std_logic;
     END my_pack;

b)

    PACKAGE my_pack IS
    CONSTANT x : INTEGER := 5;
     END my_pack;

c)

     PACKAGE my_pack IS
     FUNCTION my_func RETURN BOOLEAN IS;
     END my_pack;

d)

    PACKAGE my_pack IS
    TYPE color IS (red, green, blue);
    END PACKAGE;

11. Which of the following is not a in-built package in VHDL?
a) STD_LOGIC_1164
b) TEXTIO
c) STANDARD
d) STD

12. It is possible to include another package in a package.
a) True
b) False

13. If a user wants to include his/her own package in the body, which library he/she must use?
a) STD
b) IEEE
c) WORK
d) STD_LOGIC

14. Which of the following can’t have multiple assignments or drivers?
a) STD_LOGIC
b) INTEGER
c) STD_ULOGIC
d) BIT

15. It is possible to modify the STD_LOGIC_1164 package of IEEE library.
a) True
b) False

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

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

Previous post Signal vs Variables – 2 MCQ’s
Next post Some Predefined Packages MCQ’s