Error: Assignment under multiple single edges is not supported for synthesis

Error: Assignment under multiple single edges is not supported for synthesis

这是一个四位计数器T触发器设计。 Tflip 模块用于每个位。

   module Tflip (q,t,clk,rst);
    output q;
    input t,clk,rst;
    reg q; //q output must be registered 
    always @ (posedge clk or negedge rst)
     if (rst <= 0)
       q <= 1'b0;
     else
       q <= t^q; // it is made up with X-OR gate.
  endmodule

综合工具需要特定的编码模式,但您没有常规的重置条件。变化:

if (rst <= 0)

至:

if (!rst)

也许你的综合工具被混淆了,因为你的代码是这样写的:

if reset is less than or equal to 0

综合工具还可以识别以下低电平有效复位条件模式:

if (~rst)

和:

if (rst == 0)