Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Reset software

Altera_Forum
Honored Contributor II
1,235 Views

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
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
528 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
528 Views

 

--- 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
0 Kudos
Altera_Forum
Honored Contributor II
528 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
528 Views

 

--- 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
0 Kudos
Altera_Forum
Honored Contributor II
528 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
528 Views

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?

0 Kudos
Reply