mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-07-12 19:01:50 +02:00
1. Ctb transceiver ro (#773)
* transceiverenable, tsamples, romode for tranceiver and digital_transceiver * 202 spec instr only for transceiver mode * removed check for empty in trans readout and clean memory before reading from fifo * ctb read fifo strobe for all after reading all channels, adding 1us after selecting channel, changing fw date * updated 10gb transceiver enable ---- * added transceiver (tsamples, romode(transceiver, digital_transceiver), transceiverenable (mask) * clean memory before reading from fifo (for analog and digital as well) * read fifo then read strobe (also corresp fw) fixes number of reads (also for analg and digital)-> increases all pipelines by 1 * fixed bug in rearranging digital data in receiver * fixed bug in streaming size of data after rearranging * fixed bug in setbit, clearbit,and getbit * status checks fifo before returning idle (transmitting if data in fifo if transceiver more enabled) * soem matterhorn specifics that will need to be put into pattern in a month or two. this is temporary. * NOTE: breaking api. rxParameters struct has transceiverenabel and tsamples given from det to receiver
This commit is contained in:
@ -2576,8 +2576,8 @@ std::string CmdProxy::Samples(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_samples]\n\t[CTB] Number of samples (both analog and "
|
||||
"digitial) expected.\n"
|
||||
os << "[n_samples]\n\t[CTB] Number of samples (analog, digitial and "
|
||||
"transceiver) expected.\n"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
@ -2587,11 +2587,15 @@ std::string CmdProxy::Samples(int action) {
|
||||
// get also digital samples for ctb and compare with analog
|
||||
if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) {
|
||||
auto d = det->getNumberOfDigitalSamples(std::vector<int>{det_id});
|
||||
auto t =
|
||||
det->getNumberOfTransceiverSamples(std::vector<int>{det_id});
|
||||
int as = a.squash(-1);
|
||||
int ds = d.squash(-1);
|
||||
if (as == -1 || ds == -1 || as != ds) { // check if a == d?
|
||||
int ts = t.squash(-1);
|
||||
if (as == -1 || ds == -1 || ts == -1 || as != ds ||
|
||||
as != ts) { // check if a == d?
|
||||
throw RuntimeError(
|
||||
"Different samples. Use asamples or dsamples.");
|
||||
"Different samples. Use asamples, dsamples or tsamples.");
|
||||
}
|
||||
}
|
||||
os << OutString(a) << '\n';
|
||||
@ -2605,6 +2609,8 @@ std::string CmdProxy::Samples(int action) {
|
||||
if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) {
|
||||
det->setNumberOfDigitalSamples(StringTo<int>(args[0]),
|
||||
std::vector<int>{det_id});
|
||||
det->setNumberOfTransceiverSamples(StringTo<int>(args[0]),
|
||||
std::vector<int>{det_id});
|
||||
}
|
||||
os << args.front() << '\n';
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user