UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 10075

7.1i XST - "ERROR:Xst:899 - "file_name", line #: The logic for "net_name" does not match a known FF or Latch template"

Description


General Description:

What type of clock statements does XST support?



XST does not support the use of a complex condition check inside an always block in Verilog. For example, the following code results in the error below:



always @( negedge input1 or negedge input2 or posedge clock )

begin

if ( ~input1 | ~input2 )

begin

output1 <= 1'b1;

output2 <= 1'b0;

end

else

begin

output1 <= input1;

output2 <= input2 & input1;

end

end



"ERROR:Xst:899 - "file_name", line #: The logic for "net_name" does not match a known FF or Latch template."

Solution


To avoid this error, perform the combinatorial logic outside the always block to remove the complex clock statement from the sensitivity list, and then use that intermediate signal in the sensitivity list of the always block, as follows:



assign temp = ~input1 | ~input2;

always @( posedge temp or posedge clock )

begin

if ( temp )

begin

output1 <= 1'b1;

output2 <= 1'b0;

end

else

begin

output1 <= input1;

output2 <= input2 & input1;

end

end



When you infer hardware from HDL, it is important to keep the type of hardware you want in mind. The XST User Guide contains basic templates for the various types of FPGA/CPLD hardware that can be inferred with HDL code:

http://support.xilinx.com/support/software_manuals.htm

If your HDL code is modeled after the templates provided, you should be able to infer the desired hardware.



Another situation that causes this error (which is unrelated to the first example) is when the reset function in the always block has no effect on the register that will be inferred:



module misc(clk,rst,in1,out1);

input clk,rst,in1;

output[1:0] out1;

reg[1:0] out1;



always @(posedge clk or posedge rst)

begin

if (rst)

out1[1] = in1;

else

out1 = {in1,in1};

end

endmodule



change to:



module misc(clk,rst,in1,out1);

input clk,rst,in1;

output[1:0] out1;

reg[1:0] out1;



always @(posedge clk or posedge rst)

begin

if (rst)

out1[1] = 0;

else

out1 = {in1,in1};

end

endmodule



The error message also appears when a dual-edge triggered FF is inferred in any device other than a CoolRunner-II. The CoolRunner-II is the only Xilinx device that contains dual-edge triggered FFs:



:

always @(posedge clk or negedge clk)

:
AR# 10075
Date Created 08/29/2007
Last Updated 09/22/2011
Status Archive
Type General Article