Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

Power-up level setting doesn't work at all...

Altera_Forum
Honored Contributor II
1,246 Views

Hi, 

I want a design works when MAXII power up. auto_config_ctrl.v in Attachments is my design. After progromming is done it works well, but it fails after repower... But it can work if an press the reset button... So, I guess cs doesn't be reseted to 0 after power up...
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
234 Views

You're right. You're not getting a reset when you power the board up and the logic is clearly not doing all you want it to as a result. 

 

As the board powers up you are probably getting a rising edge on 'rst' which may trigger your always blocks. However, since you only ever get a rising edge 'rst' is never sampled low. So, no reset is generated. It may not trigger the blocks in which case the first rising 'clk' edge will, by which time 'rst' is already high. 

 

I assume you need this to automatically reset when you power the board up. Can you get your hardware to reliably do that? Assuming that's not possible you will need to generate an internal, synchronous reset. 

 

The way I do this is to generate a small counter (2 or 3-bit should be enough given the resources available in MAXII devices.) This counter counts up to max-1 and stops. This counter is decoded to generate a synchronous reset at counter = max-2 and is then released. This caters for all registers in the device being reset to either 0 or 1 on power up. The counter immediately wraps to zero if registers are set following power up. 

 

Regards, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
234 Views

 

--- Quote Start ---  

You're right. You're not getting a reset when you power the board up and the logic is clearly not doing all you want it to as a result. 

 

As the board powers up you are probably getting a rising edge on 'rst' which may trigger your always blocks. However, since you only ever get a rising edge 'rst' is never sampled low. So, no reset is generated. It may not trigger the blocks in which case the first rising 'clk' edge will, by which time 'rst' is already high. 

 

I assume you need this to automatically reset when you power the board up. Can you get your hardware to reliably do that? Assuming that's not possible you will need to generate an internal, synchronous reset. 

 

The way I do this is to generate a small counter (2 or 3-bit should be enough given the resources available in MAXII devices.) This counter counts up to max-1 and stops. This counter is decoded to generate a synchronous reset at counter = max-2 and is then released. This caters for all registers in the device being reset to either 0 or 1 on power up. The counter immediately wraps to zero if registers are set following power up. 

 

Regards, 

Alex 

--- Quote End ---  

 

tks!Alex! 

I have fixed this problem several hours ago. The reason is the superfluous power supply on the board which is supposed to be assitanted with a USB chip... The max works well after removing the 5-v power supply for usb... Regiters in altera device is powered up to 0 by default, so, no reset is needed in this file. You are right, a small counter is ok for automatically reset, I have tried this method which resulted in failure 2 days earlier. Syn-reset is generated in the top module, not in this one. Thank you for your rely so much! 

 

regards, 

hoho0ohoh
0 Kudos
Reply