adc_board
ADCBoard class for probe cards to measure voltage on RD53B quad-chip modules. Different versions of the probe card can be implemented by inheriting from adc_board and overwriting ``DEFAULT_PIN_MAP`, an example is given with eth_probecard.
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 if this might be different in the schematics. Also, there are 16 voltage channels and 2 temperature channels:
..code-block:
Temperature: 9,18
In the MeasureChannel class, it is 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', **kwargs)
..Warning: the
resource
keyword argument is mandatory and must be explicitly specified - failing to do so will result in an error since the Multiton metaclass on VisaInstrument masks this default value forresource
.- Parameters:
resource – VISA Resource address. see VISA docs for more info.
**sim – whether to simulate the device
**pin_map – pin_map with used pins for the board
**disconnect_on_exit – Whether to set 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
Length of the data in bytes.
- DEFAULT_PIN_MAP = {1: 'VOLTAGE_PIN_1', 2: 'VOLTAGE_PIN_2', 3: 'VOLTAGE_PIN_3', 4: 'VOLTAGE_PIN_4', 5: 'VOLTAGE_PIN_5', 6: 'VOLTAGE_PIN_6', 7: 'VOLTAGE_PIN_7', 8: 'VOLTAGE_PIN_8', 9: 'TEMPERATURE_PIN_9', 10: 'VOLTAGE_PIN_10', 11: 'VOLTAGE_PIN_11', 12: 'VOLTAGE_PIN_12', 13: 'VOLTAGE_PIN_13', 14: 'VOLTAGE_PIN_14', 15: 'VOLTAGE_PIN_15', 16: 'VOLTAGE_PIN_16', 17: 'VOLTAGE_PIN_17', 18: 'TEMPERATURE_PIN_18'}
General pin mapping. Can be overwritten by heirs of ADCBoard.
- HEAD_LEN = 8
Length of the header in bytes.
- MEASURE_TYPES = {'TEMPERATURE': 'Temperature on pin 9 and 18', 'VOLTAGE': 'Differential voltage on pin'}
- MONITOR_SLEEP = 1
Time between two measurements for monitor.
- MSG_LEN = 90
Length of the message without header in bytes.
- class MeasureChannel(instrument, channel, measure_type, unit='')
Bases:
MeasureChannel
MeasureChannel implementation for ADCBoard.
- channel_name() str
- Returns:
pin name
- Return type:
str
- property read: float
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 from the command line.
- Returns:
pin value from last measurement
- Return type:
float
- property status: bool
- Returns:
status of instrument
- Return type:
bool
- property value: float
- Returns:
pin value at measurement
- Return type:
float
- N_CHANNELS = 18
Number of pins on the board.
- PARITY = 0
- QUERY_LATENCY = 1
VISA maximum query latency
- REQUEST_STUB = '5A5A{req:02X}{req:02X}{cmd:02X}{cmd:02X}0000'
- STAT_LEN = 8
Length of the data in bytes.
- STOP_BITS = 10
- TIMEOUT = 100000
Serial link timeout (ms).
- get_pin_map() dict
- Returns:
pin map of the board
- Return type:
dict
- identify() str
command to identify the module. calls query_status() and prints production and serial number for identification of the board. currently a bad handler for the case of different device. in this case, call most likely freezes due to no feedback. :return: production number and serial number of adc_board :rtype: str
- monitor(**kwargs)
monitoring the pin voltages and temperatures. :param **repetition: number of repetitions. runs forever if not provided or 0. :param **monitor_sleep: time between queries (default=`ADCBoard.MONITOR_SLEEP`) :print: current measurement block.
- off() bool
“fake” entry point to keep common interface. this instrument does not have settings to turn on/off except for physically pulling the plug. this function is not actively used.
- on() bool
“fake” entry point to keep common interface. this instrument does not have settings to turn on/off except for physically pulling the plug. this function is not actively used.
- query(setting, **kwargs) float
- Parameters:
setting – the name of the pin, needs to be in pin_map.
**force_query – require query or read from cache (default=False).
- Returns:
pin value at measurement
- Return type:
float
- query_all(**kwargs) dict
returns the value for all pins that are in use as a dictionary. :param **force_query: require query or read from cache (default=False). :return: pin values at measurement :rtype: dict
- query_channel(channel, **kwargs) float
- Parameters:
channel – channel number to query.
**force_query – require query or read from cache (default=False).
- Returns:
pin value at measurement
- Return type:
float
- set(setting, value, **kwargs) float
“fake” entry point to keep common interface. this device cannot set values. this function is not actively used.
- status() bool
- Returns:
status of the board
- Return type:
bool
- validate_channel(channel, **kwargs) bool
check if an output exists on this device. :param channel: channel number to validate as an output. :param **raise_exception: raise exception or return bool (default=True). :return: whether channel exists or not :rtype: bool