The goal of the following model is generate a clock waveform that has the clock high 4 time units and low 4 time units, with the first rising edge at time 20. Submit a completed module which fills in the missing lines in q2 below:

module q2;
reg clock;
initial begin
clock=0
____
____
____
end
end
endmodule

Respuesta :

Answer:

module q2;

reg clock;

initial begin

clock = 0;

#20 clock = 1; // at 20 set high

always begin

#4 clock = ~clock; // then every four units change

end

end

endmodule