dev/xilinx_fifo_fix transceiver (#1313)
Some checks failed
Build on RHEL9 / build (push) Failing after 3m26s
Build on RHEL8 / build (push) Failing after 5m11s

* xilinx ctb: clean fifos in a stop command for transceivers, else always running

* refactor
This commit is contained in:
2025-09-30 16:42:29 +02:00
committed by GitHub
parent 9b411ffa25
commit 3684f29e1a
3 changed files with 8 additions and 4 deletions

View File

@@ -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;
} }

View File

@@ -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"