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++

How to reset the user logic ?

Altera_Forum
Honored Contributor II
1,668 Views

Hi, I use QuartusII 4.0, Nios 3.1, and Stratix1S10. 

 

I write a user logic circuit, and this circuit need to do some calculations repeated. 

 

That means I use it in a loop(in software). 

 

I hope to know after the circuit calculate once, how do I reset it ? 

 

I means how do I clear all singnals in it. 

 

There are some reset signals in my HDL code design, and how do I use it ?? 

 

Does anybody know it ? 

 

Thanks a lot. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
541 Views

Hi pipiwau, 

I think there are various ways to do it. 

For example if your peripheral has some registers, u can use one of these to reset the logic: id est you write first all zeros (for example) this register and this event resets all your logic. 

Otherwise you could use an export reset signal controlled by CPU, for example through an output PIO...
0 Kudos
Altera_Forum
Honored Contributor II
541 Views

Soin, thanks for ur suggestion.  

 

Because there is an accumulator in my circuit, I think it is impossible to write a value, like zero, to clear the result calculated by the accumulator. 

 

And I use the circuit in a loop (in software), that means I need use the circuit again and again in the loop. 

 

Therefore, I can not use an export reset, like PIO, to reset or clear the result. 

 

Hence I hope to know if there are some methods to clear the result of accumulator just at the time of the circuit finishing the calculation once. 

 

That means if there are 20 times calculation in the software loop, I may need 20 times reset of my circuit. 

 

If I say something wrong, please tells me. 

 

Anyway, thanks a lot. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Altera_Forum
Honored Contributor II
541 Views

Hi pipiwau, 

I don&#39;t understand why u can&#39;t use an export PIO again and again in the loop to reset your logic: for example if your reset signal is active low you put the output PIO low at the beginning of the loop and set it high after a defined time, then you do the calculation. Why not?
0 Kudos
Altera_Forum
Honored Contributor II
541 Views

Soin, I think I misunderstand your idea previously. 

 

So, I will try to use the PIO to reset my circuit. 

 

Thanks. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Reply