VHDL Questions and Answers Part-17

1. The selected concurrent statement is equivalent to ________ sequential statement.
a) If else
b) Loop
c) Wait
d) Case

Answer: d
Explanation: Selected concurrent assignment statement is used when the target signal has to choose one value out of n(say) values. This is similar to the case statement used in the process. It uses the keyword ‘SELECT’ to select one value.

2. Those statement which are placed under ________ are concurrent.
a) Process
b) Function
c) Architecture
d) Procedure

Answer: c
Explanation: VHDL code, in general, is a concurrent code. Only statements placed under Process, Function or Procedure are executed sequentially. All other statements are concurrent statements.

3. In case of concurrent assignment, order of statements doesn’t matter.
a) True
b) False

Answer: a
Explanation: Since execution of a concurrent statement is parallel and an assignment statement has to be executed whenever the signal associated with it changes its value. Therefore, there is no restriction on the order of the statements.

4. Which of the following can’t be implemented with concurrent statements only?
a) Multiplexer
b) Decoder
c) Adder
d) Counter

Answer: d
Explanation: In general, we use concurrent code to build combinational circuits and the reason is that order of statements is not a problem. So, we can’t use purely concurrent code to obtain sequential logic circuits due to use of clock and processes. Hence, counter can’t be designed by using concurrent code only.

5. Variable assignment statement executes in ______ time.
a) Immediately(zero)
b) After delay specified
c) After one clock cycle
d) After two clock cycles

Answer: a
Explanation: When a variable is assigned a value, the assignment executes in zero simulation time. In other words, it changes the value of variable immediately. Also, the delay mechanism is used in the signal assignment but not in variable assignment. Variable assignment doesn’t use any delay mechanism

6. In the signal assignment statement, which delay is used ?
x <= 1 AFTER 10ns
a) Transport delay
b) Inertial delay
c) Delta delay
d) Wire delay

Answer: b
Explanation: Inertial delay is the default delay in VHDL in which only last value is persisted ignoring all other delays. In the case of inertial delay, there is no need of specifying anything like we need to write TRANSPORT to specify the transport delay

7. Inertial delay in Signal assignment is useful to ___________
a) Specify wire delay
b) Accumulate delay
c) Ignore input glitches
d) No use

Answer: c
Explanation: Inertial delay assignment takes only last assignment statement into consideration ignoring all the preceding assignments. So, any intermediate change will be ignored. Therefore, It is useful in ignoring input glitches

8. Which of the following statement can’t be used to assign values in behavioral modeling of OR Gate?
a) Simple concurrent assignment
b) Sequential assignment
c) Conditional concurrent assignment
d) Selected concurrent assignment

Answer: d
Explanation: In the behavioral modeling, various output values are described w.r.t different combination of input values. A conditional concurrent assignment and selected concurrent assignment can add some condition for assigning values. Same can be done with sequential statements. By using simple concurrent statements, it is not possible to realize or gate.

9. Which of the following is not an assignment statement?
a) <=
b) :=
c) =>
d) :>

Answer: d
Explanation: There are three assignment statements in VHDL. <= is a signal assignment statement, := is used for variable assignment and => is used at the time of mapping the components and is used with ‘OTHERS’. These are 3 type of assignment operators.

10. OTHERS keyword is used with which kind of assignment?
a) Concurrent
b) Sequential
c) Selected
d) Conditional

Answer: c
Explanation: Selected concurrent assignment statement is used when you have to choose one value out of n values. In that case WHEN and OTHERS keywords are used. OTHERS is similar to the ELSE statement which will be selected when all the conditions are false.