Post Go back to editing

Buffers and memory allocation on sam board

Category: Software
Product Number: ADZS-SC589-MINI
Software Version: 3.0.2

Hello,

I have a few questions regarding memory allocation and buffers. Bear in mind I'm new to this processor and to DSP development in general. It is my understanding that if I want to access the external DDR ram on the sam board, then should use the #pragma directive. For example if I want to store a digital delay buffer in ddr ram I would write:

#pragma section("seg_sdram")
float digital_delay_buffer[DIGITAL_DELAY_BUF_SIZE];
#pragma section()
Questions:
- If I want to store in L1 or L2, what is the directive for those? Is there a file... maybe the .ldf where I can find this information? Where can I find the .ldf file and any relevant file I need.
- If I set the buffer size for a delay for example to 2^18 (is it recommended to have buffers of base-2 size?), Max delay time = BUF_SIZE / Sampling rate(48k) = 5.46 seconds, memory usage = 2^18 * 4(because float is 4 bytes per) = 1,048,576 bytes ~1MB. Because of all the space this takes up, it is recommended to use the external ram to store it. But if I have other effects in series with this that don't require a large buffer, should I be using a separate buffer? If so, how can I cascade the audio signal so that it is processed by each effect it goes through.
- Is there any documentation regarding memory allocation on the SHARC processors or even for the sam board specifically?

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.