FPGAImagePuller: a module behind another card waits as long as the slots hold
A module was given up for a frame once ANY card was MissingAfterFrames (52) frames further on. The cards run on their own, so a card a little behind lost whole modules from every image: on the mock, 9M on 2 and 4 cards not blocking, the cards drift 50-500 frames apart (each mock card is two CPU threads; none of them ever waited for host buffers, so the drift is the cards' own speed, not the host) and the efficiency was 0.44-0.61. Now a module is missing when its OWN card is MissingAfterFrames further on, as the device itself counts, and behind another card only once that card is max_slots ahead - past that, its images would be dropped for want of a slot anyway. A dead card is still noticed, after max_slots frames. Mock, 9M, 1500 images, not blocking: 2 cards 0.905 (drift up to ~120), 4 cards with 512 slots 0.978 (drift ~380), 4 cards with 128 slots 0.487 (drift ~500, now whole images dropped for want of a slot rather than modules missing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqXYdHHZ4cogS1mrGUtfN7
This commit is contained in:
1 parent
efb6765207
commit
3a5391dd65
2 files changed
+5
-2
No files matched your search
@@ -147,7 +147,8 @@ void FPGAImagePuller::WaitForFrame(uint16_t data_stream, uint16_t module_number,
|
||||
// A frame is complete once the module is two further on, as in JFJochReceiverFPGA
|
||||
if ((static_cast<int64_t>(counters.GetCurrFrameNumber(module_number)) >= frame + 2)
|
||||
|| counters.IsAcquisitionFinished() || failed
|
||||
|| (!blocking && (FastestFrame() >= frame + 2 + MissingAfterFrames)))
|
||||
|| (!blocking && (static_cast<int64_t>(counters.GetFastestFrameNumber()) >= frame + 2 + MissingAfterFrames))
|
||||
|| (!blocking && (FastestFrame() >= frame + 2 + static_cast<int64_t>(max_slots))))
|
||||
return;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
class FPGAImagePuller : public ImagePuller {
|
||||
public:
|
||||
static constexpr size_t DefaultSlots = 128;
|
||||
// A module this far behind the fastest one is taken as missing from that frame, as the device itself does
|
||||
// A module this far behind the fastest one of its card is taken as missing from that frame, as the device itself
|
||||
// does. Behind another card it is waited for as long as the slots can hold the images started meanwhile: the
|
||||
// cards run on their own and one can be ahead, but past max_slots its images would be dropped anyway.
|
||||
static constexpr int64_t MissingAfterFrames = AcquisitionCounters::ThresholdFramesLost + 2;
|
||||
private:
|
||||
struct Slot {
|
||||
|
||||
Reference in new issue
Block a user