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

on chip memory problem

Altera_Forum
Honored Contributor II
1,379 Views

hello. what is the ideal size for on chip memory if my code is written using c programming which includes dma, performance counter and etc... currently, i am using default size which is 4096 bytes only... i am using altera de2 board. pls assist. thank you!

0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
699 Views

It depends on your code and optimization level. If you use the optimise for size and the small C library you can use a small on-chip memory but 4k is really low... I think that 16k would be a minimum.

0 Kudos
Altera_Forum
Honored Contributor II
699 Views

Hi, I used 20Kb but still cant work. i tried to use sdram but i need to use sdram to store data and i am afraid it will affect the code.

0 Kudos
Altera_Forum
Honored Contributor II
699 Views

as long as you use different areas there isn't any problem using the sdram for both code and data. You'll be very limited with 20k anyway. 

Did you use the sive optimization, small C library and reduced drivers?
0 Kudos
Altera_Forum
Honored Contributor II
699 Views

currently i set it to small c library only. so, setting it to reduced drivers will occupy less space? and where to find sive optimization? is support C++ will use more space? thank you!

0 Kudos
Altera_Forum
Honored Contributor II
699 Views

yes it will. Removing the C++ could also reduce it but I'm not sure. The optimizations will have the bigger impact on code size. It is in the project's builder settings.

0 Kudos
Altera_Forum
Honored Contributor II
699 Views

thanks for the reply again. I cant find project's builder settings.

0 Kudos
Altera_Forum
Honored Contributor II
699 Views
0 Kudos
Reply