Altera_Forum
Honored Contributor
16 years agoInitialzing Registers in altera FPGA's
I have a very basic questions about initializing registers in altera FPGA's.
If i want to initialize a register to a binary 1 in simulation i would define it the following way. reg var=1'b1; I was under the impression that this only worked in simulations until recently when I saw in actual hardware this also worked. My questions is will this always work in hardware, 100% of the time, when the FPGA comes up? My application is as follows, i use a hardware I/O from an FPGA as a reset line for a device, it's an active low reset. When the FPGA is re-programmed I do not want this line to be pulled low by the FPGA. This will cause my device to go into reset which I cannot have. On my Circuit board I have this line pulled up with a 10k resistor. When the FPGA is being programmed all I/O's go to inputs, and this 10K resistor will hold this line high. Once the FPGA is programmed and comes out of reset i need this I/O to be a binary 1 right from the start. I can never have it go to 0. Will defining the reg as shown above give me this functionality. If not is there another way to have the FPGA do what I want. I know i can fix this in hardware but am hoping the FPGA can do it for me. I am using a cyclone III FPGA for my current project Thanks for your help