Initialization sequence on startup

S

Syed Huq

Guest
Hi,

I am wondering if it is possible to execute a function or a certain logic automatically without any impulse once the FPGA image is loaded on the the bit file. Something like an initialization sequence without any input from the user on any of the pins. It just needs to run once when the FPGA image is loaded.

Is it even possible ?
 
In article <ec2aa2e0-50f8-4df4-81b4-ac824d620a97@googlegroups.com>,
Syed Huq <syed.huq.a@gmail.com> wrote:
Hi,

I am wondering if it is possible to execute a function or a certain logic automatically without any impulse once the FPGA image is loaded on the the bit
file. Something like an initialization sequence without any input from the user on any of the pins. It just needs to run once when the FPGA image is loaded.


Is it even possible ?

I'm assuming a clock is available to step through the sequence...

reg one_shot = 0; // Loaded as zero during config

always @( posedge clk )
if( ~one_shot )
begin
one_shot <= 1; // To prevent it from happening except the first time.
. do init sequence here.
end

Modify as needed accout for states in the
init sequence...

Regards,

Mark
 
On Mon, 10 Nov 2014, Syed Huq wrote:

I am wondering if it is possible to execute a function or a certain
logic automatically without any impulse once the FPGA image is loaded on
the the bit file. Something like an initialization sequence without any
input from the user on any of the pins. It just needs to run once when
the FPGA image is loaded.

Is it even possible ?

Sure. Specify (or rely on default) initial value for FF, use it as a flag,
change FF to inactive state once your initialization is complete.
 

Welcome to EDABoard.com

Sponsor

Back
Top