mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 01:00:02 +02:00
ctb moench: bugfix for fifofull, should not read pattern, same as executing it
This commit is contained in:
parent
ae5938799f
commit
6765fd0dc8
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorPackage/slsDetectorServers/ctbDetectorServer
|
||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repsitory UUID: 999a2f4d154ef8e61458c8f0de91d1fd3dfab981
|
||||
Revision: 36
|
||||
Repsitory UUID: 1103f56256f3f8b5037343f9e9a2ef90139dc6d0
|
||||
Revision: 37
|
||||
Branch: refactor
|
||||
Last Changed Author: GitHub_GitHub
|
||||
Last Changed Rev: 4385
|
||||
Last Changed Date: 2019-03-07 17:06:52.000000002 +0100 ./RegisterDefs.h
|
||||
Last Changed Author: Dhanya_Thattil
|
||||
Last Changed Rev: 4389
|
||||
Last Changed Date: 2019-03-08 14:05:26.000000002 +0100 ./RegisterDefs.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||
#define GITREPUUID "999a2f4d154ef8e61458c8f0de91d1fd3dfab981"
|
||||
#define GITAUTH "GitHub_GitHub"
|
||||
#define GITREV 0x4385
|
||||
#define GITDATE 0x20190307
|
||||
#define GITREPUUID "1103f56256f3f8b5037343f9e9a2ef90139dc6d0"
|
||||
#define GITAUTH "Dhanya_Thattil"
|
||||
#define GITREV 0x4389
|
||||
#define GITDATE 0x20190308
|
||||
#define GITBRANCH "refactor"
|
||||
|
@ -873,14 +873,14 @@ enum readOutFlags setReadOutFlags(enum readOutFlags val) {
|
||||
digitalEnable = ((regval & CONFIG_ENBLE_DGTL_OTPT_MSK) >> CONFIG_ENBLE_DGTL_OTPT_OFST);
|
||||
|
||||
if (analogEnable && digitalEnable) {
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Analog & Digital\n"));
|
||||
retval = ANALOG_AND_DIGITAL;
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Analog & Digital 0x%x\n", retval));
|
||||
} else if (analogEnable && !digitalEnable) {
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Normal\n"));
|
||||
retval = NORMAL_READOUT;
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Normal 0x%x\n", retval));
|
||||
} else if (!analogEnable && digitalEnable) {
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Digital Only\n"));
|
||||
retval = DIGITAL_ONLY;
|
||||
FILE_LOG(logDEBUG1, ("Getting readout: Digital Only 0x%x\n", retval));
|
||||
} else {
|
||||
FILE_LOG(logERROR, ("Read unknown readout (Both digital and analog are disabled). "
|
||||
"Config reg: 0x%x\n", regval));
|
||||
@ -1721,13 +1721,13 @@ void configureSyncFrequency(enum CLKINDEX ind) {
|
||||
|
||||
// sync is greater than current
|
||||
if (syncFreq > retval) {
|
||||
FILE_LOG(logINFO, ("\t--Configuring Sync Clock\n"));cprintf(BG_RED, "SETTING SYNC CLOCK!!!");
|
||||
FILE_LOG(logINFO, ("\t--Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
// the others are both greater than current
|
||||
else if ((aFreq > retval && bFreq > retval)) {
|
||||
FILE_LOG(logINFO, ("\t++Configuring Sync Clock\n"));cprintf(BG_RED, "\n\nSETTING SYNC CLOCK!!!\n\n");
|
||||
FILE_LOG(logINFO, ("\t++Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
@ -1841,7 +1841,8 @@ uint64_t writePatternWord(int addr, uint64_t word) {
|
||||
// unset write strobe
|
||||
bus_w(reg, bus_r(reg) & (~PATTERN_CNTRL_WR_MSK));
|
||||
|
||||
return readPatternWord(addr);
|
||||
return word;
|
||||
//return readPatternWord(addr); // will start executing the pattern
|
||||
}
|
||||
|
||||
int setPatternWaitAddress(int level, int addr) {
|
||||
@ -2283,9 +2284,10 @@ void unsetFifoReadStrobes() {
|
||||
|
||||
void readSample(int ns) {
|
||||
if (!(ns%1000)) {
|
||||
FILE_LOG(logDEBUG2, ("Reading sample ns:%d (out of %d), fifodinstatus:0x%x\n",
|
||||
FILE_LOG(logINFO, ("Reading sample ns:%d (out of %d), DigitalFifoEmpty:%d AnalogFifoEmptyReg:0x%x\n",
|
||||
ns, nSamples,
|
||||
bus_r(FIFO_DIN_STATUS_REG)));
|
||||
((bus_r(FIFO_DIN_STATUS_REG) & FIFO_DIN_STATUS_FIFO_EMPTY_MSK) >> FIFO_DIN_STATUS_FIFO_EMPTY_OFST),
|
||||
bus_r(FIFO_EMPTY_REG)));
|
||||
}
|
||||
uint32_t addr = DUMMY_REG;
|
||||
uint32_t fifoAddr = FIFO_DATA_REG;
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorPackage/slsDetectorServers/moenchDetectorServer
|
||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repsitory UUID: 999a2f4d154ef8e61458c8f0de91d1fd3dfab981
|
||||
Revision: 14
|
||||
Repsitory UUID: ae5938799fb1bf7a5cb64bdb329f9c0d9ab44a03
|
||||
Revision: 15
|
||||
Branch: refactor
|
||||
Last Changed Author: GitHub_GitHub
|
||||
Last Changed Rev: 4385
|
||||
Last Changed Date: 2019-03-07 17:06:49.000000002 +0100 ./RegisterDefs.h
|
||||
Last Changed Author: Dhanya_Thattil
|
||||
Last Changed Rev: 4393
|
||||
Last Changed Date: 2019-03-08 14:05:26.000000002 +0100 ./RegisterDefs.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||
#define GITREPUUID "999a2f4d154ef8e61458c8f0de91d1fd3dfab981"
|
||||
#define GITAUTH "GitHub_GitHub"
|
||||
#define GITREV 0x4385
|
||||
#define GITDATE 0x20190307
|
||||
#define GITREPUUID "ae5938799fb1bf7a5cb64bdb329f9c0d9ab44a03"
|
||||
#define GITAUTH "Dhanya_Thattil"
|
||||
#define GITREV 0x4393
|
||||
#define GITDATE 0x20190308
|
||||
#define GITBRANCH "refactor"
|
||||
|
@ -1356,13 +1356,13 @@ void configureSyncFrequency(enum CLKINDEX ind) {
|
||||
|
||||
// sync is greater than current
|
||||
if (syncFreq > retval) {
|
||||
FILE_LOG(logINFO, ("\t--Configuring Sync Clock\n"));cprintf(BG_RED, "SETTING SYNC CLOCK!!!");
|
||||
FILE_LOG(logINFO, ("\t--Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
// the others are both greater than current
|
||||
else if ((aFreq > retval && bFreq > retval)) {
|
||||
FILE_LOG(logINFO, ("\t++Configuring Sync Clock\n"));cprintf(BG_RED, "\n\nSETTING SYNC CLOCK!!!\n\n");
|
||||
FILE_LOG(logINFO, ("\t++Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
@ -1476,7 +1476,8 @@ uint64_t writePatternWord(int addr, uint64_t word) {
|
||||
// unset write strobe
|
||||
bus_w(reg, bus_r(reg) & (~PATTERN_CNTRL_WR_MSK));
|
||||
|
||||
return readPatternWord(addr);
|
||||
return word;
|
||||
//return readPatternWord(addr); // will start executing the pattern
|
||||
}
|
||||
|
||||
int setPatternWaitAddress(int level, int addr) {
|
||||
@ -1918,9 +1919,10 @@ void unsetFifoReadStrobes() {
|
||||
|
||||
void readSample(int ns) {
|
||||
if (!(ns%1000)) {
|
||||
FILE_LOG(logDEBUG2, ("Reading sample ns:%d (out of %d), fifodinstatus:0x%x\n",
|
||||
FILE_LOG(logINFO, ("Reading sample ns:%d (out of %d), DigitalFifoEmpty:%d AnalogFifoEmptyReg:0x%x\n",
|
||||
ns, nSamples,
|
||||
bus_r(FIFO_DIN_STATUS_REG)));
|
||||
((bus_r(FIFO_DIN_STATUS_REG) & FIFO_DIN_STATUS_FIFO_EMPTY_MSK) >> FIFO_DIN_STATUS_FIFO_EMPTY_OFST),
|
||||
bus_r(FIFO_EMPTY_REG)));
|
||||
}
|
||||
uint32_t addr = DUMMY_REG;
|
||||
uint32_t fifoAddr = FIFO_DATA_REG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user