mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-08 08:38:40 +01:00
dev/xilinx_fifo_fix transceiver (#1313)
* xilinx ctb: clean fifos in a stop command for transceivers, else always running * refactor
This commit is contained in:
Binary file not shown.
@@ -440,14 +440,18 @@ void cleanFifos() {
|
|||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
uint32_t t_enable_mask = getTransceiverEnableMask();
|
||||||
|
uint32_t tclean_msk =
|
||||||
|
((t_enable_mask << X_FIFO_CLEAN_OFST) & X_FIFO_CLEAN_MSK);
|
||||||
|
uint32_t t_before_reg = bus_r(X_FIFO_CLEAN_REG);
|
||||||
LOG(logINFO, ("Clearing Acquisition Fifos\n"));
|
LOG(logINFO, ("Clearing Acquisition Fifos\n"));
|
||||||
bus_w(A_FIFO_CLEAN_REG, bus_r(A_FIFO_CLEAN_REG) | BIT32_MSK);
|
bus_w(A_FIFO_CLEAN_REG, bus_r(A_FIFO_CLEAN_REG) | BIT32_MSK);
|
||||||
bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) | D_FIFO_CLEAN_MSK);
|
bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) | D_FIFO_CLEAN_MSK);
|
||||||
bus_w(X_FIFO_CLEAN_REG, bus_r(X_FIFO_CLEAN_REG) | X_FIFO_CLEAN_MSK);
|
bus_w(X_FIFO_CLEAN_REG, t_before_reg | tclean_msk);
|
||||||
|
|
||||||
bus_w(A_FIFO_CLEAN_REG, 0);
|
bus_w(A_FIFO_CLEAN_REG, 0);
|
||||||
bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) & ~D_FIFO_CLEAN_MSK);
|
bus_w(D_FIFO_CLEAN_REG, bus_r(D_FIFO_CLEAN_REG) & ~D_FIFO_CLEAN_MSK);
|
||||||
bus_w(X_FIFO_CLEAN_REG, bus_r(X_FIFO_CLEAN_REG) & ~X_FIFO_CLEAN_MSK);
|
bus_w(X_FIFO_CLEAN_REG, t_before_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetFlow() {
|
void resetFlow() {
|
||||||
@@ -1639,7 +1643,7 @@ int stopStateMachine() {
|
|||||||
#endif
|
#endif
|
||||||
// stop state machine
|
// stop state machine
|
||||||
bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | STOP_F_MSK);
|
bus_w(FLOW_CONTROL_REG, bus_r(FLOW_CONTROL_REG) | STOP_F_MSK);
|
||||||
|
cleanFifos();
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
#define APIGOTTHARD2 "0.0.0 0x250909"
|
#define APIGOTTHARD2 "0.0.0 0x250909"
|
||||||
#define APIMOENCH "0.0.0 0x250909"
|
#define APIMOENCH "0.0.0 0x250909"
|
||||||
#define APIEIGER "0.0.0 0x250909"
|
#define APIEIGER "0.0.0 0x250909"
|
||||||
#define APIXILINXCTB "0.0.0 0x250924"
|
#define APIXILINXCTB "0.0.0 0x250930"
|
||||||
#define APIJUNGFRAU "0.0.0 0x250909"
|
#define APIJUNGFRAU "0.0.0 0x250909"
|
||||||
#define APIMYTHEN3 "0.0.0 0x250922"
|
#define APIMYTHEN3 "0.0.0 0x250922"
|
||||||
|
|||||||
Reference in New Issue
Block a user