My Report

VHDL Mock Test 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. One can perform basic operations between different data types.

Question 1 of 10

Question 2 of 10

2. Look at the following declarations:

TYPE array1 IS ARRAY ( 0 TO 3 ) OF BIT_VECTOR (3 DOWNTO 0 ); 
TYPE array 2 IS ARRAY ( 0 TO 3 ) OF array1;

How many total bits can be stored in these arrays?

Question 2 of 10

Question 3 of 10

3. Which of the following package of IEEE contains most of the data conversion functions?

Question 3 of 10

Question 4 of 10

4. One can’t define an array without any constraints in VHDL.

Question 4 of 10

Question 5 of 10

5. A VARIABLE y is declared of STD_LOGIC_VECTOR type of 4 bits, if you want to assign 1001 to y, then what is the write assignment statement?

Question 5 of 10

Question 6 of 10

6. Which of the circuit is described by following VHDL code?

LIBRARY IEEE;
USE IEEE.std_logic_1164.all;
ENTITY my_func IS
PORT(x, a, b : IN std_logic;
q : OUT std_logic);
END my_func;
ARCHITECTURE behavior OF my_func IS
SIGNAL s : INTEGER;
BEGIN
WITH s SELECT
q <= a AFTER 10 ns WHEN 0;
         b AFTER 10 ns WHEN 1;
s <= 0 WHEN x = ‘0’ ELSE
        1 WHEN x = ‘1’;
END behavior;

Question 6 of 10

Question 7 of 10

7. Which of the following is not an assignment operator?

Question 7 of 10

Question 8 of 10

8. What is the use of simulation deltas in VHDL code?

Question 8 of 10

Question 9 of 10

9. How to correctly assign the value of 2x+10 to y in the following VHDL code?

TYPE long IS INTEGER RANGE -1000 TO 1000;
TYPE short IS INTEGER RANGE -10 TO 10;
SIGNAL x : short;
SIGNAL y : long;

Question 9 of 10

Question 10 of 10

10. If we are using conv_integer(p) function, then which of the following cannot be the type of parameter ‘p’?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.