Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21593 Discussions

C2H Many Multipliers

Altera_Forum
Honored Contributor II
962 Views

Hello, 

 

I'm trying to use C2H to build an algorithm to use many multipliers. For the sake of this post, lets say 4 multipliers. 

 

It is for a filter application (i know there is an fft block, but I would like the flexibility of implementing this in c2h), so there is just a fixed coefficient set. 

 

Because of the way c2h works, if I initialize the coefficient set in the declaration, it uses system memory, not on-chip memories. So... I loaded the coefficients into system memory, then at the beginning of the function, I load the coefficients into 4 local arrays (uninitialized on-chip rams). This "works," but I am looking for a couple of improvements. 

 

First, in this implementation, I reload the coefficient set every time the function is called. This really only needs to be done once, then does not ever need to be done again because the coefficients are constant. Ideally, I could just initialize the array and segment it into 4 sections, but the tool doesn't seem to allow that. Any ideas how to get it to initialize the on-chip ram only once? 

 

Second, when I created my 4 local arrays, it created 4 separate on-chip memories. My coefficient set is not overly large, but each memory is likely stored in a 4k block (I guess I still need to verify this). Anyhow, is there anyway to specify that you want it to build 2 port rams or something so you can share the space on the chip? 

 

Thanks, 

 

Mike
0 Kudos
0 Replies
Reply