Interview Questions

Using the given, draw the waveforms for the following versions of a ...

Electrical Engineering Technical Interview Questions and Answers


(Continued from previous question...)

6. Using the given, draw the waveforms for the following versions of a ...

Using the given, draw the waveforms for the following versions of a (each version is separate, i.e. not in the same run):
reg clk;
reg a;

always #10 clk = ~clk;

(1) always @(clk) a = #5 clk;
(2) always @(clk) a = #10 clk;
(3) always @(clk) a = #15 clk;

Now, change a to wire, and draw for:

(4) assign #5 a = clk;
(5) assign #10 a = clk;
(6) assign #15 a = clk;




       10      30      50      70      90     110     130
        ___     ___     ___     ___     ___     ___     ___
clk ___|   |___|   |___|   |___|   |___|   |___|   |___|   |___

          ___     ___     ___     ___     ___     ___     ___
(1)a ____|   |___|   |___|   |___|   |___|   |___|   |___|   |_

            ___     ___     ___     ___     ___     ___     ___
(2)a ______|   |___|   |___|   |___|   |___|   |___|   |___|


(3)a __________________________________________________________

Since the #delay cancels future events when it activates, any delay
over the actual 1/2 period time of the clk flatlines...

With changing a to a wire and using assign, we
just accomplish the same thing...

       10      30      50      70      90     110     130
        ___     ___     ___     ___     ___     ___     ___
clk ___|   |___|   |___|   |___|   |___|   |___|   |___|   |___

          ___     ___     ___     ___     ___     ___     ___
(5)a ____|   |___|   |___|   |___|   |___|   |___|   |___|   |_

            ___     ___     ___     ___     ___     ___     ___
(6)a ______|   |___|   |___|   |___|   |___|   |___|   |___|


(7)a __________________________________________________________

(Continued on next question...)

Other Interview Questions