eiger receiver: changing dr changes rx_fifodepth to their defaults

This commit is contained in:
maliakal_d 2020-04-03 09:58:58 +02:00
parent 20ce79872f
commit f20f084991
4 changed files with 12 additions and 4 deletions

View File

@ -21,6 +21,7 @@ This document describes the differences between 4.2.0 and 4.1.1 releases.
- (Eiger) Deactivate a module - (Eiger) Deactivate a module
- (Eiger) Setting all trimbits argument check - (Eiger) Setting all trimbits argument check
- (Eiger client) Changing dynamic range changes to different clock divider - (Eiger client) Changing dynamic range changes to different clock divider
- (Eiger Receiver) different rx_fifodepth defaults
- (Receiver) rx_fifodepth has a higher range - (Receiver) rx_fifodepth has a higher range
- (Receiver) subperiod in master file - (Receiver) subperiod in master file
- (Receiver) performance (memory allocation and alignment, file buffering) - (Receiver) performance (memory allocation and alignment, file buffering)
@ -44,6 +45,9 @@ This document describes the differences between 4.2.0 and 4.1.1 releases.
from start. Removed file buffering when writing to file. Replaced from start. Removed file buffering when writing to file. Replaced
pausing on keepRunning variable with semaphore to reduce cpu pausing on keepRunning variable with semaphore to reduce cpu
load. load.
2. (Eiger) rx_fifodepth default is 100 for 32 bit mode, but 1000
for other modes. Changing dynamic range changes bit mode to
their defaults.
Client Client
------ ------

View File

@ -2972,7 +2972,7 @@ int multiSlsDetector::setDynamicRange(int p) {
} }
//for usability for the user //for usability for the user
if (getDetectorsType() == EIGER) { if (getDetectorsType() == EIGER && p != -1) {
if (p == 32) { if (p == 32) {
std::cout << "Setting Clock to Quarter Speed to cope with Dynamic Range of 32" << std::endl; std::cout << "Setting Clock to Quarter Speed to cope with Dynamic Range of 32" << std::endl;
setSpeed(CLOCK_DIVIDER, 2); setSpeed(CLOCK_DIVIDER, 2);
@ -2980,8 +2980,10 @@ int multiSlsDetector::setDynamicRange(int p) {
std::cout << "Setting Clock to Full Speed for Dynamic Range of " << p << std::endl; std::cout << "Setting Clock to Full Speed for Dynamic Range of " << p << std::endl;
setSpeed(CLOCK_DIVIDER, 0); setSpeed(CLOCK_DIVIDER, 0);
} }
if (p != -1) updateOffsets();
updateOffsets(); if (thisMultiDetector->receiverOnlineFlag == ONLINE_FLAG) {
std::cout << "Setting receiver fifo depth to default" << std::endl;
}
} }
return ret; return ret;
} }

View File

@ -616,7 +616,7 @@ class EigerData : public GeneralData {
imageSize = dataSize*packetsPerFrame; imageSize = dataSize*packetsPerFrame;
maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE; maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE;
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsReceiverDefs::sls_receiver_header); fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsReceiverDefs::sls_receiver_header);
defaultFifoDepth = 100; defaultFifoDepth = 1000;
threadsPerReceiver = 2; threadsPerReceiver = 2;
headerPacketSize = 40; headerPacketSize = 40;
standardheader = true; standardheader = true;
@ -630,6 +630,7 @@ class EigerData : public GeneralData {
void SetDynamicRange(int dr, bool tgEnable) { void SetDynamicRange(int dr, bool tgEnable) {
packetsPerFrame = (tgEnable ? 4 : 16) * dr; packetsPerFrame = (tgEnable ? 4 : 16) * dr;
imageSize = dataSize*packetsPerFrame; imageSize = dataSize*packetsPerFrame;
defaultFifoDepth = (dr == 32 ? 100 : 1000);
} }
/** /**

View File

@ -388,6 +388,7 @@ int UDPStandardImplementation::setDynamicRange(const uint32_t i) {
for (std::vector<DataProcessor*>::const_iterator it = dataProcessor.begin(); it != dataProcessor.end(); ++it) for (std::vector<DataProcessor*>::const_iterator it = dataProcessor.begin(); it != dataProcessor.end(); ++it)
(*it)->SetPixelDimension(); (*it)->SetPixelDimension();
fifoDepth = generalData->defaultFifoDepth;
numberofJobs = -1; //changes to imagesize has to be noted to recreate fifo structure numberofJobs = -1; //changes to imagesize has to be noted to recreate fifo structure
if (SetupFifoStructure() == FAIL) if (SetupFifoStructure() == FAIL)
return FAIL; return FAIL;