Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Once I generate a number, I want to figure out which "bin" between 1-256 does this number correspond to using the constant array. The mapping happens to be non-linear. --- Quote End --- Perhaps you can be a little clearer on what is non-linear. You say there are only 256 possible RAM locations, but comment there are 16-bit data coming in. Can this non-linearity be described by an equation, eg., the simplest case would be truncation of the 8 LSBs. FPGAs can be used to implement spline fits. If a low-order polynomial can be used to describe your mapping, perhaps it can be implemented as an efficient input-to-RAM address mapping. Cheers, Dave