VHDL Questions and Answers – Process Statement – 2

This set of VHDL Quiz focuses on “Process Statement – 2”.

1. It is possible to use sensitivity list and wait statements in the same process.
a) True
b) False
View Answer

Answer: b
Explanation: The sensitivity list and wait statements can’t be used simultaneously in the same process. One can either use sensitive list or wait statements in a process. Both of them are used to define the signals to which the process is sensitive. These sensitive signals execute process as an infinite loop.

2. The process can be __________ by using WAIT statements.
a) Suspended
b) Resumed
c) Suspended as well as resumed
d) Cannot be determined
View Answer

Answer: c
Explanation: The signals used in WAIT statements are the statements which can also be declared in sensitivity list. These signals can be used to suspend as well as resume the process as many times as designer want.

3. A postponed process runs when ___________
a) All the other processes have completed
b) After completion of one particular process
c) Concurrently with all other processes
d) First of all processes
View Answer

Answer: a
Explanation: A postponed process can be defined in VHDL-93. A postponed process runs when all the normal processes have completed at a particular point of time at the time of simulation. These processes can’t schedule any further events with zero delays.
advertisement
advertisement

4. Which of the following statement can’t be used inside a process?
a) WAIT
b) IF ELSE
c) Variable declaration
d) PORT MAP
View Answer

Answer: d
Explanation: A process itself is a concurrent statement which can have only sequential statements. IF ELSE and WAIT statements can be easily used inside a process. Also, there is a declaration part of the process so variable declaration is possible. Only PORT MAP is not possible inside the process among the above options since it is a concurrent statement.

5. Which of the following signal cause the process to execute?

Note: Join free Sanfoundry classes at Telegram or Youtube
PROCESS (clr)
BEGIN
IF (clr =1) THEN
y <=0;
ELSE
y <= input;
END PROCESS;

a) input
b) y
c) clr
d) x
View Answer

Answer: c
Explanation: The sensitivity list of the process contains only one signal which is ‘clr’. So, the process will be executed when the value of clr changes. Though value of input will be assigned to y once but change in value of ‘input’ will not cause execution of process again.

advertisement

6. The value of y is initially 1 and it is changed after one delta cycle to 0. How many delta cycles (starting from the beginning) will be taken to change the initial value of z, refer to the process given below?

PROCESS (y)
BEGIN
x <=y;
z <= NOT y;
END PROCESS

a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: At the very beginning, the value of z is 0. After 1 delta cycle, the value of y changes which causes process to run again. So, in 2nd delta cycle process will be executed but assignments will be done after the execution of process is over. So, at the end of 2nd delta cycle, the assignments will be executed.
advertisement

7. A combinational process must have all the _________ signals in its sensitivity list.
a) Input
b) Output
c) Declared
d) Used
View Answer

Answer: a
Explanation: All the inputs must be used in the sensitivity list to get the desired list. Because if any of the input signal is updated then it is needed that the output also gets updated. To update any output, one needs to activate the process again which is possible only by the signals in the sensitivity list. Therefore, all the signals which it has to read or the input signals must be used in the sensitivity list.

8. There is no restriction on the number of wait statements inside a process.
a) True
b) False
View Answer

Answer: a
Explanation: A process can have multiple WAIT statements and can be placed anywhere inside the process body. However, it can have only one sensitivity list (can contain many signals) but, there is no restriction on use of WAIT statements.

9. Which of the following circuit can’t be described without using a process statement?
a) Multiplexer
b) D flip-flop
c) Decoder
d) Comparator
View Answer

Answer: b
Explanation: Since a flip flop requires a clock signal which can’t be used directly in architecture without using a process (as it is a sequential process). So, for using the clock, using a process is mandatory. All the other circuits like multiplexer, decoder or comparator are combinational circuits and do not need any clock. So, they can be modeled without using a process.

10. Which of the following signal uses keyword EVENT?
a) Variables
b) Output
c) Input
d) Clock
View Answer

Answer: d
Explanation: To use a clock signal in a design description, EVENT is used. It is used inside the process body which indicates the change in value of clock signal so that the design can be synchronized with the clock signal or clock frequency. It can be used in an IF statement to assign any input expression to the output.

11. Refer to the code given below, what kind of circuit is designed?

SIGNAL x : IN BIT;
SIGNAL y : OUT BIT;
SIGNAL clk : IN BIT;
PROCESS (clk)
BEGIN
IF (clk’EVENT and clk =1)
y ;&lt= x;
END PROCESS

a) Buffer
b) Latch
c) Flip flop
d) Shift Register
View Answer

Answer: c
Explanation: It is clear from the code that it is a sequential circuit using clock EVENT and the value of input is assigned to the output directly. So, it can’t be a buffer since buffer doesn’t need any clock signal. So, It is a synchronized flip flop. Clearly, It can be said that the given flip flop is a D flip flop.

12. The driver(s) of signal y is _________

PROCESS ()
BEGIN
y <=1;
y <= x;
y <= z;
END PROCESS;

a) z
b) x
c) x and z
d) 1
View Answer

Answer: a
Explanation: Since the assignment statements are appearing inside a process. Therefore, they are sequential assignment statement. A signal being assigned a value inside a process can’t have multiple drivers. It can have only one driver since only last statement is taken into consideration. So, the signal y is driven by signal z.

13. The resolution function is needed to resolve the value of _______

PROCESS ()
BEGIN
y <= x;
y <= z;
END PROCESS;

a) z
b) y
c) x
d) No x, y and z
View Answer

Answer: d
Explanation: Since these assignments are appearing inside a process so no signal can have more than one driver. A resolution function is needed only if the signal has multiple drivers. However, if these statements were used outside the process, then the resolution function was required to resolve the value of y.

Sanfoundry Global Education & Learning Series – VHDL.

To practice all areas of VHDL for Quizzes, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
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.