Hybrid row select for mux11d

From MCEWiki

This document is under active development.

In standard mux11d, the S1 selection signals (row_select) are provided by the Adress Card (AC). "Hybrid row select" refers to the use of Bias Card (BC) flux_fb DAC lines to augment the number of addressable S1.

  • Without any firmware modifications, it should be possible to multiplex any combination of AC and BC DACs, with num_rows up to 64. However, without some firmware modification, one can configure at most 58 of those channels for servo and readout. (Actually you can only read back 57 values from a register, so that's as far one should push it.)
  • With some communication protocol modification, it should be possible to configure and readout any subset of 64 rows.
  • Major modifications (especially to RC) are required to get more than 64 rows.

Software modifications

The software components affected by hybrid row select are:

  • MAS low-level and mce_script -- internal code often assumes num_rows <= 41. These instances shouldn't be too hard to find and remove.
  • mux_lock -- rs_servo must be able to ramp the row_select DACs.
  • config script system -- must be able to map selected row_select values to correct MCE registers.

mce.cfg considerations

The AC and BC are set up differently for fast switching, and thus a low-level solution based on virtual card re-mappings is not feasible.

  • AC accepts lists of on_bias and off_bias values, and order of their application is set by the row_order register.
  • BC allows a completely arbitrary matrix of flux_fb values, which is more general than the AC model. There is no equivalent of row_order, since the matrix rows themseleves can be modified to produce the equivalent reordering of output values.

The biggest obstacle here is that the manipulation of "row_order" has very different implementations for the AC and BC. The path to a transparent low-level solution is not clear.

Otherwise, the changes to mce.cfg are straight-forward. Switches should be added to increase the effective maximum num_rows to 57/58 or 64/66. The "row select" and "row deselect" virtual targets will be eliminated in favour of a mapping described in experiment.cfg.

experiment.cfg

The config script system must be able to take care of translating values in experiment.cfg to the appropriate MCE registers. In order for that to take place, experiment.cfg must also encode a map from "row select" index into physical address lines. We define the system by example:

# Activate hybrid mode.  With great power comes great complexity.
mux11d_hybrid_row_select = 1;

# Row select lines will be drawn from AC and from BC2.
mux11d_row_select_cards = ["ac", "bc2"];

# For the purposes of mux_order, AC lines are indexed by [0,...,40] and BC lines are indexed by [50,...,81].
mux11d_row_select_cards_row0 = [0, 50];

# For mux cycles where the AC is not active, use ac on_bias[39] as a DAC to idle on.
mux11d_ac_idle_row = 39;

# The muxing order will be: 32 rows from AC (corresponding to on_bias[0] through on_bias[31],
#  followed by 16 rows from BC (fb_col0 to fb_col15), followed by a single AC row (on_bias[40]).
mux11d_mux_order = [ 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,
                    50,51,52,53,54,55,56,57,58,59,
                    60,61,62,63,64,65,
                    40 ];

The values for row_select and row_deselect will then be stored in MUX order (rather than physical line order), in experiment.cfg settings:

row_select   = [ 999,999,999,999,999,999... ]#(49 values total)
row_deselect = [ 999,999,999,999,999,999... ]#(49 values total)

We may as well allow the user to rescale row_select and row_deselect values prior to application to the DACs. While it is more powerful to specify this on a per DAC or per MUX cycle basis, it is probably enough to specify the multiplier on a per-card basis.

# Multiplier for row_select -> MCE values.
mux11d_row_select_multipliers = [1, 0.5];

These experiment.cfg settings will produce the following MCE configuration:

  • ac row_order is like:
wb ac row_order  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 39 39 39 39 39 39 39 39 \
                39 39 39 39 39 39 39 39 40
  • row_select and row_deselect 999 and 0, except for row 39 which is 0 and 0.
wb ac on_bias 999 999 999 .... 999 0 999
wb ac off_bias 0 0 0 ... 0 0 0
  • The bc2 col* registers are set to row_deselect values (probably 0) except for:
wra bc2 col0  32 498
wra bc2 col1  33 498
wra bc2 col2  34 498
wra bc2 col3  35 498
...
wra bc2 col14 46 498
wra bc2 col15 47 498

mux_lock

The rs_servo program has to ramp the row select DACs. It will need to parse experiment.cfg to know how to do this. It should only ramp the DACs listed in mux11d_mux_order. It should properly decode mux_order and multipliers.