mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
some changes with anna. more to come
This commit is contained in:
parent
6cc22a350d
commit
35631c0abb
@ -64,11 +64,8 @@ struct timeval tss,tse,tsss; //for timing
|
|||||||
|
|
||||||
|
|
||||||
//for memory mapping
|
//for memory mapping
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
u_int32_t CSP0BASE;
|
u_int32_t CSP0BASE;
|
||||||
#else
|
|
||||||
u_int64_t CSP0BASE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FILE *debugfp, *datafp;
|
FILE *debugfp, *datafp;
|
||||||
|
|
||||||
@ -1127,16 +1124,17 @@ u_int32_t testFpga(void) {
|
|||||||
// for fpga test
|
// for fpga test
|
||||||
u_int32_t testRAM(void) {
|
u_int32_t testRAM(void) {
|
||||||
int result=OK;
|
int result=OK;
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
cprintf(RED,"TestRAM not implemented for Jungfrau\n");
|
printf("TestRAM not implemented\n");
|
||||||
#else
|
|
||||||
int i=0;
|
/* int i=0;
|
||||||
allocateRAM();
|
allocateRAM();
|
||||||
// while(i<100000) {
|
// while(i<100000) {
|
||||||
memcpy(ram_values, values, dataBytes);
|
memcpy(ram_values, values, dataBytes);
|
||||||
printf ("Testing RAM:\t%d: copied fifo %x to memory %x size %d\n",i++, (unsigned int)(values), (unsigned int)(ram_values), dataBytes);
|
printf ("Testing RAM:\t%d: copied fifo %x to memory %x size %d\n",i++, (unsigned int)(values), (unsigned int)(ram_values), dataBytes);
|
||||||
// }
|
// }
|
||||||
#endif
|
*
|
||||||
|
*/
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1411,9 +1409,12 @@ ROI *setROI(int nroi,ROI* arg,int *retvalsize, int *ret) {
|
|||||||
|
|
||||||
|
|
||||||
int loadImage(int index, short int ImageVals[]){
|
int loadImage(int index, short int ImageVals[]){
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
cprintf(RED,"loadImage Not implemented for Jungfrau yet\n"); //compiler warnings on 1st argument of memcpy(ptr,ImageVals ,dataBytes);
|
index;
|
||||||
#else
|
Imagevals;
|
||||||
|
printf("loadImage Not implemented yet\n");
|
||||||
|
|
||||||
|
/*
|
||||||
u_int32_t address;
|
u_int32_t address;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case DARK_IMAGE :
|
case DARK_IMAGE :
|
||||||
@ -1434,7 +1435,8 @@ int loadImage(int index, short int ImageVals[]){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
printf("\nLoaded x%08x address with image of index %d\n",(unsigned int)(ptr),index);
|
printf("\nLoaded x%08x address with image of index %d\n",(unsigned int)(ptr),index);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
*/
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1717,11 +1719,7 @@ ip.ip_destip = destip;
|
|||||||
bus_w(RX_UDPMACL_AREG,(destmac)&0xFFFFFFFF);//rx_udpmacL_AReg_c
|
bus_w(RX_UDPMACL_AREG,(destmac)&0xFFFFFFFF);//rx_udpmacL_AReg_c
|
||||||
bus_w(DETECTORMACH_AREG,(sourcemac>>32)&0xFFFFFFFF);//detectormacH_AReg_c
|
bus_w(DETECTORMACH_AREG,(sourcemac>>32)&0xFFFFFFFF);//detectormacH_AReg_c
|
||||||
bus_w(DETECTORMACL_AREG,(sourcemac)&0xFFFFFFFF);//detectormacL_AReg_c
|
bus_w(DETECTORMACL_AREG,(sourcemac)&0xFFFFFFFF);//detectormacL_AReg_c
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
bus_w(UDPPORTS_AREG,((sourceport&0xFFFF)<<16)+(destport&0xFFFF));//udpports_AReg_c
|
bus_w(UDPPORTS_AREG,((sourceport&0xFFFF)<<16)+(destport&0xFFFF));//udpports_AReg_c
|
||||||
#else
|
|
||||||
bus_w(UDPPORTS_AREG,((destport&0xFFFF)<<16)+(sourceport&0xFFFF));//udpports_AReg_c
|
|
||||||
#endif
|
|
||||||
bus_w(IPCHKSUM_AREG,(checksum&0xFFFF));//ipchksum_AReg_c
|
bus_w(IPCHKSUM_AREG,(checksum&0xFFFF));//ipchksum_AReg_c
|
||||||
|
|
||||||
bus_w(CONTROL_REG,GB10_RESET_BIT);
|
bus_w(CONTROL_REG,GB10_RESET_BIT);
|
||||||
@ -2579,11 +2577,9 @@ int prepareADC(){
|
|||||||
|
|
||||||
bus_w(ADC_OFFSET_REG,0xbbbbbbbb);
|
bus_w(ADC_OFFSET_REG,0xbbbbbbbb);
|
||||||
// bus_w(ADC_INVERSION_REG,0x1f6170c6);
|
// bus_w(ADC_INVERSION_REG,0x1f6170c6);
|
||||||
#ifndef JUNGFRAU_DHANYA
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
return OK;
|
return OK;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,9 +69,8 @@ int setContinousReadOut(int d);
|
|||||||
int startReceiver(int d);
|
int startReceiver(int d);
|
||||||
|
|
||||||
int setDACRegister(int idac, int val, int imod);
|
int setDACRegister(int idac, int val, int imod);
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
int getDacRegister(int dacnum);
|
int getDacRegister(int dacnum);
|
||||||
#endif
|
|
||||||
|
|
||||||
int getTemperature(int tempSensor,int imod);
|
int getTemperature(int tempSensor,int imod);
|
||||||
int initHighVoltage(int val,int imod);
|
int initHighVoltage(int val,int imod);
|
||||||
@ -85,9 +84,8 @@ int getAdcConfigured();
|
|||||||
|
|
||||||
u_int64_t getDetectorNumber();
|
u_int64_t getDetectorNumber();
|
||||||
u_int32_t getFirmwareVersion();
|
u_int32_t getFirmwareVersion();
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
u_int32_t getFirmwareSVNVersion();
|
u_int32_t getFirmwareSVNVersion();
|
||||||
#endif
|
|
||||||
int testFifos(void);
|
int testFifos(void);
|
||||||
u_int32_t testFpga(void);
|
u_int32_t testFpga(void);
|
||||||
u_int32_t testRAM(void);
|
u_int32_t testRAM(void);
|
||||||
@ -150,16 +148,15 @@ int setDynamicRange(int dr);
|
|||||||
int getDynamicRange();
|
int getDynamicRange();
|
||||||
int getNModBoard();
|
int getNModBoard();
|
||||||
int setNMod(int n);
|
int setNMod(int n);
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
int getNMod();
|
int getNMod();
|
||||||
#endif
|
|
||||||
int setStoreInRAM(int b);
|
int setStoreInRAM(int b);
|
||||||
int allocateRAM();
|
int allocateRAM();
|
||||||
|
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
int writeADC(int addr, int val);
|
int writeADC(int addr, int val);
|
||||||
int prepareADC();
|
int prepareADC();
|
||||||
#endif
|
|
||||||
|
|
||||||
int clearRAM();
|
int clearRAM();
|
||||||
|
|
||||||
|
@ -110,9 +110,9 @@ int selMod(int mod,int imod );
|
|||||||
/* int getThresholdEnergy(); */
|
/* int getThresholdEnergy(); */
|
||||||
/* int setThresholdEnergy(int ethr); */
|
/* int setThresholdEnergy(int ethr); */
|
||||||
|
|
||||||
#ifdef JUNGFRAU_DHANYA
|
|
||||||
int setSettings(int i,int imod);
|
int setSettings(int i,int imod);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Other DAC index routines*/
|
/* Other DAC index routines*/
|
||||||
int getTemperatureByModule(int tempSensor, int imod);
|
int getTemperatureByModule(int tempSensor, int imod);
|
||||||
|
@ -26,16 +26,17 @@
|
|||||||
#define ADCREG3 0x4
|
#define ADCREG3 0x4
|
||||||
#define ADCREG4 0x5
|
#define ADCREG4 0x5
|
||||||
#define ADCREG_VREFS 0x18
|
#define ADCREG_VREFS 0x18
|
||||||
#define ADC_INVERSION_REG 0x43<<11
|
#define ADC_PIPELINE_REG 0x42<<11 // adc_offset_reg
|
||||||
#define ADC_PIPELINE_REG 0x42<<11
|
|
||||||
#define DBIT_PIPELINE_REG 0x59<<11
|
#define DBIT_PIPELINE_REG 0x59<<11
|
||||||
#define MEM_MACHINE_FIFOS_REG 0x4f<<11
|
#define MEM_MACHINE_FIFOS_REG 0x4f<<11
|
||||||
#define CONFGAIN_REG 0x5d<<11 /** was actually GAIN_REG which seems to be set to 0 later in this file*/
|
#define CONFGAIN_REG 0x5d<<11 /** was actually GAIN_REG which seems to be set to 0 later in this file*/
|
||||||
#else
|
|
||||||
#define ADC_INVERSION_REG 67<<11 /** picked up from after ADC_OFFSET_REG*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define ADC_INVERSION_REG 67<<11 /** picked up from after ADC_OFFSET_REG*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* constant FPGAVersionReg_c : integer:= 0; */
|
/* constant FPGAVersionReg_c : integer:= 0; */
|
||||||
/* constant FixedPatternReg_c : integer:= 1; */
|
/* constant FixedPatternReg_c : integer:= 1; */
|
||||||
/* constant StatusReg_c : integer:= 2; */
|
/* constant StatusReg_c : integer:= 2; */
|
||||||
|
@ -69,9 +69,6 @@ int set_dynamic_range(int);
|
|||||||
int set_roi(int);
|
int set_roi(int);
|
||||||
int get_roi(int);
|
int get_roi(int);
|
||||||
int set_speed(int);
|
int set_speed(int);
|
||||||
#ifndef JUNGFRAU_DHANYA
|
|
||||||
void prepareADC(void);
|
|
||||||
#endif
|
|
||||||
int set_readout_flags(int);
|
int set_readout_flags(int);
|
||||||
int execute_trimming(int);
|
int execute_trimming(int);
|
||||||
int lock_server(int);
|
int lock_server(int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user