Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Does a NIOS II need reset?

Folks,

I recently began porting my NIOS II design to its final hardware platform from the 1C20 eval board. During this effort, I eliminated reset by assigning it internally to '0'. My logic uses active high-reset so all the reset logic and routing disappeared. The NIOS II uses active low reset so its reset is inverted before entering the NIOS II component. When reset is set '0' (inactive), the NIOS II core did not boot. I tested this by supplying reset only to the NIOS II component. When I did this, the NIOS II booted normally (all this testing done on the 1C20 eval bd).

Does the NIOS II core need a reset? I thought I got one for "free" when the device configured.

16 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    The locked signal will toggle prior to actual phase lock -- this can cause

    some problems ;-) I still use a delay (along with the pll lock) to drive reset.[/b]

    --- Quote End ---

    This is not what I suspect from a pin named &#39;locked&#39;. Was an other name better then?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    > This is not what I suspect from a pin named &#39;locked&#39;.

    Agreed ... but from the Cyclone Device Handbook:

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    Without any additional circuitry, the locked port may toggle as the PLL

    begins tracking the reference clock.[/b]

    --- Quote End ---

    And ... I did actually observed this behavior -- so the pll locked port by itself

    is not a good general purpose reset source ;-)

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sorry about the delay (just got back from a vacation)

    If you want to see in closer detail how a PLL output behaves, make a design with a PLL, and some circuit driven by it and do a simulation looking at the input clock, output clock, and reset signal and you will see why the delay is needed (although I sometimes get lazy and don&#39;t bother). When you look at the output from the PLL you&#39;ll see the first few output clocks out of phase and this could cause problems internal to the NIOS as it (PLL) locks the phase down.

    Also thank you for the info about the locking signal not being completely valid to implement the reset (I like some of the others figured it could be used as well).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    About the locked signal. If I have to use a delay --> how can I make it in a counter (flip-flops) without any problems then? If you say the clock isn&#39;t stable at this point, I suppose I cannot rely on the counter value to be valid in all cases?

    Also how long must the delay be?

    Any more information appreciated. (application note??)

    Stefaan
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    > how can I make it in a counter (flip-flops) without any problems then?

    There&#39;s really no substitute for a good external reset ;-)

    However, I do use the pll locked signal as an enable/clear input to a reset

    counter that controls reset to a specific logic block. The counter&#39;s clock input

    is an external clock signal, _not_ the output of the pll. And the counter

    width is set based on the phase lock period from simulation (in my case

    about 16x the counter&#39;s input clock). So, the counter is simply trying to

    guarantee the stability of the pll locked signal before negating reset.

    I haven&#39;t had any problems ... yet. But to be honest, I&#39;m not particularly

    comfortable with it either -- my knowledge just doesn&#39;t run deep enough

    at this point 8-(

    Given the number of posts to this topic -- an application note from the

    experts would be a welcomed reference.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It doesn&#39;t take long for the PLL to lock into phase. Off the top of my head I think the delay in the reference designs is at least two times longer then the PLL locking time so look at the counter value in that one to see what a good value is. The counter should work fine if you use your osciallator and not the PLL output to clock it.

    But like what was said before, an external reset is the way to go (just like a bomb with an off switch is a good idea too, lol). Really you are shooting yourself in the foot if you do not have an external reset, you could end up costing you or your company a lot of money if they have to re-spin a board to put one in (and it helps you debug too).

    Cheers