Forum Discussion

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

Recommended Soft Reset

Hiya

In order to perform a soft reset, is it merely necessary to perform the following instructions, or does more need to be done? Is anything likely to be overlooked?


        alt_irq_disable_all ();
        alt_dcache_flush_all ();
        alt_icache_flush_all ();
        asm ("jmpi <reset vector>");

3 Replies

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

    Disable mmu ?

    Restore register set 0 ?

    Might be easier to expose the 2 reset lines and add a pio slave to assert reset (and clear on the reset-ack).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If ALTREMOTE_UPDATE is included in your design you can use it to issue a hard reset.

    Regarding dsl's comment, it may be easier to get to the reset line to use the megawizard and set up a watchdog. Then enable the watchdog to reset the hardware.

    In any case I don't recommend doing a software only reset.

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

    Alternatively you can create a component that exposes the resetrequest that's part of the Avalon specification that is software writeable. This is similar to DSL's idea only doesn't require any external wiring. Wiring externally is preferable though if you want tighter control over reset since the resetrequest signal just gets logically OR'ed with the reset_n signal.