1 #include "MISCQ7.h"
2 #include "Error.h"
3 
4 #define MAX(A,B) (A) > (B) ? (A) : (B)
5 
test_conv_q7()6     void MISCQ7::test_conv_q7()
7     {
8        arm_conv_q7(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
9     }
10 
test_correlate_q7()11     void MISCQ7::test_correlate_q7()
12     {
13        arm_correlate_q7(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 MISCQ7::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(MISCQ7::INPUTSA1_Q7_ID,mgr,this->nba);
27        input2.reload(MISCQ7::INPUTSB1_Q7_ID,mgr,this->nbb);
28 
29        switch(id)
30        {
31           case TEST_CONV_Q7_1:
32              output.create(this->nba + this->nbb - 1 ,MISCQ7::OUT_SAMPLES_Q7_ID,mgr);
33           break;
34 
35           case TEST_CORRELATE_Q7_2:
36              output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCQ7::OUT_SAMPLES_Q7_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 MISCQ7::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
47     {
48     }
49