0
\$\begingroup\$

I have currently successfully stored some 16-bit, 48kHz audio samples using M9K blocks. Everything is perfectly functional, including their playback. My only problem is that, from my understanding (might be wrong) i have no more space for another array of samples since I am almost reaching the maximum number of M9K blocks available (432, from the user manual).

What I would like to know is if, instead of storing the samples using M9K blocks, I could store them in another memory resource of the DE2-115 (maybe external memory?).

I have no idea how I would possibly do that in Quartus. I currently initialize M9K ROMs by writing Memory Initialization Files, but have no clue on how it would be done without using the blocks. I know how RAM controllers work, but still, I would need the samples to be somewhere in the board for them to be written. (cannot use SD cards or any external memory devices)

EDIT: Please have in consideration I cannot write standard ROM/RAM VHDL files, as the array of samples is so big it would take loads of time to compile. Thanks in advance!

\$\endgroup\$

put on hold as too broad by Chris Stratton, RoyC, Finbarr, Lior Bilia, Brian Carlton May 17 at 0:13

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ Couldn't you put them in SPI flash? \$\endgroup\$ – Ignacio Vazquez-Abrams May 16 '18 at 15:25
0
\$\begingroup\$

Well, if they're not in the FPGA design to begin with, you'll have to bring them in somehow. The board has SRAM, SDRAM, and flash memory. If you use SRAM or SDRAM, then you'll have to load the samples onto the board every time you turn it on. If you use flash memory, then you should be able to get away with just loading them once. As for how to get the samples on the board, you'll have to use some sort of external I/O - serial, Ethernet, USB, SD card, etc. - and write some sort of loader code to write the samples into the memory.

\$\endgroup\$
0
\$\begingroup\$

If you need more memory than is on the chip, you'll need to use external memory.

The DE2-115 does have external memory, Its SDRAM (an ISSI part). If your using a NIOS processor there is a video on how to connect the external memory.

If you don't want to use NIOS, there is an SDRAM memory controller under the university section of the IP library which you could write your own memory controller controller and rig it up to the avalon bus the Altera's memory controller provides. There is a datasheet on the timing for this controller

Your easiest (least time consuming) route if you can fit it on the FPGA would be to include a NIOS processor and SDRAM controller.

If your out of M9K blocks, you may want to see if there is a pin compatible FPGA that has more memory that you could replace the existing FPGA on the DE2 board. Since the DE2 already has the largest available RAM in the cyclone series, your best option is to upgrade to a different dev board with a MAX10 or cyclone10.

You may not like these answers but it is what it is, you run out of memory, there isn't an easy way around getting more.

I ran out of memory on a Max10 part and ended up upgrading it to a part with more m9k blocks, when I needed more memory, I included an external SDRAM on my board.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.