VHDL Questions and Answers Part-16

1. The sequential assignment statement is activated, whenever ________
a) The waveform associated changes its value
b) The process is terminated
c) The execution is scheduled
d) The value of the target is needed

Answer: b
Explanation: The sequential assignment statement appears inside a process. The statements inside the process are sequential statements and the assignment is activated when the process ends. So, the assignment will take place at the time of process termination only

2. The concurrent assignment statement is activated whenever ______
a) The execution is scheduled
b) The value of the target is needed
c) The waveform associated changes its value
d) The process is terminated

Answer: c
Explanation: Concurrent assignment statement has nothing to do with processes. It is executed whenever the waveform associated with it changes its value. The value of the target is updated every time the value of waveform changes.

3. Which of the following is correct syntax for a signal assignment statement (if {} specifies an optional part)?
a) target <= {delay_mechanism} waveform;
b) target <= delay_mechanism waveform;
c) target <= delay_mechanism {waveform};
d) target <= {delay_mechanism} {waveform} value;

Answer: a
Explanation: The proper signal assignment is shown in option target <= {delay_mechanism} waveform;. The ‘target’ gets the value of ‘waveform’ by executing the delay mechanism. The delay mechanism is ,however, optional but is used most of the times for better timing performance of the circuit.

4. The conditional assignment statement is a _________ assignment.
a) Sequential
b) Concurrent
c) Selected
d) None of the above

Answer: b
Explanation: The conditional statement is a type of concurrent assignment statement in which the assignment is executed only if the condition specified is true. It may be noted that the condition is Boolean i.e. it may have only two values true or false.

5. Sequential assignments are synthesizable.
a) True
b) False

Answer: a
Explanation: Generally, sequential assignments are synthesizable by EDA tools. The assignment statement must be using some operators and types. The only case when these assignments are not synthesizable is when the types and operators are acceptable to the synthesis tools

6. Delays are generally ignored in ________ assignments statements.
a) Concurrent
b) Conditional
c) Sequential
d) Selected

Answer: c
Explanation: Conditional and selected assignments are type of concurrent assignment. In case of concurrent assignments delays are usually taken into consideration. Whereas, there is no use of delays in sequential assignments since it is executed at the end of process. So, there is no need for delay in sequential assignments

7.Which of the following can’t be a mode for target operand of assignment statement?
a) BUFFER
b) INOUT
c) OUT
d) IN

Answer: d
Explanation: The left operand of assignment statement, called the target operand is always assigned the value of another operand. There is no chance of using IN type target on the left side of an assignment statement. It is mandatory that the direction of target include output.

8. Which of the following is a variable assignment statement?
a) <=
b) :=
c) =>
d) ==

Answer: b
Explanation: To assign a value to variable, a variable assignment statement is used. The symbol used for variable assignment is ‘:=’ whereas when we assign some value to a signal, <= statement is used. In case of variables if we use <= instead of :=, there can be some problem with the delay mechanisms.

9. Which of the following is a keyword used for conditional assignment?
a) IF
b) WHEN
c) FOR
d) END

Answer: b
Explanation: Conditional statement is an assignment statement in which a condition is first tested and then assignment occurs. It uses the keyword WHEN to assign value to a signal conditionally. For example, y <= ‘1’ WHEN x = ‘0’. This is a conditional statement that will assign value 1 to signal y only when signal x is low.

10.For a signal used in sequential assignment, it can have _______ driver(s).
a) 1
b) 2
c) 3
d) 4

Answer: a
Explanation: Sequential assignment statement is the one that is used in a process. This statement is executed at the end of the process. No matter how many signal assignment statements are used, only the last one is taken into consideration(for 1 signal). So, in a process, one signal can have only 1 driver.