This entry refers to the MBS template from Nik Kurz found at /esr/usr/litv-exp/MBS/templates/2024_MBS_R2_R4_IFC_v1 or similar.
To find the right VME address for your modules, you need the (1) base address, (2) module space and (3) module offset. You simply add those three hex numbers to get the individual module address.
Example:
V830[2] is the third V830 in this DAQ and has index 2.
It has
(1)=0x7000000
(2)=0x400000
(3)=0x20000.
Added up this yields
0x07440000
So you have to set 0x0744 on the module.
Details:
(1) the base is ususally 0x0700.0000. You only need the 4 hi bits, i.e. 0x0700. It can be readout in setup.usf, there is a line like this:
-------
LOC_MEM_BASE = (0xe7000000, 0x0, 0x0, 0x0,-
-------
(2) the module space is the start address of the range foreseen for this kind of module in the template. It is defined in the f_used.c:
-------
#define ADDR_OFF_VMMR 0x10000
#define ADDR_OFF_MDPP 0x100000
#define ADDR_OFF_V775 0x200000
#define ADDR_OFF_V785 0x300000
#define ADDR_OFF_V830 0x400000
#define ADDR_OFF_MADC 0x500000
#define ADDR_OFF_MTDC 0x600000
#define ADDR_OFF_VUL_SCAL 0x1000000
-------
(3) the module offset is an incremental offset from the start address given to modules of higher index than 0. The second module of a type has index 1 and will get the offset once, while the first module
does not get an offset. The offset along with the number of modules of a kind is defined in the f_user.c:
-------
#define N_VMMR 0
#define VMMR_OFF 0x20000
#define N_MDPP 0
#define MDPP_OFF 0x20000
#define N_V775 0
#define N_V775_CHA 32
#define V775_OFF 0x20000
#define N_V785 0
#define N_V785_CHA 32
#define V785_OFF 0x20000
#define N_V830 1
#define N_V830_CHA 32
#define V830_OFF 0x20000
#define N_MADC 0
#define N_MADC_CHA 32
#define MADC_OFF 0x20000
#define N_MTDC 0
#define N_MTDC_CHA 32
#define MTDC_OFF 0x20000
#define N_VUL_SCAL 0
#define N_VUL_SCAL_CHA 32
#define VUL_SCAL_OFF 0x1000000
------- |