Commit efc9b89c authored by dauncey's avatar dauncey
Browse files

Throttling and exceeding

parent 56642b92
...@@ -19,6 +19,9 @@ public: ...@@ -19,6 +19,9 @@ public:
void boj(const BeSlinkSim &b, unsigned nHistory=100000) { void boj(const BeSlinkSim &b, unsigned nHistory=100000) {
fBeSlinkSim=&b; fBeSlinkSim=&b;
fPreviousThrottleActive=false;
fRaisedThrottleBx=-1;
fEndedThrottleBx=-1;
std::ostringstream sout; std::ostringstream sout;
sout << "BeSlinkAna" << std::setw(2) << std::setfill('0') sout << "BeSlinkAna" << std::setw(2) << std::setfill('0')
...@@ -26,15 +29,7 @@ public: ...@@ -26,15 +29,7 @@ public:
std::string sHgcroc[18]={"00","01","02","03","04","05","06","07","08", std::string sHgcroc[18]={"00","01","02","03","04","05","06","07","08",
"09","10","11","12","13","14","15","16","17"}; "09","10","11","12","13","14","15","16","17"};
/*
hBitmapWordsVsChannels=new TH1I((sout.str()+"BitmapWordsVsChannels").c_str(),
";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5);
hLabelsWordsVsChannels=new TH1I((sout.str()+"LabelsWordsVsChannels").c_str(),
";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5);
hTotalChannels=new TH1D((sout.str()+"TotalChannels").c_str(),
";ECON total number of channels",1300,0,1300);
*/
hTotalEventWords=new TH1D((sout.str()+"TotalEventWords").c_str(), hTotalEventWords=new TH1D((sout.str()+"TotalEventWords").c_str(),
";Total number of bytes per event",250,0,4000); ";Total number of bytes per event",250,0,4000);
...@@ -46,45 +41,22 @@ public: ...@@ -46,45 +41,22 @@ public:
";Number of event buffer words used",1000,0,10000); ";Number of event buffer words used",1000,0,10000);
hEventBufferUsedHistory[e][b]=new TH1I((sout.str()+"Econ"+sHgcroc[e]+"Block"+sHgcroc[b]+"EventBufferUsedHistory").c_str(), hEventBufferUsedHistory[e][b]=new TH1I((sout.str()+"Econ"+sHgcroc[e]+"Block"+sHgcroc[b]+"EventBufferUsedHistory").c_str(),
";BX;Number of event buffer words used",nHistory,0,nHistory); ";BX;Number of event buffer words used",nHistory,0,nHistory);
hEventBufferExceeded[e][b]=new TH1D((sout.str()+"Econ"+sHgcroc[e]+"Block"+sHgcroc[b]+"EventBufferExceeded").c_str(),
";Number of event buffer words used",1000,0,10000);
} }
} }
/*
for(unsigned h(0);h<18;h++) {
hChannels[h]=new TH1D((sout.str()+"Hgcroc"+sHgcroc[h]+"Channels").c_str(),
";Number of channels per HGCROC packet",73,0,73);
hWords[h]=new TH1D((sout.str()+"Hgcroc"+sHgcroc[h]+"Words").c_str(),
";Number of words per HGCROC packet",60,0,60);
hWordsVsChannels[h]=new TH2D((sout.str()+"Hgcroc"+sHgcroc[h]+"WordsVsChannels").c_str(),
";Number of channels per HGCROC packet;Number of words per HGCROC packet",73,-0.5,72.5,60,-0.5,59.5);
}
*/
}
void analyseL1Accept(uint64_t bx) { hThrottleActiveHistory=new TH1I((sout.str()+"ThrottleActiveHistory").c_str(),
/* ";BX;Throttle active",nHistory,0,nHistory);
unsigned nChannels(0),nWords(0); hRaisedThrottleToL1Accept=new TH1D((sout.str()+"RaisedThrottleToL1Accept").c_str(),
for(unsigned h(0);h<18;h++) { ";L1Accept - ended throttle (BX)",1000,0,1000);
hChannels[h]->Fill(fEconSim->numberOfChannels(h)); hEndedThrottleToL1Accept=new TH1D((sout.str()+"EndedThrottleToL1Accept").c_str(),
hWords[h]->Fill(fEconSim->numberOfWords(h)); ";L1Accept - ended throttle (BX)",1000,0,1000);
hWordsVsChannels[h]->Fill(fEconSim->numberOfChannels(h),fEconSim->numberOfWords(h));
nChannels+=fEconSim->numberOfChannels(h);
nWords+=fEconSim->numberOfWords(h);
} }
hTotalChannels->Fill(nChannels); void analyseL1Accept(uint64_t bx) {
hTotalWords->Fill(nWords); if(fRaisedThrottleBx!=-1) hRaisedThrottleToL1Accept->Fill(bx-fRaisedThrottleBx);
if(fEndedThrottleBx!=-1) hEndedThrottleToL1Accept->Fill(bx-fEndedThrottleBx);
for(unsigned block(0);block<fEconSim->fEconArch.fNumberOfBlocks;block++) {
unsigned nBlockChannels(0),nBlockWords(0);
for(unsigned i(0);i<fEconSim->fEconArch.fHgcrocNumber[block].size();i++) {
unsigned h(fEconSim->fEconArch.fHgcrocNumber[block][i]);
nBlockChannels+=fEconSim->numberOfChannels(h);
nBlockWords+=fEconSim->numberOfWords(h);
}
hBlockTotalChannels[block]->Fill(nBlockChannels);
hBlockTotalWords[block]->Fill(nBlockWords);
}
*/
} }
void analyseBx(uint64_t bx) { void analyseBx(uint64_t bx) {
...@@ -94,12 +66,22 @@ public: ...@@ -94,12 +66,22 @@ public:
for(unsigned b(0);b<econArch.numberOfBlocks();b++) { for(unsigned b(0);b<econArch.numberOfBlocks();b++) {
hEventBufferUsed[e][b]->Fill(fBeSlinkSim->fEventBuffer[e][b].used()); hEventBufferUsed[e][b]->Fill(fBeSlinkSim->fEventBuffer[e][b].used());
hEventBufferUsedHistory[e][b]->Fill(bx,fBeSlinkSim->fEventBuffer[e][b].used()); hEventBufferUsedHistory[e][b]->Fill(bx,fBeSlinkSim->fEventBuffer[e][b].used());
if(fBeSlinkSim->exceededBuffer()) hEventBufferExceeded[e][b]->Fill(fBeSlinkSim->fEventBuffer[e][b].used());
} }
} }
if(fBeSlinkSim->fL1AcceptEoe) { if(fBeSlinkSim->fL1AcceptEoe) {
hTotalEventWords->Fill(16*fBeSlinkSim->fTotalNumberOfEventWords); hTotalEventWords->Fill(16*fBeSlinkSim->fTotalNumberOfEventWords);
} }
if(fBeSlinkSim->fThrottleActive) {
if(!fPreviousThrottleActive) fRaisedThrottleBx=bx;
hThrottleActiveHistory->Fill(bx);
} else {
if(fPreviousThrottleActive) fEndedThrottleBx=bx;
}
fPreviousThrottleActive=fBeSlinkSim->fThrottleActive;
} }
void eoj() { void eoj() {
...@@ -108,24 +90,18 @@ public: ...@@ -108,24 +90,18 @@ public:
private: private:
const BeSlinkSim *fBeSlinkSim; const BeSlinkSim *fBeSlinkSim;
//TH1I *hBitmapWordsVsChannels; bool fPreviousThrottleActive;
//TH1I *hLabelsWordsVsChannels; uint64_t fRaisedThrottleBx;
uint64_t fEndedThrottleBx;
//TH1D *hMeans;
//TH1D *hChannels[18];
//TH1D *hWords[18];
//TH2D *hWordsVsChannels[18];
//TH1D *hTotalChannels;
//TH1D *hTotalWords;
//TH1D *hBlockTotalChannels[7];
//TH1D *hBlockTotalWords[7];
TH1D *hTotalEventWords; TH1D *hTotalEventWords;
TH1I *hThrottleActiveHistory;
TH1D *hRaisedThrottleToL1Accept;
TH1D *hEndedThrottleToL1Accept;
TH1D *hEventBufferUsed[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; TH1D *hEventBufferUsed[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon];
TH1I *hEventBufferUsedHistory[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon]; TH1I *hEventBufferUsedHistory[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon];
TH1D *hEventBufferExceeded[Dimensions::MaxNumberOfEconsPerSlink][Dimensions::MaxNumberOfBlocksPerEcon];
}; };
#endif #endif
...@@ -44,22 +44,20 @@ public: ...@@ -44,22 +44,20 @@ public:
BeSlinkSim() { BeSlinkSim() {
} }
void boj(const SlinkArch &a) { void boj(const SlinkArch &a, unsigned bl) {
//fSlink=a.slinkNumber();
fSlinkArch=&a; fSlinkArch=&a;
fBufferLimit=bl;
if(fPrintLevel>0) { if(fPrintLevel>0) {
std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::ctor() " std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::ctor() "
<< "Entered" << std::endl; << "Entered with buffer limit = " << fBufferLimit << std::endl;
} }
fThrottleActive=false;
fEventActive=false; fEventActive=false;
fActiveInputBuffer=0; fActiveInputBuffer=0;
fWriteElink=0; fWriteElink=0;
//fBufferLimit=1048;
fBufferLimit=1000000000;
fArrayWrite=0; fArrayWrite=0;
for(unsigned i(0);i<4;i++) fArrayWord[i]=0; for(unsigned i(0);i<4;i++) fArrayWord[i]=0;
...@@ -89,74 +87,21 @@ public: ...@@ -89,74 +87,21 @@ public:
void processBx(uint64_t bx, const SlinkElinkData &d) { void processBx(uint64_t bx, const SlinkElinkData &d) {
//#define OLD_METHOD fExceededBuffer=false;
#ifdef OLD_METHOD
if((bx%2)==0) {
fSlinkElinkData=d;
} else {
uint64_t word,word2;
#endif
for(unsigned e(0);e<fSlinkArch->numberOfEcons();e++) { for(unsigned e(0);e<fSlinkArch->numberOfEcons();e++) {
const EconArch &econArch(fSlinkArch->econArch(e)); const EconArch &econArch(fSlinkArch->econArch(e));
for(unsigned b(0);b<econArch.numberOfBlocks();b++) { for(unsigned b(0);b<econArch.numberOfBlocks();b++) {
const std::vector<unsigned> &elinkNumber(econArch.elinkNumber(b)); const std::vector<unsigned> &elinkNumber(econArch.elinkNumber(b));
#ifdef OLD_METHOD
unsigned eo(0);
for(unsigned w(0);w<elinkNumber.size();w++) {
if((eo%2)==0) {
word=fSlinkElinkData.fData[e][elinkNumber[w]];
} else {
word2=fSlinkElinkData.fData[e][elinkNumber[w]];
word+=(word2<<32);
//if(word!=0) assert(fEventBuffer[e][fSlinkArch->econArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word));
if(word!=0) assert(fEventBuffer[e][b].writeAndIncrementPtr(word));
}
eo++;
}
for(unsigned w(0);w<elinkNumber.size();w++) {
if((eo%2)==0) {
word=d.fData[e][elinkNumber[w]];
} else {
word2=d.fData[e][elinkNumber[w]];
word+=(word2<<32);
//if(word!=0) assert(fEventBuffer[e][fSlinkArch->econArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word));
if(word!=0) assert(fEventBuffer[e][b].writeAndIncrementPtr(word));
}
eo++;
}
/*
// DO BY ARCH PROPERLY!!!
for(unsigned w(0);w<Dimensions::MaxNumberOfElinksPerEcon;w++) {
word=fSlinkElinkData.fData[e][w];
if(word!=0) assert(fEventBuffer[e][fSlinkArch->econArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word));
}
for(unsigned w(0);w<Dimensions::MaxNumberOfElinksPerEcon;w++) {
word=d.fData[e][w];
//word=(word<<32)+fSlinkElinkData.fData[e][w];
if(word!=0) assert(fEventBuffer[e][fSlinkArch->econArch(e).numberOfBlocks()==1?0:w].writeAndIncrementPtr(word));
}
*/
}
#else
uint32_t word; uint32_t word;
for(unsigned w(0);w<elinkNumber.size();w++) { for(unsigned w(0);w<elinkNumber.size();w++) {
word=d.fData[e][elinkNumber[w]]; word=d.fData[e][elinkNumber[w]];
if(word!=0 || fEventBuffer[e][b].isCachedWriteWord()) assert(fEventBuffer[e][b].halfWriteAndIncrementPtr(word)); if(word!=0 || fEventBuffer[e][b].isCachedWriteWord()) assert(fEventBuffer[e][b].halfWriteAndIncrementPtr(word));
} }
#endif
if(fEventBuffer[e][b].used()>=4095) fExceededBuffer=true;
//processEconBx(e,d.fData[e]);
} }
} }
...@@ -304,6 +249,10 @@ public: ...@@ -304,6 +249,10 @@ public:
} }
} }
bool exceededBuffer() const {
return fExceededBuffer;
}
void processEconBx(unsigned ec, const uint32_t *d) { void processEconBx(unsigned ec, const uint32_t *d) {
return; return;
...@@ -477,7 +426,9 @@ public: ...@@ -477,7 +426,9 @@ public:
#endif #endif
} }
bool throttle() const { bool throttle() {
if(fThrottleActive) return false;
for(unsigned e(0);e<fSlinkArch->numberOfEcons();e++) { for(unsigned e(0);e<fSlinkArch->numberOfEcons();e++) {
const EconArch &econArch(fSlinkArch->econArch(e)); const EconArch &econArch(fSlinkArch->econArch(e));
for(unsigned b(0);b<econArch.numberOfBlocks();b++) { for(unsigned b(0);b<econArch.numberOfBlocks();b++) {
...@@ -487,12 +438,36 @@ public: ...@@ -487,12 +438,36 @@ public:
<< "Applying throttle" << "Applying throttle"
<< std::endl; << std::endl;
} }
fThrottleActive=true;
return true; return true;
} }
} }
} }
return false;
}
bool unThrottle() {
if(!fThrottleActive) return false;
for(unsigned e(0);e<fSlinkArch->numberOfEcons();e++) {
const EconArch &econArch(fSlinkArch->econArch(e));
for(unsigned b(0);b<econArch.numberOfBlocks();b++) {
if(fEventBuffer[e][b].used()>=fBufferLimit) {
return false; return false;
} }
}
}
if(fPrintLevel>5) {
std::cout << "BeSlinkSim[" << fSlinkArch->slinkNumber() << "]::throttle() "
<< "Removing throttle"
<< std::endl;
}
fThrottleActive=false;
return true;
}
unsigned numberOfSlinkWords() const { unsigned numberOfSlinkWords() const {
return fNumberOfSlinkWords; return fNumberOfSlinkWords;
...@@ -507,7 +482,7 @@ public: ...@@ -507,7 +482,7 @@ public:
return fSlinkArch->slinkNumber(); return fSlinkArch->slinkNumber();
} }
public: public:
static unsigned fPrintLevel; static unsigned fPrintLevel;
/* /*
static DataRandomMethod fDataRandomMethod; static DataRandomMethod fDataRandomMethod;
...@@ -519,8 +494,8 @@ public: ...@@ -519,8 +494,8 @@ public:
double fTotalMean; double fTotalMean;
double fTotalWords; double fTotalWords;
*/ */
protected: protected:
private: private:
//unsigned fSlink; //unsigned fSlink;
const SlinkArch *fSlinkArch; const SlinkArch *fSlinkArch;
...@@ -545,7 +520,9 @@ private: ...@@ -545,7 +520,9 @@ private:
//unsigned fNumberOfChannels[18]; //unsigned fNumberOfChannels[18];
//unsigned fNumberOfWords[18]; //unsigned fNumberOfWords[18];
bool fThrottleActive;
bool fEventActive; bool fEventActive;
bool fExceededBuffer;
unsigned fEconRead; unsigned fEconRead;
unsigned fBlockRead; unsigned fBlockRead;
unsigned fArrayWrite; unsigned fArrayWrite;
...@@ -574,13 +551,13 @@ private: ...@@ -574,13 +551,13 @@ private:
CircularBufferUR<1> fSlinkBoeCb; CircularBufferUR<1> fSlinkBoeCb;
unsigned fNumberOfSlinkWords; unsigned fNumberOfSlinkWords;
std::pair<uint128_t,bool> fSlinkWord[3]; std::pair<uint128_t,bool> fSlinkWord[3];
}; };
unsigned BeSlinkSim::fPrintLevel(1); unsigned BeSlinkSim::fPrintLevel(1);
/* /*
BeSlinkSim::DataRandomMethod BeSlinkSim::fDataRandomMethod(BeSlinkSim::Binomial); BeSlinkSim::DataRandomMethod BeSlinkSim::fDataRandomMethod(BeSlinkSim::Binomial);
BeSlinkSim::DataFormatMethod BeSlinkSim::fDataFormatMethod(BeSlinkSim::FixedChannelBitmap); BeSlinkSim::DataFormatMethod BeSlinkSim::fDataFormatMethod(BeSlinkSim::FixedChannelBitmap);
BeSlinkSim::DataFlowMethod BeSlinkSim::fDataFlowMethod(BeSlinkSim::FixedHgcrocMap); BeSlinkSim::DataFlowMethod BeSlinkSim::fDataFlowMethod(BeSlinkSim::FixedHgcrocMap);
unsigned BeSlinkSim::fFormatBreakEven(0); unsigned BeSlinkSim::fFormatBreakEven(0);
*/ */
#endif #endif
...@@ -46,6 +46,12 @@ public: ...@@ -46,6 +46,12 @@ public:
";Number of event buffer words used",50000,0,50000); ";Number of event buffer words used",50000,0,50000);
hEventBufferUsedHistory[block]=new TH1I((sout.str()+"Block"+sHgcroc[block]+"EventBufferUsedHistory").c_str(), hEventBufferUsedHistory[block]=new TH1I((sout.str()+"Block"+sHgcroc[block]+"EventBufferUsedHistory").c_str(),
";BX;Number of event buffer words used",nHistory,0,nHistory); ";BX;Number of event buffer words used",nHistory,0,nHistory);
hEventBufferExceeded[block]=new TH1D((sout.str()+"Block"+sHgcroc[block]+"EventBufferExceeded").c_str(),
";Number of event buffer words used",50000,0,50000);
hL1AcceptDifference[block]=new TH1D((sout.str()+"Block"+sHgcroc[block]+"L1AcceptDifference").c_str(),
";Difference in L1Accept numbers",100,0,100);
hL1AcceptDifferenceHistory[block]=new TH1I((sout.str()+"Block"+sHgcroc[block]+"L1AcceptDifferenceHistory").c_str(),
";BX;Difference in L1Accept numbers",nHistory,0,nHistory);
} }
for(unsigned c(0);c<=72;c++) { for(unsigned c(0);c<=72;c++) {
...@@ -100,6 +106,10 @@ public: ...@@ -100,6 +106,10 @@ public:
for(unsigned block(0);block<fEconSim->econArch().fNumberOfBlocks;block++) { for(unsigned block(0);block<fEconSim->econArch().fNumberOfBlocks;block++) {
hEventBufferUsed[block]->Fill(fEconSim->fEventBuffer[block].used()); hEventBufferUsed[block]->Fill(fEconSim->fEventBuffer[block].used());
hEventBufferUsedHistory[block]->Fill(bx,fEconSim->fEventBuffer[block].used()); hEventBufferUsedHistory[block]->Fill(bx,fEconSim->fEventBuffer[block].used());
if(fEconSim->exceededBuffer()) hEventBufferExceeded[block]->Fill(fEconSim->fEventBuffer[block].used());
hL1AcceptDifference[block]->Fill(fEconSim->l1AcceptDifference(block));
hL1AcceptDifferenceHistory[block]->Fill(bx,fEconSim->l1AcceptDifference(block));
} }
} }
...@@ -124,6 +134,9 @@ private: ...@@ -124,6 +134,9 @@ private:
TH1D *hBlockTotalWords[7]; TH1D *hBlockTotalWords[7];
TH1D *hEventBufferUsed[7]; TH1D *hEventBufferUsed[7];
TH1I *hEventBufferUsedHistory[7]; TH1I *hEventBufferUsedHistory[7];
TH1D *hEventBufferExceeded[7];
TH1D *hL1AcceptDifference[7];
TH1I *hL1AcceptDifferenceHistory[7];
}; };
#endif #endif
...@@ -52,56 +52,6 @@ public: ...@@ -52,56 +52,6 @@ public:
fActiveInputBuffer=0; fActiveInputBuffer=0;
fWriteElink=0; fWriteElink=0;
/*
if(false) {
fNumberOfBlocks=1;
for(unsigned h(0);h<18;h++) {
fHgcrocNumber[0].push_back(h);
}
for(unsigned e(0);e<7;e++) {
fElinkNumber[0].push_back(e);
}
} else {
fNumberOfBlocks=7;
for(unsigned h(0);h<18;h++) {
fHgcrocNumber[h%7].push_back(h);
}
for(unsigned e(0);e<7;e++) {
fElinkNumber[e].push_back(e);
}
}
if(fPrintLevel>1) {
std::cout << "EconSim::ctor() "
<< "Number of blocks = " << fNumberOfBlocks << std::endl;
for(unsigned block(0);block<fNumberOfBlocks;block++) {
std::cout << " Block " << block << ", HGCROCs =";
for(unsigned h(0);h<fHgcrocNumber[block].size();h++) {
std::cout << " " << fHgcrocNumber[block][h];
}
std::cout << ", Elinks =";
for(unsigned e(0);e<fElinkNumber[block].size();e++) {
std::cout << " " << fElinkNumber[block][e];
}
std::cout << std::endl;
}
}
*/
for(unsigned b(0);b<NumberOfParallelBuffers;b++) { for(unsigned b(0);b<NumberOfParallelBuffers;b++) {
for(unsigned block(0);block<20;block++) { for(unsigned block(0);block<20;block++) {
fReadHgcrocNumber[b][block]=EconFile::MaxNumberOfHgcrocs; fReadHgcrocNumber[b][block]=EconFile::MaxNumberOfHgcrocs;
...@@ -114,12 +64,11 @@ public: ...@@ -114,12 +64,11 @@ public:
<< ", word number " << fReadWord[b][block] << std::endl; << ", word number " << fReadWord[b][block] << std::endl;
} }
} }
for(unsigned h(0);h<EconFile::MaxNumberOfHgcrocs;h++) { for(unsigned h(0);h<EconFile::MaxNumberOfHgcrocs;h++) {
fFirstBuffer[b][h].resize(channelsToWords(72,false)); fFirstBuffer[b][h].resize(channelsToWords(72,false));
} }
} }
//fHgcrocToElink[h]=(h%7);
} }
void boj(unsigned s, unsigned e, const EconFile &f, const EconArch &a) { void boj(unsigned s, unsigned e, const EconFile &f, const EconArch &a) {
...@@ -128,104 +77,14 @@ public: ...@@ -128,104 +77,14 @@ public:
fEconFile=&f; fEconFile=&f;
fEconArch=&a; fEconArch=&a;
fNewestL1Accept=0;
for(unsigned block(0);block<fEconArch->fNumberOfBlocks;block++) { for(unsigned block(0);block<fEconArch->fNumberOfBlocks;block++) {
fEventBuffer[block].reset(16*4096); fEventBuffer[block].reset(16*4096);
fOldestL1Accept[block]=0;
} }
}
#ifdef CRAP
void initialise(unsigned m) {
//assert(fEconFile->fNumberOfHgcrocs<=18);
setFormatBreakEven();
fActiveInputBuffer=0;
fWriteElink=0;
// Random values for now
/*
for(unsigned h(0);h<fNumberOfHgcrocs;h++) {
fEconFile->fHgcrocMean[h]=0.5*h+1;
fHgcrocToElink[h]=(h%7);
}
*/
for(unsigned h(0);h<18;h++) {
fFirstBuffer[0][h].resize(channelsToWords(72,false));
fFirstBuffer[1][h].resize(channelsToWords(72,false));