increase buffer size of QDC and PSD to 200 MB

This commit is contained in:
splitPoleDAQ 2023-11-17 17:41:10 -05:00
parent aa5cce918c
commit b396eef66e
2 changed files with 9 additions and 5 deletions

View File

@ -151,7 +151,7 @@ inline void Data::AllocateMemory(uint32_t size){
ClearBuffer();
AllocatedSize = size;
buffer = (char *) malloc( AllocatedSize);
printf("Allocated %u byte for buffer = %u words\n", AllocatedSize, AllocatedSize / 4);
printf("Allocated %u byte ( %.2f MB) for buffer = %u words\n", AllocatedSize, AllocatedSize/1024./1024., AllocatedSize / 4);
}
inline void Data::Allocate80MBMemory(){

View File

@ -461,7 +461,7 @@ int Digitizer::ProgramBoard_QDC(){
void Digitizer::StartACQ(){
if( softwareDisable ) return;
if ( AcqRun ) return;
unsigned int bufferSize = 0;
if( DPPType == V1730_DPP_PHA_CODE ){
bufferSize = CalByteForBuffer();
@ -469,11 +469,15 @@ void Digitizer::StartACQ(){
printf("============= buffer size bigger than 160 MB (%u)\n", bufferSize );
//return;
}
}else if( DPPType == V1730_DPP_PSD_CODE) {
bufferSize = 200 * 1024 * 1024; //TODO allocate 200 MB for PSD
}else if( DPPType == V1740_DPP_QDC_CODE) {
bufferSize = 200 * 1024 * 1024; //TODO allocate 200 MB for QDC
}else{
printf("DPP type not supported. ACQ not start.\n");
return;
}
if( DPPType == V1730_DPP_PSD_CODE) bufferSize = 100 * 1024 * 1024; //TODO allocate 160 MB for PSD
if( DPPType == V1740_DPP_QDC_CODE) bufferSize = 100 * 1024 * 1024; //TODO allocate 160 MB for QDC
data->AllocateMemory(bufferSize);
ret = CAEN_DGTZ_SWStartAcquisition(handle);