Warning FX689 Unbuffered I/O


#1

Hi all the FPGA masterminds. First time post here. Hi
I am having issue with this warning using Icecube2 with synplifypro
Warning FX689 Unbuffered I/O which could cause problems in P&R
the code

module test(input CLK,
            output reg clkout);

reg [5:0] Clk_Count;

always @(posedge CLK)
begin

   Clk_Count <= Clk_Count+1;

   clkout  <= Clk_Count[5];

end
endmodule

module top (input 	CLK,    // 16MHz clock
            output 	USBPU, // USB pull-up resistor	
    	    output 	PIN_24);

// drive USB pull-up resistor to '0' to disable USB
assign USBPU = 0;

test xtest(.CLK(CLK),
	.clkout(PIN_24));

endmodule

Thank you for any help
Joe


#2

Hi

What is happening here is that you are playing with registers and wires and implicitly assigning them.

For example “output PIN_24” is a wire. but in the declaration of test it becomes a reg.(in this order this is OK) but the reverse would not work.

The second “problem” is
“clkout <= Clk_Count[5];”. Indeed all data assigned in an always block needs to be buffered. A more common
solution is to assign the wire outside of the always block.

Overall: wires (and thing not mentioned as “reg”) can not keep state you need to either assign them a constant

Here is my take on it (also a noob)

module test(input CLK,
            output clkout);

reg [5:0] Clk_Count;

//assign clokout here
assign clkout = Clk_Count[5];

always @(posedge CLK)
begin
   Clk_Count <= Clk_Count+1;
end
endmodule

module top (input   clk,    // 16MHz clock
            output  USBPU, // USB pull-up resistor  
            output  PIN_24);

// drive USB pull-up resistor to '0' to disable USB
assign USBPU = 0;// 

  test xtest(.CLK(clk),
    .clkout(PIN_24));

endmodule

#3

Hey, thanks for your reply. I am still getting my head around things in FPGA and Verilog. It seems to be far more complex world then any micros. The interesting thing is that it throws all these warnings but the result still runs in hardware as expected. I have tried your fix but I am still getting unbuffered warnings.

for example:
Unbuffered I/O xtest.Clk_Count[0] which could cause problems in P&R
Unbuffered I/O USBPU which could cause problems in P&R
Unbuffered I/O xtest.Clk_Count_cry_s[0] which could cause problems in P&R

and so on
Thanks
Joe