Each FPGA has 32-bit registers accessible by the TinySh shell running on their
PowerPC processesors through serial port connections. These registers allow
run-time control over the spectrometer without requiring hardware recompiles.
Each register is numbered and can be set using the Octave serial script with
the command
Available Registers
Input Selection
For debugging purposes, each module can generate its own sync pulses and test
vectors. The input selection register on each FPGA controls a multiplexor that
switches between internal and external sources for sync and data. Only the 3
lowest bits of the register are used, with selector[1:0] choosing between
the 4 sync options (numbered 0 to 3), and selector[2] choosing between
the 2 data options (numbered 0 and 1). The register value to be supplied is thus
| Sync options | |
| 0 | External sync |
| 1 | Internal sync, periodic |
| 2 | Internal sync, toggled one-shot |
| 3 | No sync |
| Data options | |
| 0 | External data |
| 1 | Internal test data |
FFT Downshifts
The FFT blocks in the PFB and FFT modules have dynamically selectable downshifts
per stage. Each bit of the 32-bit register controls whether or not a stage in
the FFT downshifts, with the LSB corresponding to the first stage. For example,
shifting every other stage could be done one of two ways:
register_value = x55555555 = 0b01010101010101010101010101010101
(shift 1st, 3rd, 5th,... 31st stage)
register_value = xAAAAAAAA = 0b10101010101010101010101010101010
(shift 2nd, 4th, 6th,... 32nd stage)
Thresholder Settings
Threshold scaler
The thresholder takes an 18.9 unsigned number that it uses to scale the baseline
average to compute a threshold. When manually writing to the register through
the serial port, the desired scaler should be multiplied by 2^9 to account for
the binary representation. For example, the system defaults to a scaler of
0.09375, so manually setting that register would be the command:
The shell also provides a function setscaler <scaler> to set this parameter.
FIFO reset
The reporting FIFOs can be manually reset and emptied on the next sync pulse by
setting the LSB of the register to 1'b1. The FIFOs will continue to be reset by
each sync pulse until the LSB of that register is reset to 1'b0.
Event limit
The thresholder hardware can limit the number of above-threshold hits reported
in each PFB bin according to the value in this register. The limit can be in
the range [1,32768], but limits greater than ~100 may require more bandwidth
than is available, and cause data to be dropped.
The shell also provides a function seteventlimit <event_limit> to set this parameter.