#include <ChannelEstImpl.h>
#include <ChannelEst.h>
#include "ucps2.h"
#include "ucpm2.h"

void ChannelEstImpl(v16u32 * SVRReg,int *ConfigAddr, int *InAddr1, int *InAddr2, int *OutAddr)
{   

	for(int i=0;i<32;i++){
		InAddr1[i+1024] = InAddr1[i];
		InAddr2[i+1024] = InAddr2[i];
	}

	volatile int a;
    ChannelEst(ConfigAddr, MPU_ADDR(InAddr1),MPU_ADDR(InAddr2),MPU_ADDR(OutAddr));
	SVRReg[0][0] = MPU_ADDR(ConfigAddr);

	channelEstAsm(*SVRReg);
	a = __ucps2_getStatB();
	__ucps2_delay();

	for(int i=32;i<4096;i++){
		OutAddr[i] = 0;
	}



}
