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