Post Go back to editing

Error result of FIR after down-sampler in sigmastudio

Software Version: sigmastudio V4.6 / CCES 2.11

ADSP-21569      Sigmastudio V4.6      CCES 2.11

Question1:

I set up the following schematic with blocksize 64 in sigmastudio.

TB source provide a pulse(1,sixty-three zeros/sixty-four zeros/sixty-four zeros...16 blocks and 1024 samples;'/' Split the output of each block) at blocksize 64.

Down-sampler1 reduce the blocksize to 2.The output of down-sampler is (1,0/0,0/0,0/0,0...16 blocks and 32 samples).

FIR (accelerator) filter coefficients are 1,2,3,4,5....100(100 orders).

And the module ‘test’ print the output of FIR filter is 1,2/0,0/0,0/0,0/0,0/5,6....The correct result must be 1,2/3,4/5,6....(16 blocks and 32 samples).

Is that the FIR filter in sigmastudio can't used in multiple sampleing rates schematic?

Is there any highly effective approach to solve this problem?

Final goal:

Filtering is performed at the low sampling rate(1.5k), and then it is raised back to the original sampling rate(48k).

With less FIR order and computation to complete the processing of the low frequency part.

#include "adi_ss_extmod.h"
#define BLOCKSIZE 64
#define NBLOCKS
void BPROCESS_TBsource(SSBlockAlgo *pBlkAlgoInfo)
{
	uint32_t 	i, sample, blockSize,*debugPara;
	float32_t 	*pInput,*pOutput;

	blockSize 	= pBlkAlgoInfo->pInputs[0].pBlockProperties->nBlockSize;
	pInput 		= pBlkAlgoInfo->pInputs[0].pSamples;
	pOutput		= pBlkAlgoInfo->pOutputs[0].pSamples;
	debugPara 	= (uint32_t *)(pBlkAlgoInfo->pParam);

	static float32_t x[1024]={1};

	if(debugPara[0]==16)
	{
		for(sample=0;sample<0;sample++)
		{
			pOutput[sample]=x[debugPara[0]*blockSize+sample];
		}
		for(sample=0;sample<64;sample++)
		{
			pOutput[sample]=0;
		}
	}
	for(sample=0;sample<blockSize;sample++)
	{
		pOutput[sample]=x[debugPara[0]*blockSize+sample];
	}
	debugPara[0]++;
}

void INIT_TBsource(SSBlockAlgo *pBlkAlgoInfo)
{
}

#include <stdio.h>
#include <string.h>
#include <math.h>
#include "adi_ss_extmod.h"

void BPROCESS_LRtest(SSBlockAlgo *pBlkAlgoInfo)
{
	uint32_t 	i, sample, blockSize,*debugPara;
	float32_t 	*pInput,*pOutput;

	blockSize 	= pBlkAlgoInfo->pInputs[0].pBlockProperties->nBlockSize;
	pInput 		= pBlkAlgoInfo->pInputs[0].pSamples;
	pOutput 	= pBlkAlgoInfo->pOutputs[0].pSamples;
	debugPara	= (uint32_t *)(pBlkAlgoInfo->pParam);

	if(debugPara[0]==16)
		return;

	for(sample=0;sample<blockSize;sample++)
	{
		printf("%f\n",pInput[sample]);
	}
	debugPara[0]++;
}

void INIT_LRtest(SSBlockAlgo *pBlkAlgoInfo)
{
	printf("\nTEST BEGIN.\n");
}

Question2:

Down-sampler32(with Anti-alias) require 2 MCPS.And Up-sampler32(Enable filter) require 12 MCPS.Why are they so different in MCPS.



Supplement the node output in the problem.
[edited by: ZTB at 12:18 PM (GMT -5) on 16 Dec 2022]
Parents Reply Children
No Data