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

Help about Random Number Generater function

Altera_Forum
Honored Contributor II
1,073 Views

hello everyone, I just start a project that need use some kind of random number generator function, but I failed to convert into a VHDL entity, could anyone give some suggestion how should do that? 

 

This is the funtion: 

 

unsigned F8(unsigned x) 

x=(x*3+3)&0xFF; 

x=x^(11); 

return x; 

 

Thank U guys
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
361 Views

 

--- Quote Start ---  

I just start a project that need use some kind of random number generator function 

 

--- Quote End ---  

 

 

Read this: 

 

http://www.ovro.caltech.edu/~dwh/correlator/pdf/lfsr_tutorial.pdf 

 

 

--- Quote Start ---  

 

but I failed to convert into a VHDL entity, could anyone give some suggestion how should do that? 

 

This is the funtion: 

 

unsigned F8(unsigned x) 

x=(x*3+3)&0xFF; 

x=x^(11); 

return x; 

 

Thank U guys 

--- Quote End ---  

 

 

That's not VHDL. 

 

Cheers, 

Dave
0 Kudos
Reply