Assignments
Be careful with always assignments
Which statements generate a latch?
always @(c or x) begin if (c) begin
value = x;
end
y = value;
end
always @(c or x) begin value = x;
if (c) begin
value = 0;
end
y = value;
end
always @(c or x) begin if (c)
value = 0;
else if (x)
value = 1;
end
always @(a or b) f = a & b & c;
end
Previous slide
Next slide
Back to first slide
View graphic version