Dev/m3 readout speed (#985)

* added readoutspeed command to m3 (fullspeed - 10, half speed - 20, quarter speed - 40), removed reaodut pll, moved up system pll clock indices, leaving pll index in common altera code, default speed is half speed, allow only system_c0 to be set, the others can be obtained, same for clkphase, maxclkphaseshift, clkfreq. added to readoutspeedlist commands, updated help and updated tests

* updated readoutspeedlist command
This commit is contained in:
2024-09-30 17:22:24 +02:00
committed by GitHub
parent 5b832cb6aa
commit 8a7ed30676
12 changed files with 140 additions and 78 deletions

View File

@ -655,7 +655,8 @@ int setClockDivider(enum CLKINDEX ind, int val);
int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val,
int timeUpdate);
int getClockDivider(enum CLKINDEX ind);
int setReadoutSpeed(int val);
int getReadoutSpeed(int *retval);
#elif GOTTHARD2D
int checkDetectorType(char *mess);
int powerChip(int on, char *mess);

View File

@ -6009,11 +6009,9 @@ int get_clock_frequency(int file_des) {
case ADC_CLOCK:
c = ADC_CLK;
break;
#ifdef CHIPTESTBOARDD
case DBIT_CLOCK:
c = DBIT_CLK;
break;
#endif
case RUN_CLOCK:
c = RUN_CLK;
break;
@ -6078,7 +6076,11 @@ int set_clock_phase(int file_des) {
#endif
default:
#if defined(GOTTHARD2D) || defined(MYTHEN3D)
if (ind < NUM_CLOCKS) {
#ifdef MYTHEN3D
if (args[0] < NUM_CLOCKS_TO_SET) {
#else
if (args[0] < NUM_CLOCKS) {
#endif
c = (enum CLKINDEX)ind;
break;
}
@ -9687,7 +9689,7 @@ int get_readout_speed(int file_des) {
LOG(logDEBUG1, ("Getting readout speed\n"));
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(EIGERD) && \
!defined(GOTTHARD2D)
!defined(GOTTHARD2D) && !defined(MYTHEN3D)
functionNotImplemented();
#else
// get only
@ -9711,7 +9713,7 @@ int set_readout_speed(int file_des) {
LOG(logDEBUG1, ("Setting readout speed : %u\n", arg));
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(EIGERD) && \
!defined(GOTTHARD2D)
!defined(GOTTHARD2D) && !defined(MYTHEN3D)
functionNotImplemented();
#else
// only set
@ -9727,7 +9729,8 @@ int set_readout_speed(int file_des) {
#endif
if (ret == OK) {
switch (arg) {
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(MYTHEN3D)
case FULL_SPEED:
case HALF_SPEED:
case QUARTER_SPEED: