Greetings of the day DSP concepts,
When operating with 2 channels, the system performs well. However, we are encountering CPU overshoot when handling 120 input channels and 120 output channels (our maximum configuration) in a pass-through layout with just 3 crossovers(HP).
Below is the target system information:
Target Information:
- Name: Sharc1, AWECore Version: 8.D.5.12,Processor Type: SHARC 215xx,CPU Clock Rate: 1 GHz,Profile Clock Rate: 250 MHz,Sample Rate: 48,000 Hz,Basic Block Size: 32 samples,Communication Buffer Size: 264 words,FLASH Support: Yes,Size of 'int': 4,User Version: 20230227,Cores: 2,Threads: 2
Pins Configuration:
- Input Channels: 120 (fract)
- Output Channels: 120 (fract)
Here is the code how we are pumping audio to AWEProcessing();
#define ADC_CHANNEL_STRIDE 120 //input channel
if (awe_audioIsStarted(&g_AWEInstance) > 0)
{
s_AWE_Sharc1_running = 1;
// Insert the received HW input samples into the AudioWeaver buffer
for(awe_CH=0;awe_CH<ADC_CHANNEL_STRIDE;awe_CH++)
{
awe_audioImportSamples(&g_AWEInstance, &pAnalogInSamples[awe_CH], ADC_CHANNEL_STRIDE, awe_CH, Sample32bit);
}
for(awe_CH=0;awe_CH<DAC_CHANNEL_STRIDE;awe_CH++)
{
awe_audioExportSamples(&g_AWEInstance, &pProcessedSamplesForCODEC[awe_CH], DAC_CHANNEL_STRIDE, awe_CH, Sample32bit);
}
Here are my questions
Q1) what is equation awe_audioImportSamples() function WRT to CPU Load, will there be any effect if we decrease or increase the fast heap/fast heap b memory
Q2) Is there a maximum configuration for import/export channels?
Q3) Is there a more optimized method to pump audio this information without causing CPU overshoot?
Please do let me know if you have any other information needed ?
5:13pm
Hi Harish,
a) The awe_audioImportSamples() function is not located where the profiling function of Audio Weaver can measure it. You will have to time this outside of the AWE environment and it will be processor dependent.
b) 255
c) The examples I have from one of our BSPs optimized this a little by doing "loop unrolling", e.g.
// Insert the received ADC samples into the AudioWeaver buffer
awe_audioImportSamples(&g_AWEInstance, pAnalogInSamples + 0, STRIDE8, CHANNEL1, Sample24bit_high);
awe_audioImportSamples(&g_AWEInstance, pAnalogInSamples + 1, STRIDE8, CHANNEL2, Sample24bit_high);
awe_audioImportSamples(&g_AWEInstance, pAnalogInSamples + 2, STRIDE8, CHANNEL3, Sample24bit_high);
awe_audioImportSamples(&g_AWEInstance, pAnalogInSamples + 3, STRIDE8, CHANNEL4, Sample24bit_high);
// Insert the processed Audio Weaver samples into the DAC output buffer
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 1, STRIDE12, CHANNEL1, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 0, STRIDE12, CHANNEL2, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 3, STRIDE12, CHANNEL3, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 2, STRIDE12, CHANNEL4, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 5, STRIDE12, CHANNEL5, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 4, STRIDE12, CHANNEL6, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 7, STRIDE12, CHANNEL7, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 6, STRIDE12, CHANNEL8, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 9, STRIDE12, CHANNEL9, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 8, STRIDE12, CHANNEL10, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 11, STRIDE12, CHANNEL11, Sample24bit_high);
awe_audioExportSamples(&g_AWEInstance, pProcessedSamplesForCODEC + 10, STRIDE12, CHANNEL12, Sample24bit_high);
Thanks,
Gary