adc_board
AdcBoard class for probe cards to measure voltage on RD53B quad-chip modules. Different versions of the probe card will be produced in future.
This code currently supports V2 of the AdcBoard.
Regarding the channel numbers of the AdcBoard, there are 18 channels. In accordance with the icicle philosophy, the channel numbers start at 1, even though, this might be different in the schematics. Also, there are 16 voltage channels and 2 temperature channels:
Temperature: 9,18
In the MeasureChannel class it is however possible to assign the measure type freely to any channel.
Classes
|
AdcBoard class. |
AdcBoard
- class icicle.adc_board.AdcBoard(*args, **kwargs)
Bases:
VisaInstrument
AdcBoard class.
This board is designed to be used with a probe card to measure voltages on RD53B quad-chip modules. This is required for SLDO scans.
- __init__(resource='ASRL21::INSTR', pin_map=None, sim=False)
must be explicitly specified - failing to do so will result in an error since the Multiton metaclass on VisaInstrument masks this default value for
resource
.- Parameters:
resource – VISA Resource address. See VISA docs for more info.
pin_map – Can be used to clean up the printout and remove disconnected pins. Depends on the used module. Currently only generic (all pins printed) and ‘QUAD’ implemented.
disconnect_on_exit – Whether to set connected pin to OFF on device close.
- APPLICATION_STUB = '5A5A{req:02X}{req:02X}{cmd:02X}{cmd:02X}5858'
- BAUD_RATE = 115200
Serial link Baud rate.
- CMD = {'application': 55, 'read': 17, 'status': 51}
- DATA_BITS = 8
- DATA_LEN = 72
- DEFAULT_PIN_MAP = {1: 'VDDA_ROC2', 2: '-', 3: 'VDDD_ROC2', 4: '-', 5: 'VDDA_ROC3', 6: '-', 7: 'VDDD_ROC3', 8: '-', 10: 'VIN', 11: '-', 12: 'VDDA_ROC0', 13: '-', 14: 'VDDD_ROC0', 15: 'VOFS', 16: 'VDDA_ROC1', 17: 'VDDD_ROC1'}
- HEAD_LEN = 8
- MEASURE_TYPES = {'TEMPERATURE': 'Temperature on ADC', 'VOLTAGE': 'Differential voltage on pin'}
- MSG_LEN = 90
- class MeasureChannel(instrument, channel, measure_type, unit='')
Bases:
MeasureChannel
MeasureChannel implementation for TTI.
- channel_name()
- property read
Returns the pin value last measured. This will not remeasure the pin value. Mostly used, when an array of pins is read out.
This function is not included in measurechannel_cli, so it is not accessible form the command line.
- Returns:
pin value from last measurement
- Return type:
int
- property status
- Returns:
status as received from query_status()
- Return type:
int
- property value
Returns the pin value measured. This always remeasures the pin value at call.
- Returns:
pin value at measurement
- Return type:
int
- N_CHANNELS = 18
- PARITY = 0
- READ_TERMINATION = ''
- REQUEST_STUB = '5A5A{req:02X}{req:02X}{cmd:02X}{cmd:02X}0000'
- STAT_LEN = 8
- STOP_BITS = 10
- TEMP_CHANNELS = [9, 18]
- TIMEOUT = 100000
Serial link timeout (ms).
- WRITE_REMINATION = ''
- get_pin_map()
Getter method for the pin_map for a specific moduel type.
- TODO: When we have different modules (e.g. double modules) -
make the returned pinmap dependent on :param pin_map
- identify()
Command to identify the module. calls query_status() and prints out production and serial number for identification of the board. Currently bad handler for case of different device. In this case, call most likely freezes due to no feedback.
- Print:
Production number and serial number of adc_board
- monitor(repeats=0)
Monitoring the pin voltages and temperatures.
- Parameters:
repeats – how many measurements to do before stopping. If 0, indefinite repeats
- off()
“Fake” entry point to keep common interface.
This device does not have settings to turn on/off except for physically pulling the plug. Function not actively used.
- on()
“Fake” entry point to keep common interface.
This device does not have settings to turn on/off except for physically pulling the plug. Function not actively used.
- query(setting=False, **kwargs)
“Fake” entry point to extend common interface as much as possible.
- Parameters:
no_lock – override acquire_lock (e.g. if lock already taken by function that set-call is nested within).
attempts – how many retries to give set command.
- query_adc(refresh=True)
Measures once the full array of pins connected to the AdcBoard.
- Returns:
voltage and temperature values (converted) in separate lists.
- query_status()
Query to check the status of the ADC_Board. Used currently mainly for identification of the device. If not an ADC_Board, either no answer will be given or _checkHead() will fail.
- Returns:
production id, serial id, hardware version, hardware assembly, software version,
- set(setting, value, **kwargs)
“Fake” entry point to extend common interface as much as possible.
No values to actually set on this device - therefore empty function. uses lock from sub-command - pass kwargs
- validate_channel(channel, raise_exception=True)
Check if an output exists on this device.
- Parameters:
channel – Channel number to validate as an output.