Forum Discussion

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

Reset software

Hello,

I' ve implemented a web server in the FPGA 1c20 in my University. The University closes my IP obtained by DHCP after 24 hours working. I don't know why. So, I need to restart my system after 24 hours working.

How can I implement a reset software not hardware?

And, If I init again the twIP stack, can it work out?

Thank you

6 Replies

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

    Are you using one of the Altera Dev. Kits? If so, then it's likely that you can use the reconfig_request_pio to tell the config_controller that it needs to initiate a reconfiguration. You need to write a '0' to this PIO's data register. You should see this PIO in all "standard" and "full_featured" designs.

    If you're not using one of the Dev. Kits, then it depends upon how your particular design handles configuration/re-configuration.

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

    --- Quote Start ---

    originally posted by jparraez@Jul 3 2006, 04:13 AM

    hello,

    i' ve implemented a web server in the fpga 1c20 in my university. the university closes my ip obtained by dhcp after 24 hours working. i don't know why. so, i need to restart my system after 24 hours working.

    how can i implement a reset software not hardware?

    and, if i init again the twip stack, can it work out?

    thank you

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16625)

    --- quote end ---

    --- Quote End ---

    I suspect a less drastic, and less hacky, approach than resetting your system is to enhance your DHCP software to support renewing addresses. The RFC is http://www.faqs.org/rfcs/rfc2131.html (http://www.faqs.org/rfcs/rfc2131.html). It&#39;s relatively straightforward See section 4.4., but basically you need a timer T1 and when this expires you send a DHCPREQUEST
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hey,

    This is a way to do a software reset:

    # define NIOS2_RESET()

    NIOS2_WRITE_STATUS(0);

    NIOS2_WRITE_IENABLE(0);

    ((void(*)(void))NIOS2_RESET_ADDR)()

    In your main program you just call this "function" and your

    NIOS will reset.

    Enjoy ...

    Karel - Gemidis
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by slacker@Jul 3 2006, 05:00 PM

    are you using one of the altera dev. kits? if so, then it&#39;s likely that you can use the reconfig_request_pio to tell the config_controller that it needs to initiate a reconfiguration. you need to write a &#39;0&#39; to this pio&#39;s data register. you should see this pio in all "standard" and "full_featured" designs.

    if you&#39;re not using one of the dev. kits, then it depends upon how your particular design handles configuration/re-configuration.

    - slacker

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16632)

    --- quote end ---

    --- Quote End ---

    Hi,

    I use a Stratix II DSP dev. kit. I use the reconfig_request_pio and I write &#39;0&#39; to this PIO&#39;s data register :

    IOWR_ALTERA_AVALON_PIO_DATA(RECONFIG_REQUEST_PIO_BASE, 0);

    But nothing happens: there is NO reconfiguration anymore!

    Why??

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

    Ok I found the solution:

    IOWR_ALTERA_AVALON_PIO_DIRECTION(RECONFIG_REQUEST_PIO_BASE, 1);

    IOWR_ALTERA_AVALON_PIO_DATA(RECONFIG_REQUEST_PIO_BASE, 0);

    IOWR_ALTERA_AVALON_PIO_DATA(RECONFIG_REQUEST_PIO_BASE, 1);

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

    Hi, Is there an equivalent to the reconfig_request_pio on newer dev kits, like the Arria II Gx or Stratix IV Gx? Or, is another method needed, like writing a register in the MAX via the FSM?