FIRF16.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include "FIRF16.h"
  2. #include "Error.h"
  3. void FIRF16::test_fir_f16()
  4. {
  5. arm_fir_f16(&instFir, this->pSrc, this->pDst, this->nbSamples);
  6. }
  7. void FIRF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  8. {
  9. std::vector<Testing::param_t>::iterator it = params.begin();
  10. this->nbTaps = *it++;
  11. this->nbSamples = *it;
  12. samples.reload(FIRF16::SAMPLES1_F16_ID,mgr,this->nbSamples);
  13. coefs.reload(FIRF16::COEFS1_F16_ID,mgr,this->nbTaps);
  14. state.create(this->nbSamples + this->nbTaps - 1,FIRF16::STATE_F16_ID,mgr);
  15. output.create(this->nbSamples,FIRF16::OUT_SAMPLES_F16_ID,mgr);
  16. switch(id)
  17. {
  18. case TEST_FIR_F16_1:
  19. arm_fir_init_f16(&instFir,this->nbTaps,coefs.ptr(),state.ptr(),this->nbSamples);
  20. this->pSrc=samples.ptr();
  21. this->pCoefs=coefs.ptr();
  22. this->pDst=output.ptr();
  23. break;
  24. }
  25. }
  26. void FIRF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  27. {
  28. }