Dev/xilinx ctb test (#942)

* voltage regulators only looks at dac and not at ctrl_reg

* xilinx: change dac max to 2048, setting dac ist not inverse conversion from dac to voltage anymore, but setting power is inverse, also there is max and min to power, a different min for vio and this is checked at funcs interface, not printign or converting to mv in dac for power regulators (as its conversion max and min are different)

* Use links for dacs/adc and adapt power rglt thresholds

* Remove wait for transceiver reset

* adc and dac device not used anymore and hence removed

* udp restucturing: arm has to be multiple of 16 and no byteswap in udp_gen, option to compile locally in arm architecture, memsize of the second udp memory has to be limited

---------

Co-authored-by: Martin Brückner <martin.brueckner@psi.ch>
This commit is contained in:
2024-08-20 14:33:18 +02:00
committed by GitHub
parent 991a4115d4
commit b4533ac11f
21 changed files with 255 additions and 236 deletions

View File

@@ -35,8 +35,8 @@ int resetFPGA(char *mess) {
return OK;
}
int loadDeviceTree(char *mess, int *adcDeviceIndex, int *dacDeviceIndex) {
if (verifyDeviceTree(mess, adcDeviceIndex, dacDeviceIndex) == OK)
int loadDeviceTree(char *mess) {
if (verifyDeviceTree(mess) == OK)
return OK;
if (checksBeforeCreatingDeviceTree(mess) == FAIL)
@@ -45,7 +45,7 @@ int loadDeviceTree(char *mess, int *adcDeviceIndex, int *dacDeviceIndex) {
if (createDeviceTree(mess) == FAIL)
return FAIL;
if (verifyDeviceTree(mess, adcDeviceIndex, dacDeviceIndex) == FAIL) {
if (verifyDeviceTree(mess) == FAIL) {
LOG(logERROR, ("Device tree loading failed at verification\n"));
return FAIL;
}
@@ -129,10 +129,8 @@ int createDeviceTree(char *mess) {
return OK;
}
int verifyDeviceTree(char *mess, int *adcDeviceIndex, int *dacDeviceIndex) {
int verifyDeviceTree(char *mess) {
LOG(logINFOBLUE, ("Verifying Device Tree...\n"));
*adcDeviceIndex = 1;
*dacDeviceIndex = 2;
#ifndef VIRTUAL
// check if iio:device0-4 exists in device tree destination
@@ -170,8 +168,6 @@ int verifyDeviceTree(char *mess, int *adcDeviceIndex, int *dacDeviceIndex) {
strstr(retvals, deviceNames[hardcodedDeviceIndex + 1]) !=
NULL) {
++hardcodedDeviceIndex;
*adcDeviceIndex = 4;
*dacDeviceIndex = 1;
} else {
snprintf(
mess, MAX_STR_LENGTH,
@@ -188,9 +184,6 @@ int verifyDeviceTree(char *mess, int *adcDeviceIndex, int *dacDeviceIndex) {
hardcodedDeviceIndex = 1;
}
#endif
LOG(logINFOBLUE, ("Device tree verified successfully [temp: 0, adc:%d, "
"dac:%d, %d, %d]\n",
*adcDeviceIndex, *dacDeviceIndex, *dacDeviceIndex + 1,
*dacDeviceIndex + 2));
LOG(logINFOBLUE, ("Device tree verified successfully\n"));
return OK;
}