# Presentation: 468603

## DOM Main BoardTest Plan

- Lawrence Berkeley National Laboratory
- Gerald Przybylski
- May 20, 2003
- Rev 1.0

## Phases

- Characterization/Pre-ProductionTests- Develop Testing Program- Optimizing operating points- Discovering problems in design- Aim for Uniformity
- Production Tests- Go/No-Go- Minimum Performance Criteria- Store Characteristics in Permanent Database

- IceCube PDR - Madison

- 5/20/2003

## Preliminary Tests

- Power consumption. (~2.5Watts)
- Firmware Download to CPLD
- Software Download to Flash Memory
- Software Download to Configuration Memory
- Load FPGA with configuration file
- Set DACs
- Read ADCs
- CPU Soft Restart Through CPLD

- IceCube PDR - Madison

- 5/20/2003

## Maintenance and Development Utilities

- Forth programming environment implemented by  Arthur JonesSee <http://deimos.lbl.gov/~arthur/dom/>
- Tools useful through  Serial Port
- Tools useful through Remote DOM console
- Hardware Manipulation
- Flash File System Maintenance commands
- Flash File System Recovery commands

- IceCube PDR - Madison

- 5/20/2003

## Software and File Utilities

- Write Program File to Flash
- Write FPGA Design File to Flash
- Write Configuration Constants to Flash
- List Flash Files
- Delete Flash Files
- Load Flash File to FPGA
- Load Configuration to DOM MB
- Run Application Program

- IceCube PDR - Madison

- 5/20/2003

## Tests that require computer code & Firmware behind them:
Write Given Name
Read Given Name
Read Numeric Ident. (from OTP field in Flash)
Memory Test:  Flash, and SDRAM
Read Raw On Board Temperature Sensor (I2C)
Read Raw On Board Pressure Sensor (an ADC)
Read Raw Data from On-Board ADC
Read Raw Data from HV Base ADC
Write Raw Data to On-Board DAC
Write Raw Data to HV Base DAC
Enable/Disable HV Base
Enable/Disable Flasher Interface
Enable/Disable ATWD Input Mux

- Write Given Name
- Read Given Name
- Read Numeric Ident. (from OTP field in Flash)
- Memory Test:  Flash, and SDRAM
- Read Raw On Board Temperature Sensor (I2C)
- Read Raw On Board Pressure Sensor (an ADC)
- Read Raw Data from On-Board ADC
- Read Raw Data from HV Base ADC
- Write Raw Data to On-Board DAC
- Write Raw Data to HV Base DAC
- Enable/Disable HV Base
- Enable/Disable Flasher Interface
- Enable/Disable ATWD Input Mux

- Basic High Level Tests

- IceCube PDR - Madison

- 5/20/2003

## HAL Environment Tests (1)(Hardware Access Library)

- Read Formatted Data from On-Board ADC
- Read Power Supply Currents
- Read Formatted Data from HV Base ADC
- Read Formatted Data from Flasher Board
- Write Formatted Data to On-Board DAC
- Write Formatted Data to HV Base DAC
- Write Formatted Data to Flasher Board
- Address ATWD Input Mux
- Execute ‘Standard Configuration’ (script)
- Generate Local Coincidence Test Output
- Read Raw Local Coincidence Data

- IceCube PDR - Madison

- 5/20/2003

## HAL Environment Tests (2)

- Generate Test Pulses from On-Board Pulser
- Read Raw FPGA Events with:- CPU trigger- PMT event trigger- Flasher trigger
- Read set of Pedestals for characterization of pedestal pattern
- Write Pedestal Correction Vector to FPGA
- Sweep  the Comparator Threshold “S” curves
- Sweep Pedestal DAC through ATWD span while reading out ATWD.
- Sweep Pedestal DAC through fADC span while reading out fADC.
- Measure PMT Transit Time

- IceCube PDR - Madison

- 5/20/2003

## HAL Environment Tests (3)

- Measure Timing Pulse to Clock Phase
- Measure Flasher Pulse Current to Clock Phase- for On-Board Pulser- for Flasher Board Pulser
- Measure Local Coincidence to Clock Phase
- Measure Oscillator to Clock Phase
- Read Timing Waveform from Communications ADC

- IceCube PDR - Madison

- 5/20/2003

## Forth commands p.1

- . **(period)** -- print top of stack
- .**s** -- print entire stack contents
*val* *addr* **c!** -- set byte at address *addr* to *val*
*val* *addr* **w!** -- set 16 bit word at address *addr* to *val*
*val* *addr* **!** -- set 32 bit word at address *addr* to *val*
*addr* **@** -- read the 32 bit word at address *addr*
*addr* **c@** -- read the byte at address *addr*
*addr* **w@** -- read the 16 bit word at address *addr*
- : **--** start a function definition
*cond* **if** *code1* *[* **else** *code2]* **endif** -- if *cond* is true execute *code1* otherwise execute *code2*.
*val* **constant** *name* -- set value of *name* to *val*
**\** -- the rest of the line is a comment
**drop** -- drop the top value of the stack

- IceCube PDR - Madison

- 5/20/2003

## Forth commands p.2

**dup** -- duplicate the top value of the stack
**ymodem1k** -- push address and size of a buffer retrieved from the ymodem protocol
*nbytes* **allocate** -- allocate nbytes on the heap
*addr* **free** -- free addr as allocated
*from* *to* *count* **icopy** -- copy count words from *from* to *to*
*end* *start* ?**DO** *code* **LOOP** -- execute code from *start* (inclusive) to *end* (exclusive), the variable *i* contains the current iteration.
*channel* *value* **writeDAC** -- write *val* to dac at *channel*
*us* **usleep** -- sleep *us* microseconds
*addr* *count* **od** -- hex dump of *count* words at address *addr*
*channel* **analogMuxInput** -- set analog mux input to *channel*

- IceCube PDR - Madison

- 5/20/2003

## Forth commands p.3

**readTemp** -- read the temperature, value returned is coded
*code* **prtTemp** -- print coded temperature
*channel* **readADC** -- read the ADC counts from *channel*
*val* **not** -- return bitwise not of *val*
-  *val1* *val2* **and** -- return bitwise and of *val1* and *val2*
*val1* *val2* **or** -- return bitwise or of *val1* and *val2*
*val1* *val2* **xor** -- return bitwise xor of *val1* and *val2*
*val* *shift* **lshift** -- return *val* shifted left *shift*
*val* *shift* **rshift** -- return *val* shifted right *shift*
*val1* *val2* **+** -- return sum of *val1* and *val2*
**reboot** -- reboot the machine
*val1* *val2* **-** -- return difference of *val1* and *val2*
*val1* *val2* ***** -- return multiplication of *val1* and *val2*

- IceCube PDR - Madison

- 5/20/2003

## Forth commands p.4

*val1* *val2* **/** -- return division or of *val1* and *val2*
*val1* *val2* **>** -- return greater than of *val1* and *val2*
*val1* *val2* **<** -- return less than or of *val1* and *val2*
*val1* *val2* = **--** return equals of *val1* and *val2*
**swap** -- swap top two stack values
*addr* *count* **fpga** -- program fpga from *count* bytes at address *addr*
*addr* *count* **interpret** -- interpret *count* bytes of forth code at address *addr*
**REGISTERS** -- base address of excalibur registers
**CPLD** -- base address of cpld registers
**true** -- value of true
**false** -- value of false

- IceCube PDR - Madison

- 5/20/2003

## Forth commands p.4

**base** -- address of number base
**rawCurrents** -- address of flag to display raw or corrected currents
**disableCurrents** -- address of flag to disable display of board currents
**s**" *string* \b" -- push addr and count of *string* chars on the stack
*addr* *count* **type** -- print contents of string at address *addr* with *count* bytes
*addr* *count* **swicmd** -- execute swi (software interrupt) command given by string at address *addr* with *count* bytes. **prtRawCurrents** -- print raw currents to screen. **prtCookedCurrents** -- print efficiency corrected currents to screen.
*plln* **prtPLL** -- print pll info for *plln* (1 or 2).

- IceCube PDR - Madison

- 5/20/2003