Electrical Engineering Question:
Download Questions PDF

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

Answer:

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;

Download Electrical Engineering Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between:
c = foo ? a : b;
and
if (foo) c = a;
else c = b;
What is the difference between running the following snipet of code on Verilog vs Vera?