
input cp,en,crl;
output[3:0]g,s;
reg[3:0]g,s;
always@(posedge cp or posedge crl or posedge en)
begin
if(crl)
begin g<=4;s<=2;
end
if(en)
begin if(g>0)g<=g-1;
end
else if (s>0)
begin s<=s-1;g<=9;
end
else g<=g;s<=s;
end
endmodule
为什么会出错
Error (10200): Verilog HDL Conditional Statement error at D24S.v(14): cannot match all operands in the condition expression to corresponding edges in the enclosing Always Construct's Event Control
工艺库中的触发器最多凯简盯只能盯和有一个时钟输入、一个复位输入咐高、一个置位输入。没有你所描述的3个时钟输入的器件。
底层硬件不支持这种alwanys
情况有冲突,如果crl和en同时为1, g该如何赋值呢?