1 #include "MISCQ31.h"
2 #include "Error.h"
3 
4 #define MAX(A,B) (A) > (B) ? (A) : (B)
5 
test_conv_q31()6     void MISCQ31::test_conv_q31()
7     {
8        arm_conv_q31(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
9     }
10 
test_correlate_q31()11     void MISCQ31::test_correlate_q31()
12     {
13        arm_correlate_q31(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
14     }
15 
16 
setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)17     void MISCQ31::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
18     {
19 
20 
21        std::vector<Testing::param_t>::iterator it = params.begin();
22        this->nba = *it++;
23        this->nbb = *it;
24 
25        input1.reload(MISCQ31::INPUTSA1_Q31_ID,mgr,this->nba);
26        input2.reload(MISCQ31::INPUTSB1_Q31_ID,mgr,this->nbb);
27 
28        switch(id)
29        {
30           case TEST_CONV_Q31_1:
31              output.create(this->nba + this->nbb - 1 ,MISCQ31::OUT_SAMPLES_Q31_ID,mgr);
32           break;
33 
34           case TEST_CORRELATE_Q31_2:
35              output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCQ31::OUT_SAMPLES_Q31_ID,mgr);
36           break;
37        }
38 
39        this->inp1=input1.ptr();
40        this->inp2=input2.ptr();
41        this->outp=output.ptr();
42 
43     }
44 
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)45     void MISCQ31::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
46     {
47     }
48