Virtual card

From MCEWiki
Revision as of 22:08, 5 March 2008 by Sysop (talk | contribs)

Unlike hardware (or "physical" cards), virtual cards are associated with a certain function (such as a squid amplifier stage). A single virtual card, parameter address can span multiple physical cards.

Currently, the virtual cards implemented in mas are:

sq1   First stage squid control (fb_const, bias, servo_mode)
sq2   Second stage squid control (fb, bias)
sa    Series array control (fb, bias, offset)
tes   Detector and heater control (bias)

Virtual cards are useful for two reasons. The first is to provide the user with a more intuitive mnemonic set. The second is to provide a layer of abstraction between function and hardware; this allows higher level programs and scripts to be written that are independent of the hardware configuration.

Where possible, virtual card addresses should be used instead of hardware card addresses.

Reading and writing virtual cards

Only read and write commands are supported on virtual cards. The RB, WB, RRA, and WRA all have the natural behaviour when operating on virtual cards. For example, the following are equivalent:

rra bc3 bias 10 4
rra sq2 bias 10 4

Many virtual card parameters are shared across multiple hardware cards (usually, these are per-column parameters shared across all the readout cards). In this case, the virtual card data is assembled from each readout card, starting with rc1. For example, compare

sq2   Second stage squid control (fb, bias)
sa    Series array control (fb, bias, offset)
tes   Detector and heater control (bias)

Virtual cards are useful for two reasons. The first is to provide the user with a more intuitive mnemonic set. The second is to provide a layer of abstraction between function and hardware; this allows higher level programs and scripts to be written that are independent of the hardware configuration.

Where possible, virtual card addresses should be used instead of hardware card addresses.

Reading and writing virtual cards

Only read and write commands are supported on virtual cards. The RB, WB, RRA, and WRA all have the natural behaviour when operating on virtual cards. For example, the following are equivalent:

rra bc3 bias 10 4
rra sq2 bias 10 4

Many virtual card parameters are shared across multiple hardware cards (usually, these are per-column parameters shared across all the readout cards). In this case, the virtual card data is assembled from each readout card, starting with rc1. For example, compare

rb rc1 sa_bias
Line   1 : ok : 0 1 2 3 4 5 6 7
rb rc2 sa_bias
Line   2 : ok : 8 9 10 11 12 13 14 15
rb rc3 sa_bias
Line   3 : ok : 16 17 18 19 20 21 22 23
rb rc4 sa_bias
Line   4 : ok : 24 25 26 27 28 29 30 31

to

rb sa bias
Line   5 : ok : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

(In v2 systems, which can only hold 2 readout cards, such parameters will only return 16 values. In systems with empty readout card slots, the data in virtual card parameters will be padded to account for the missing cards.)

For TES bias lines, the mapping will depend on the experiment's needs. By default, the parameter "tes bias" is a 3 word block that maps to "bc1 bias", "bc2 bias", and "bc3 bias".

Detail of mappings

To get a list of the mappings on your system, run mce_status with the -g option. (This does not require an MCE to be connected, and it will not issue any MCE commands.)

The output from "mce_status -g" is interpreted as follows...