Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17249 Discussions

Holding Value in Variable until next clock cycle

Altera_Forum
Honored Contributor II
1,046 Views

Hello all, 

 

I am writing a process in which I want to hold some data in an array. I have declared and initialized the array inside process as variable. What I want is that array should be updated in one clock cycle, then retain its data until the next clock cycle and then get updated in the next cycle and so on..  

 

My question is whenever the next clock cycle comes, does the array reset to its initial value given in the declaration part or it will start from the previous value that was stored in it in last cycle?? 

 

if it is reset to its initial value always, then how can I store the data in array that can be used in the next cl
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
359 Views

It will always store the value once it is assigned - but how you use it will affect the logic that gets infered. 

If you are not sure what you're doing - you are much better off using signals. 

 

Why not post the code and try and explain what you're trying to do.
0 Kudos
Reply