When synthesising, it is wise to be consistent by sticking to a template. Here is one such template for sequential logic with an asynchronous reset, which all synthesis tools should understand:
always @(posedge CLOCK or posedge RESET) // or negedge
begin
// PUT NO CODE HERE
if (RESET == 1'b1) // or (RESET == 1'b0) for an active-low reset
// set the variables driven by this always block to their reset values
// MAKE SURE YOU USE NON-BLOCKING ASSIGNMENTS ( <= )
else
// do things that occur on the rising (or falling) edge of CLOCK
// stuff here gets synthesised to combinational logic on the D input
// of the resulting flip-flops
// MAKE SURE YOU USE NON-BLOCKING ASSIGNMENTS ( <= )
end
Here is the corresponding template for a sequential process without an asynchronous reset:
always @(posedge CLOCK) // or negedge
begin
// do things that occur on the rising (or falling) edge of CLOCK
// stuff here gets synthesised to combinational logic on the D input
// of the resulting flip-flops
// MAKE SURE YOU USE NON-BLOCKING ASSIGNMENTS ( <= )
end
And finally, here is the template for combinational logic:
always @(*)
begin
// implement your combinational logic here
// MAKE SURE YOU USE BLOCKING ASSIGNMENTS ( = )
end
Your code does not comform to any of these three templates nor any other. That is why you synthesis tool doesn't understand it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…