我也尝试综合了,用的ISE,但是并没有出现锁存器的警告。我觉得这个代码最大问题是A信号,即作为敏感信号,又作为CASE的表达式,这样会对下面赋值产生竞争,
我觉得产生锁存器的原因是不是没有写出F与G在其他状态的赋值
改一下:always@(A or B)
case(A)
1'b0: F = B;
1'b1: G = B; default begin
F=F;
G=G;
end
endcase
这样就应该没有锁存器了
The code mentioned will be synthesized as latch because value at pin F should be retained when signal A is 1. Similarly value at G should be retained when A is zero. In a system design presence of latch brings complexity in timing closure. Hence the coding style is portrayed as inconsistent.