always @(*)
begin : P1
d_i = d_q;//flag1
if(we) begin
d_i = d_i +'d1;
end
else begin
d_i = d_i; //flag2
end
end
在flag2处产生了latch,但是又在flag1处,初始话解锁了
always @(*)
begin : P1
d_i = d_q;//flag1
if(we) begin
d_i = d_i +'d1;
end
else begin
d_i = d_i; //flag2
end
end
在flag2处产生了latch,但是又在flag1处,初始话解锁了
感谢分享,我给代码加了个代码块标签,看起来方便一点~
算条件补全吧。不然组合逻辑会产生latch.