Test your progress with this VHDL quiz after completing part 4 of the Basic VHDL Tutorial series!

How do we measure real-time in an FPGA by using VHDL?
By using a "wait for 1 ns" statement
By counting clock periods
By exploiting propagation delay

Correct!

Wrong!

Which statement is true
A procedure cannot contain Wait statements
Procedure parameters are always inputs
When used in a procedure, the return keyword must be without a value

Correct!

Wrong!

Which statement describes a fundamental flaw in this fire control system?
Missing reset of the State signal
Missing others clause in the case statement
The State signal will be stuck once it enters the Armed state
The initial state will be random because no default value was assigned to the State signal

Correct!

Wrong!

Which statement about functions is true?
Functions can contain Wait statements
Function parameters can be outputs
The return statement cannot be omitted

Correct!

Wrong!

How are impure functions different from pure functions?
Impure functions may contain Wait statements
Impure functions can access objects that are not on the parameter list
Impure functions may declare its own variables

Correct!

Wrong!

What is true regarding the := 0 in this procedure declaration?
The assignments are redundant because the values must be overwritten by the procedure call
They are default parameter values which will be used if they are omitted from the procedure call
That is a syntax error

Correct!

Wrong!

Share the quiz to show your results !

Subscribe to see your results

Basic VHDL quiz – part 4

I got %%score%% of %%total%% right

%%description%%

%%description%%

Loading...

Similar Posts

4 Comments

  1. First of all, thank you so very much!
    These are by far the most comprehensible tutorials I have come across like ever!
    Brilliant work.

    So here my two cents out of gratitude:

    Basic VHDL Quiz – part 4
    Which statement is not true?
    Answer 3 : The return statement cannot be omitted.
    -> Correct

    So the return statement CAN be omitted???

    “Unlike in most other programming languages, the return keyword is mandatory in functions in VHDL.”

    Confused by double negation. Me or you 😉

  2. “The return-keyword cannot be used in a procedure”. I believe that this is incorrect, e.g.
    http://vhdl.renerta.com/source/vhd00060.htm

    It is true, of course, that you cannot return a value with it, that’s the only (?) difference between procedures and functions. But, as in other languages, you can use “return” as control flow statement to “force an exit”.

    1. You are right! I missed the possibility of using return statements in procedures without returning a value. According to the Renata link you posted, functions must return a value, while procedures can have return statements, but then without a return value.

      I am changing this question.

Leave a Reply

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