Lines Matching +full:language +full:- +full:cpp
1 /* ----------------------------------------------------------------------
3 * Title: FPGA.cpp
13 * Target Processor: Cortex-M cores
14 * -------------------------------------------------------------------- */
16 * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
18 * SPDX-License-Identifier: Apache-2.0
24 * www.apache.org/licenses/LICENSE-2.0
29 * See the License for the specific language governing permissions and
59 this->m_testDesc=testDesc; in FPGA()
60 this->m_patterns=patterns; in FPGA()
62 this->currentDesc=testDesc; in FPGA()
63 this->path=new std::vector<std::string>(); in FPGA()
65 this->patternOffsets=new std::vector<unsigned long>(); in FPGA()
66 this->patternSizes=new std::vector<unsigned long>(); in FPGA()
68 this->parameterOffsets=new std::vector<struct offsetOrGen>(); in FPGA()
69 this->parameterSizes=new std::vector<unsigned long>(); in FPGA()
71 this->outputNames=new std::vector<std::string>(); in FPGA()
77 …:vector<struct offsetOrGen>::iterator it = this->parameterOffsets->begin() ; it != this->parameter… in DeleteParams()
79 if (it->kind==1) in DeleteParams()
81 if (it->data) in DeleteParams()
83 free(it->data); in DeleteParams()
84 it->data = NULL; in DeleteParams()
92 delete(this->path); in ~FPGA()
94 delete(this->patternOffsets); in ~FPGA()
95 delete(this->patternSizes); in ~FPGA()
96 this->DeleteParams(); in ~FPGA()
97 delete(this->parameterOffsets); in ~FPGA()
98 delete(this->parameterSizes); in ~FPGA()
100 delete(this->outputNames); in ~FPGA()
111 a = *this->currentDesc++; in read32()
112 b = *this->currentDesc++; in read32()
113 c = *this->currentDesc++; in read32()
114 d = *this->currentDesc++; in read32()
127 while(*this->currentDesc != 0) in readStr()
129 *p++ = *this->currentDesc++; in readStr()
132 this->currentDesc++; in readStr()
137 *c = *this->currentDesc; in readChar()
138 this->currentDesc++; in readChar()
149 tmp += this->testDir; in getOutputPath()
150 sprintf(fmt,"/%s_%ld.txt",(*this->outputNames)[id].c_str(),this->currentId); in getOutputPath()
166 this->read32(&nb); in ReadNbParameters()
181 this->read32(&kind); in ReadTestIdentification()
182 this->read32(&theId); in ReadTestIdentification()
184 this->readChar(&hasParamID); in ReadTestIdentification()
185 this->m_hasParam=false; in ReadTestIdentification()
188 this->m_hasParam=true; in ReadTestIdentification()
189 this->read32(¶mID); in ReadTestIdentification()
190 this->currentParam=paramID; in ReadTestIdentification()
193 this->readChar(&hasPath); in ReadTestIdentification()
196 this->readStr(tmp); in ReadTestIdentification()
197 //printf("-->%s\n",tmp); in ReadTestIdentification()
201 this->currentKind=kind; in ReadTestIdentification()
202 this->currentId=theId; in ReadTestIdentification()
209 printf("S: s %ld\n",this->currentId); in ReadTestIdentification()
212 printf("S: g %ld\n",this->currentId); in ReadTestIdentification()
224 this->testDir = "."; in recomputeTestDir()
227 for (iter = this->path->begin(); iter != this->path->end(); ++iter) in recomputeTestDir()
231 this->testDir = *iter; in recomputeTestDir()
238 this->testDir += "/" + *iter; in recomputeTestDir()
246 this->ReadTestIdentification(); in ReadIdentification()
247 this->path->push_back(currentPath); in ReadIdentification()
248 this->recomputeTestDir(); in ReadIdentification()
264 printf("S: %ld %ld %ld 0 N\n",this->currentId,error,lineNb); in DispStatus()
269 printf("S: %ld 0 0 t Y\n",this->currentId); in DispStatus()
271 printf("S: %ld 0 0 %u Y\n",this->currentId, cycles); in DispStatus()
284 this->path->pop_back(); in EndGroup()
300 this->read32(&nbPatterns); in ReadPatternList()
301 this->patternOffsets->clear(); in ReadPatternList()
302 this->patternSizes->clear(); in ReadPatternList()
307 this->read32(&offset); in ReadPatternList()
308 this->read32(&nb); in ReadPatternList()
309 this->patternOffsets->push_back(offset); in ReadPatternList()
310 this->patternSizes->push_back(nb); in ReadPatternList()
329 this->read32(&nbValues); in ReadParameterList()
331 this->DeleteParams(); in ReadParameterList()
332 this->parameterOffsets->clear(); in ReadParameterList()
333 this->parameterSizes->clear(); in ReadParameterList()
338 this->readChar(¶mKind); in ReadParameterList()
343 this->read32(&offset); in ReadParameterList()
344 this->read32(&nb); in ReadParameterList()
357 this->read32(&kind); in ReadParameterList()
359 this->read32(&nbInputSamples); in ReadParameterList()
360 this->read32(&nbOutputSamples); in ReadParameterList()
361 this->read32(&dimensions); in ReadParameterList()
368 this->read32(&sample); in ReadParameterList()
380 this->parameterOffsets->push_back(gen); in ReadParameterList()
381 this->parameterSizes->push_back(nb); in ReadParameterList()
390 this->read32(&nbOutputs); in ReadOutputList()
391 this->outputNames->clear(); in ReadOutputList()
396 this->readStr(tmp); in ReadOutputList()
398 this->outputNames->push_back(tmpstr); in ReadOutputList()
404 return((*this->patternOffsets)[id]); in getPatternOffset()
409 return((Testing::nbSamples_t)((*this->patternSizes)[id])); in GetPatternSize()
414 return((*this->parameterOffsets)[id].offset); in getParameterOffset()
420 return((*this->parameterOffsets)[id]); in getParameterDesc()
448 struct offsetOrGen gen = this->getParameterDesc(id); in ImportParams()
457 const char *patternStart = this->m_patterns + offset; in ImportParams()
495 return(this->m_hasParam); in hasParam()
500 return(this->currentParam); in getParamID()
509 offset=this->getPatternOffset(id); in ImportPattern_f64()
511 const char *patternStart = this->m_patterns + offset; in ImportPattern_f64()
528 offset=this->getPatternOffset(id); in ImportPattern_f32()
530 const char *patternStart = this->m_patterns + offset; in ImportPattern_f32()
549 offset=this->getPatternOffset(id); in ImportPattern_f16()
551 const char *patternStart = this->m_patterns + offset; in ImportPattern_f16()
570 offset=this->getPatternOffset(id); in ImportPattern_q63()
572 const char *patternStart = this->m_patterns + offset; in ImportPattern_q63()
589 offset=this->getPatternOffset(id); in ImportPattern_q31()
591 const char *patternStart = this->m_patterns + offset; in ImportPattern_q31()
608 offset=this->getPatternOffset(id); in ImportPattern_q15()
610 const char *patternStart = this->m_patterns + offset; in ImportPattern_q15()
627 offset=this->getPatternOffset(id); in ImportPattern_q7()
629 const char *patternStart = this->m_patterns + offset; in ImportPattern_q7()
646 offset=this->getPatternOffset(id); in ImportPattern_u64()
648 const char *patternStart = this->m_patterns + offset; in ImportPattern_u64()
666 offset=this->getPatternOffset(id); in ImportPattern_u32()
668 const char *patternStart = this->m_patterns + offset; in ImportPattern_u32()
685 offset=this->getPatternOffset(id); in ImportPattern_u16()
687 const char *patternStart = this->m_patterns + offset; in ImportPattern_u16()
704 offset=this->getPatternOffset(id); in ImportPattern_u8()
706 const char *patternStart = this->m_patterns + offset; in ImportPattern_u8()
729 std::string fileName = this->getOutputPath(id); in DumpPattern_f64()
752 std::string fileName = this->getOutputPath(id); in DumpPattern_f32()
772 std::string fileName = this->getOutputPath(id); in DumpPattern_f16()
792 std::string fileName = this->getOutputPath(id); in DumpPattern_q63()
815 std::string fileName = this->getOutputPath(id); in DumpPattern_q31()
834 std::string fileName = this->getOutputPath(id); in DumpPattern_q15()
853 std::string fileName = this->getOutputPath(id); in DumpPattern_q7()
872 std::string fileName = this->getOutputPath(id); in DumpPattern_u64()
896 std::string fileName = this->getOutputPath(id); in DumpPattern_u32()
915 std::string fileName = this->getOutputPath(id); in DumpPattern_u16()
934 std::string fileName = this->getOutputPath(id); in DumpPattern_u8()
953 return(this->currentId); in CurrentTestID()