mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 17:47:59 +02:00
start pattern without binaries
This commit is contained in:
@ -90,6 +90,7 @@
|
||||
|
||||
/* Config RW regiseter */
|
||||
#define CONFIG_REG (0x20 * REG_OFFSET + BASE_CONTROL)
|
||||
|
||||
#define CONFIG_COUNTER_ENA_OFST (0)
|
||||
#define CONFIG_COUNTER_ENA_MSK (0x00000003 << CONFIG_COUNTER_ENA_OFST)
|
||||
#define CONFIG_COUNTER_ENA_DEFAULT_VAL ((0x0 << CONFIG_COUNTER_ENA_OFST) & CONFIG_COUNTER_ENA_MSK)
|
||||
@ -110,6 +111,8 @@
|
||||
#define CONTROL_STRT_ACQSTN_MSK (0x00000001 << CONTROL_STRT_ACQSTN_OFST)
|
||||
#define CONTROL_STP_ACQSTN_OFST (1)
|
||||
#define CONTROL_STP_ACQSTN_MSK (0x00000001 << CONTROL_STP_ACQSTN_OFST)
|
||||
#define CONTROL_STRT_PATTERN_OFST (2)
|
||||
#define CONTROL_STRT_PATTERN_MSK (0x00000001 << CONTROL_STRT_PATTERN_OFST)
|
||||
#define CONTROL_CRE_RST_OFST (10)
|
||||
#define CONTROL_CRE_RST_MSK (0x00000001 << CONTROL_CRE_RST_OFST)
|
||||
#define CONTROL_PRPHRL_RST_OFST (11) // Only GBE10?
|
||||
|
@ -716,10 +716,8 @@ int setTrimbits(int *trimbits) {
|
||||
int start = 0, nloop = 0;
|
||||
setPatternLoop(-1, &start, &iaddr, &nloop);
|
||||
}
|
||||
// load the trimbits
|
||||
#ifndef VIRTUAL
|
||||
startStateMachine();
|
||||
#endif
|
||||
// send pattern to the chips
|
||||
startPattern();
|
||||
}
|
||||
|
||||
// copy trimbits locally
|
||||
@ -1186,6 +1184,11 @@ int *getDetectorPosition() { return detPos; }
|
||||
|
||||
/* pattern */
|
||||
|
||||
void startPattern() {
|
||||
LOG(logINFOBLUE, ("Starting Pattern\n"));
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_STRT_PATTERN_MSK);
|
||||
}
|
||||
|
||||
uint64_t readPatternWord(int addr) {
|
||||
// error (handled in tcp)
|
||||
if (addr < 0 || addr >= MAX_PATTERN_LENGTH) {
|
||||
|
Reference in New Issue
Block a user