chyavanphadke
Newbie
On synthesizing this code using the script, the terminal report will show a latch. What changes I have to do in code so as to remove the latch
module dff(
input clk,reset,d,
output reg q);
always @ (clk or reset) begin
if (reset) begin
q<=0;
end
else begin
if (clk)
q<=d;
end
end
endmodule
module dff(
input clk,reset,d,
output reg q);
always @ (clk or reset) begin
if (reset) begin
q<=0;
end
else begin
if (clk)
q<=d;
end
end
endmodule