Power On Reset - Does Anyone Have Experience?


#1

So, I’m trying to get my device to come out of reset utilizing the built-in POR to save a pin. I’ve implemented the following code and it does not work:

module fpga(
		input pin5,
		input pin6,
		input pin7_done,

		output pin16,
		output pin17,
		output pin18_cs,
		output pin19_sclk,
		input rst
);
	GSR GSR_INST (.GSR (rst));
	
	fpga_sub top(.in1(pin5), .in2(pin6), .in3(pin7_done), .rst(rst),
		.out1(pin16), .out2(pin17), .out3(pin18_cs), .out4(pin19_sclk));

endmodule

The device does not come out of reset… My LPF does NOT have “GSR_NET NET “GSR” ;” as a line.

However, the following code works fine with Pin 8 pulled high:

module fpga(
		input pin5,
		input pin6,
		input pin7_done,
		input pin8_pgmn,

		output pin16,
		output pin17,
		output pin18_cs,
		output pin19_sclk
);
	
	fpga_sub top(.in1(pin5), .in2(pin6), .in3(pin7_done), .rst(pin8_pgmn),
		.out1(pin16), .out2(pin17), .out3(pin18_cs), .out4(pin19_sclk));

endmodule

What is the proper way to implement power on reset for the MachX02-256 device?


#2

The GSR cell is an input to the FPGA fabric, driving a dedicated net that resets all flipflops. It is not an power-up reset output.

Verilog like this can be used to create a power-up reset signal.

reg [5:0] reset_cnt = 0;
wire resetn = &reset_cnt;
always @(posedge clk) begin
    reset_cnt <= reset_cnt + !resetn;
end

With resetn then being used as an active low reset wherever it is needed.