mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-03-15 12:32:48 +01:00
Dev/xilinx acq (#901)
* period and exptime(patternwaittime level 0) * added new regsieterdefs and updated api version and fixedpattern reg * autogenerate commands * formatting * minor * wip resetflow, readout mode, transceiver mask, transceiver enable * acquisition, but streaming done bit and busy (exposing + read chip to fifo) not known yet from fw * programming fpga and device tree done * most configuration done, need to connect configuretransceiver to client * stuck at resetting transciever timed out * minor * fixed virtual, added chip busyto fifo, streaming busy, set/getnext framenumber * configuretransceiver from client, added help in client * make formatt and command generation * tests for xilinx ctb works * command generation * dacs added and tested, power not done * power added * added temp_fpga * binaries in * ctrlreg is 0 to enable chip=fixed, high dac val = min val= fixed, power regulators in weird order=fixed, device tree could be loaded with dacs before adcs=fixed * start works * virtual server sends * receiver works * tests * python function and enum generation, commands generatorn and autocomplete, formatting, tests * tests fail at start(transceiver not aligned) * tests passed * all binaries compiled * eiger binary in * added --nomodule cehck for xilinx
This commit is contained in:
@@ -372,7 +372,7 @@ int ClientInterface::setup_receiver(Interface &socket) {
|
||||
arg.additionalStorageCells);
|
||||
}
|
||||
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) {
|
||||
impl()->setNumberofAnalogSamples(arg.analogSamples);
|
||||
impl()->setNumberofDigitalSamples(arg.digitalSamples);
|
||||
impl()->setNumberofTransceiverSamples(arg.transceiverSamples);
|
||||
@@ -409,12 +409,14 @@ int ClientInterface::setup_receiver(Interface &socket) {
|
||||
detType == MYTHEN3) {
|
||||
impl()->setTenGigaEnable(arg.tenGiga);
|
||||
}
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD) {
|
||||
impl()->setReadoutMode(arg.roMode);
|
||||
impl()->setADCEnableMask(arg.adcMask);
|
||||
impl()->setTenGigaADCEnableMask(arg.adc10gMask);
|
||||
impl()->setTransceiverEnableMask(arg.transceiverMask);
|
||||
}
|
||||
if (detType == CHIPTESTBOARD) {
|
||||
impl()->setADCEnableMask(arg.adcMask);
|
||||
}
|
||||
if (detType == GOTTHARD) {
|
||||
impl()->setDetectorROI(arg.roi);
|
||||
}
|
||||
@@ -448,6 +450,7 @@ void ClientInterface::setDetectorType(detectorType arg) {
|
||||
case GOTTHARD:
|
||||
case EIGER:
|
||||
case CHIPTESTBOARD:
|
||||
case XILINX_CHIPTESTBOARD:
|
||||
case JUNGFRAU:
|
||||
case MOENCH:
|
||||
case MYTHEN3:
|
||||
@@ -568,7 +571,7 @@ int ClientInterface::set_burst_mode(Interface &socket) {
|
||||
int ClientInterface::set_num_analog_samples(Interface &socket) {
|
||||
auto value = socket.Receive<int>();
|
||||
LOG(logDEBUG1) << "Setting num analog samples to " << value;
|
||||
if (detType != CHIPTESTBOARD) {
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) {
|
||||
functionNotImplemented();
|
||||
}
|
||||
try {
|
||||
@@ -584,7 +587,7 @@ int ClientInterface::set_num_analog_samples(Interface &socket) {
|
||||
int ClientInterface::set_num_digital_samples(Interface &socket) {
|
||||
auto value = socket.Receive<int>();
|
||||
LOG(logDEBUG1) << "Setting num digital samples to " << value;
|
||||
if (detType != CHIPTESTBOARD) {
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) {
|
||||
functionNotImplemented();
|
||||
}
|
||||
try {
|
||||
@@ -1249,7 +1252,7 @@ int ClientInterface::get_padding_enable(Interface &socket) {
|
||||
int ClientInterface::set_readout_mode(Interface &socket) {
|
||||
auto arg = socket.Receive<readoutMode>();
|
||||
|
||||
if (detType != CHIPTESTBOARD)
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
|
||||
if (arg >= 0) {
|
||||
@@ -1294,7 +1297,7 @@ int ClientInterface::set_adc_mask(Interface &socket) {
|
||||
int ClientInterface::set_dbit_list(Interface &socket) {
|
||||
StaticVector<int, MAX_RX_DBIT> args;
|
||||
socket.Receive(args);
|
||||
if (detType != CHIPTESTBOARD)
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
LOG(logDEBUG1) << "Setting DBIT list";
|
||||
for (auto &it : args) {
|
||||
@@ -1307,7 +1310,7 @@ int ClientInterface::set_dbit_list(Interface &socket) {
|
||||
}
|
||||
|
||||
int ClientInterface::get_dbit_list(Interface &socket) {
|
||||
if (detType != CHIPTESTBOARD)
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
StaticVector<int, MAX_RX_DBIT> retval;
|
||||
retval = impl()->getDbitList();
|
||||
@@ -1317,7 +1320,7 @@ int ClientInterface::get_dbit_list(Interface &socket) {
|
||||
|
||||
int ClientInterface::set_dbit_offset(Interface &socket) {
|
||||
auto arg = socket.Receive<int>();
|
||||
if (detType != CHIPTESTBOARD)
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
if (arg < 0) {
|
||||
throw RuntimeError("Invalid dbit offset: " + std::to_string(arg));
|
||||
@@ -1329,7 +1332,7 @@ int ClientInterface::set_dbit_offset(Interface &socket) {
|
||||
}
|
||||
|
||||
int ClientInterface::get_dbit_offset(Interface &socket) {
|
||||
if (detType != CHIPTESTBOARD)
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
int retval = impl()->getDbitOffset();
|
||||
LOG(logDEBUG1) << "Dbit offset retval: " << retval;
|
||||
@@ -1735,7 +1738,7 @@ int ClientInterface::get_receiver_roi(Interface &socket) {
|
||||
|
||||
int ClientInterface::set_receiver_roi(Interface &socket) {
|
||||
auto arg = socket.Receive<ROI>();
|
||||
if (detType == CHIPTESTBOARD)
|
||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
LOG(logDEBUG1) << "Set Receiver ROI: " << ToString(arg);
|
||||
verifyIdle(socket);
|
||||
@@ -1751,7 +1754,7 @@ int ClientInterface::set_receiver_roi(Interface &socket) {
|
||||
|
||||
int ClientInterface::set_receiver_roi_metadata(Interface &socket) {
|
||||
auto arg = socket.Receive<ROI>();
|
||||
if (detType == CHIPTESTBOARD)
|
||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
LOG(logDEBUG1) << "Set Receiver ROI Metadata: " << ToString(arg);
|
||||
verifyIdle(socket);
|
||||
@@ -1768,7 +1771,7 @@ int ClientInterface::set_receiver_roi_metadata(Interface &socket) {
|
||||
int ClientInterface::set_num_transceiver_samples(Interface &socket) {
|
||||
auto value = socket.Receive<int>();
|
||||
LOG(logDEBUG1) << "Setting num transceiver samples to " << value;
|
||||
if (detType != CHIPTESTBOARD) {
|
||||
if (detType != CHIPTESTBOARD && detType != XILINX_CHIPTESTBOARD) {
|
||||
functionNotImplemented();
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user