module SQUARE_FreqCounter (nACLK2, ACLK1, RES, Fx, FCO, FLOAD);

	input nACLK2;
	input ACLK1;
	input RES;
	input [10:0] Fx;
	output FCO;
	output FLOAD;

	wire FSTEP;
	wire fco_latch_nq;
	wire [10:0] cout;

	dlatch fco_latch (.d(FCO), .en(ACLK1), .nq(fco_latch_nq) );
	DownCounterBit freq_cnt [10:0] (.ACLK1(ACLK1), .d(Fx), .load(FLOAD), .clear(RES), .step(FSTEP), .cin({cout[9:0],1'b1}), .cout(cout) );
	assign FCO = cout[10];

	nor (FLOAD, nACLK2, fco_latch_nq);
	nor (FSTEP, nACLK2, ~fco_latch_nq);

endmodule // SQUARE_FreqCounter