Constructing a module object

Each physical module is represented in the software by an object constructed from the class CAENclass. The CAENclass interface supports constructing objects in any VME crate attached to the system

The original VME bus specification does not support geographical addressing (the ability to select a module by its slot position in the crate). In an effort to make module setup easier, CERN has defined an extension to the VME bus that adds a connector, P3, between the two normal VME connectors. This connetor includes an encoding of the module slot,and allows modules to support geographical addressing.

The CAEN 32 channel digitizer family can be purchased with geographical addressing capability as an option. Modules with geographical addressing capability will have three connectors on the VME bus, and must be used in a VME bus with CERN extensions (there will be three connectors on the backplane of such crates as well).

When accessed in geographical address mode, not all of the module capabilities are accessible. Therefore, since the CAEN modules also support the ability to have a programmable base address, when constructed in geographical mode, modules are programmed with a base address of slot << 24. During data taking, the module is accessed at this relocated base address.

When used in combinatino with other modules, it is therefore important to ensure that there are no address collisions between these modules and the reprogrammed base addresses of the CAEN cards.

See the sections below which show how to invoke CAENcard::CAENcard to construct modules in:

Geographical adress mode.

Modules are constructed in geographical address mode by setting the Geo flag of the constructor (CAENcard::CAENcard) true, and specifying the module's slotNum (geographical address). This slot will be used not only to locate the module and set it up, but will also be placed by the module in the module's data word geo fields when the module is read out.

When constructed in geographical mode, the constructor's nBase parameter is ignored. The code sample below constructs a CAENcard in slot 5 of crate 0:

        #include <CAENcard.h>
        ...
           CAENcard* pCard = new CAENcard(5);
        ...

note that the default value for the crateNum parameter is 0, and the default value for the Geo parameter is true.

Physical base address mode.

When a module is constructed in Physical Base mode, the geographical address in the data is actually a virtual slot number that is programmed into the module. The constructor, CAENcard::CAENcard will use the slotNum parameter to set the geographical address register of the module.

To construct a module using physical address mode you must:

The code sample below constructs a CAENcard object corresponding to a module at base address 0x100000 in crate 0. The geographical address will be programmed to 6:

        #include <CAENcard.h>
        ...
           CAENcard* pCard = new CAENcard(6, 0, false, 0x100000);
        ...

Generated on Wed Sep 17 08:38:10 2008 for NSCL Device support. by  doxygen 1.5.1