Forum Discussion
Altera_Forum
Honored Contributor
11 years agoAhmed,
The number generator outputs a random number that is then used to determine the address into the ROM/RAM. So in my example, if the random number 5 is output by the PRNG, this value is read in by the RAM/ROM block, a for-loop is run to determine which index corresponds to this number, and the output of the ROM/RAM block is the index. I made a slight mistake in the diagram-the amplitude out is NOT an input to the PRNG, it is used by a different block of code. The for-loop logic currently resides in the ROM/RAM block. It is not a wrapper at the moment. The loop requires that I declare the entire array as a constant. I cannot loop through an array that I read in via a .mif file. So this is why the synthesizer does not instantiate a ROM/RAM block. I call it a ROM block in the diagram, but due to this logic it is not implemented as such. This is where I'm having trouble with the logic. --- Quote Start --- Hi , "It's not a true ROM/RAM in the sense that the "address" being input to the ROM/RAM block is not the index, but is used to determine the index." So according to your diagram , what is 'Pseudo-Random Number Generator' generating a random address for a random location on ROM/RAM ? "For now I have for-loop which basically runs through the entire array, compares the random number to the values in the array, and outputs the index. However" Entire array i.e the ROM/RAM ? is this logic a wrapper with ROM/RAM as a component inside it ? Ahmed Asim Ghouri Embedded Strings inc Website : www.emstrings.com Email : support@emstrings.com --- Quote End ---