Introduction
the peary software is deployed inside the ZC706 FPGA board and running on the Zynq ARM CPU. It consist of the software needed to operate the resources available on the CaR board (power supplies, Pulser, Voltage and Current Sources) and the device specific code to operate the different chips that can be used with the Peary system.
Two (three) methods are available to interact with ATLASPix in the Peary software :
- pearycli : peary universal command line interface (CLI)
- ATLASPixServer : ATLASPix server deamon for scripting and automation
- pearyd : Peary universal server deamon, to replace ATLASPixServer in the near future
To connect to the Zynq FPGA OS, SSH is the prefered method. Make sure to edit the file /etc/network/interfaces
on the root partition of the SD Card prepared for the Zynq FPGA. For example, to force the system to take a static IP at startup, the following should be specified :
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
To connect to the FPGA, make sure you PC has an interface in the same local network. Following the previous example settings, your PC should have an IP an the range 192.168.1.XXX
in the same network as the FPGA is connect. Using SSH, this command will connect you to a bash shell inside the FPGA (no password needed) :
ssh root@192.168.1.10
Getting started with the Pearycli
The Pearycli is a command line interface allowing to register and interact with multiple devices using test commands and arguments. To start the Pearycli, use the following command :
pearycli -v <VERBOSE LEVEL> -l <LOG FILE> -r <SCRIPT of COMMANDS>
-
<VERBOSE LEVEL>
represent the level of verbosity of the peary software, the available choices are :INFO,WARNING,DEBUG
-
<LOG FILE>
is a text file where all the input/output of the command line seesion with be reccorded -
<SCRIPT of COMMANDS>
point to the path of a text file containing a list of commands to be executed at startup
add_device <device>
is first command required to activate ATLASPix in the pearycli. <device>
is the device to be instantiated. For ATLASPix, the device name is ATLASPix, therefore, the following commands tells the pearycli to activate one ATLASPix :
add_device ATLASPix
Output :
|16:31:12.666| (INFO) Creating new instance of device "ATLASPix".
|16:31:12.666| (STATUS) New Caribou device instance, version peary v0.9+596~g062fe2c
|16:31:12.666| (STATUS) This device is managed through the device manager.
|16:31:12.667| (STATUS) Firmware version: 0x64a530a7 (12/9/2018 19:2:39)
|16:31:12.671| (INFO) Setting clock circuit on CaR board ATLASPixDevice
|16:31:13.803| (INFO) Appending instance to device list, device ID 0
|16:31:13.804| (INFO) Manager returned device ID 0.
A new ATLASPix device is instantiated and is attributed the ID 0. Multiple device can be instantiated, if the connection scheme allows for it.
As ATLASPix contains three type of matrices, the second command that is required is SetMatrix <matrix type> <ID>
where :
- is the type of ATLASPix matrix, which can be M1,M1ISO or M2. In most case, M1 is the one that is wire-bonded to the PCB, unless otherwise noticed.
- is the device ID of the ATLASPix that was instanciated. In most case it is 0
The third required commands is powerOn <ID>
, which powers the ATLASPix LV power supplies with the defaults values.
- is the device ID of the ATLASPix that was instanciated. In most case it is 0
- Defaults values can be found in ATLASPix code here.
To verify the LV voltage levels and currents measured by the CaR board, you can use the following command : powerStatusLog <ID>
. The output should look like this :
# powerStatusLog 0
|16:40:22.887| (INFO) ATLASPixDevice power status:
|16:40:22.887| (INFO) VDDD:
|16:40:22.887| (INFO) Bus voltage: 1.8575V
|16:40:22.888| (INFO) Bus current: 0.0227678A
|16:40:22.889| (INFO) VDDA:
|16:40:22.889| (INFO) Bus voltage: 1.8375V
|16:40:22.890| (INFO) Bus current: 0.0667773A
|16:40:22.891| (INFO) VSSA:
|16:40:22.891| (INFO) Bus voltage: 1.19V
|16:40:22.892| (INFO) Bus current: 0.057011A
|16:40:22.893| (INFO) VDDRam:
|16:40:22.893| (INFO) Bus voltage: 1.88375V
|16:40:22.893| (INFO) Bus current: 0A
|16:40:22.894| (INFO) VCC25:
|16:40:22.895| (INFO) Bus voltage: 2.5075V
|16:40:22.895| (INFO) Bus current: 0.0299704A
|16:40:22.896| (INFO) VDDHigh:
|16:40:22.896| (INFO) Bus voltage: 1.85875V
|16:40:22.897| (INFO) Bus current: 0.0212418A
#
Finally, to configure the ATLASPix with its defaults values, use the configure <ID>
command. Ex:
# configure 0
|16:42:10.686| (INFO) Configuring ATLASPixDevice with default configuration
sending default TDACs
|16:42:10.989| (INFO) Setting registers from configuration:
#
To execute these commands automatically at pearycli startup, you can create a text file, for example config.cfg
, containing the following lines :
add_device ATLASPix
SetMatrix M1 0
powerOn 0
configure 0
powerStatusLog 0
Then, start the pearycli, specifying the path of this file in the arguments :
pearycli -r config.cfg
The result :
|16:45:19.400| (WARNING) No configuration file provided, all devices will use defaults!
|16:45:19.401| (INFO) Welcome to pearyCLI.
|16:45:19.401| (INFO) Currently 0 devices configured.
|16:45:19.401| (INFO) To add new devices use the "add_device" command.
# exit
|16:45:21.131| (INFO) Done. And thanks for all the fish.
root@caribou:~# pearycli -r PEARYDATA/scripts/ap1b02w10s30.cfg
|16:45:23.264| (WARNING) No configuration file provided, all devices will use defaults!
[0] add_device ATLASPix
|16:45:23.271| (INFO) Creating new instance of device "ATLASPix".
|16:45:23.271| (STATUS) New Caribou device instance, version peary v0.9+596~g062fe2c
|16:45:23.271| (STATUS) This device is managed through the device manager.
|16:45:23.272| (STATUS) Firmware version: 0x64a530a7 (12/9/2018 19:2:39)
|16:45:23.276| (INFO) Setting clock circuit on CaR board ATLASPixDevice
|16:45:24.406| (INFO) Appending instance to device list, device ID 0
|16:45:24.407| (INFO) Manager returned device ID 0.
[1]
[2] SetMatrix M1 0
[3]
[5]
[6] powerOn 0
|16:45:24.435| (INFO) ATLASPixDevice: Powering up ATLASPix
[7]
[8] configure 0
|16:45:25.455| (INFO) Configuring ATLASPixDevice with default configuration
sending default TDACs
|16:45:25.754| (INFO) Setting registers from configuration:
[9]
[10]
[11]
[12] powerStatusLog 0
|16:45:25.758| (INFO) ATLASPixDevice power status:
|16:45:25.758| (INFO) VDDD:
|16:45:25.758| (INFO) Bus voltage: 1.855V
|16:45:25.759| (INFO) Bus current: 0.029238A
|16:45:25.761| (INFO) VDDA:
|16:45:25.761| (INFO) Bus voltage: 1.8225V
|16:45:25.762| (INFO) Bus current: 0.0805112A
|16:45:25.763| (INFO) VSSA:
|16:45:25.763| (INFO) Bus voltage: 1.17375V
|16:45:25.764| (INFO) Bus current: 0.0294821A
|16:45:25.765| (INFO) VDDRam:
|16:45:25.765| (INFO) Bus voltage: 1.88375V
|16:45:25.766| (INFO) Bus current: 0A
|16:45:25.767| (INFO) VCC25:
|16:45:25.768| (INFO) Bus voltage: 2.5075V
|16:45:25.768| (INFO) Bus current: 0.0299704A
|16:45:25.769| (INFO) VDDHigh:
|16:45:25.770| (INFO) Bus voltage: 1.86V
|16:45:25.771| (INFO) Bus current: 0.0194716A
Any commands usable interactively can be added to this file to define the initial sequence of commands at startup.
The commands available in the pearycli are divided in two categories:
- Peary commands : commands to be implemented by each devices, not specific to the ASIC under study
- ATLASPix commands : commands specific to the ATLASPix, defined in the ATLASPix code
The next sections will detail each of these commands and their purposes
Peary commands
-
add_device <device type>
: Adds a new device to the device known by pearycli.<device type>
can be one of the devices known to the Peary software. For ATLASPix, the device type is ATLASPix -
configure <ID>
: Program the ATLASPix with ID<ID>
with the default configuration -
daqStart <ID>
: Start data acquisition on the device with ID<ID>
-
daqStop <ID>
: Stop data acquisition on the device with ID<ID>
-
exit
: Exit the pearycli -
help
: Print a list of available commands -
list_commands <ID>
: List the device specifics commands for device with ID<ID>
-
list_devices
: List registered devices -
powerOff <ID>
: Power off the LV for device with ID<ID>
-
powerOn <ID>
: Power on the LV for device with ID<ID>
-
quit
: Exit the pearycli -
reset <ID>
: Reset of the system. Reset CaR board components plus perform device specific resets -
setBias <bias> <value> <ID>
: Set bias voltage for the bias defined by the name<bias>
at value<value>
for ID<ID>
. For ATLASPix, the main biases are :VDDD,VDDA,VSSA,VDDRAM,VDDHigh,BLPix,ThPix,VMinus,GNDACPix
-
setRegister <register name> <value> <ID>
: Set the value of a register identified by name<register name>
to value<value>
for chip with ID<ID>
. This register can be a chip, FPGA or Software register. -
verbosity <LEVEL>
: Set the pearycli verbosity level to<LEVEL>
. Available levels are : INFO,DEBUG,WARNING -
version <ID>
: Returns the FW and SW version for device with ID<ID>
ATLASPix specific commands
-
setOutputDirectory <directory path> <ID>
: Set the directory where all data and configuration files will be saved -
SetMatrix <type> <ID>
: Required after add_device. Tells the ATLASPix software which ATLASPix Matrix is wirebonded on the PCB. Choices are : M1,M1ISO,M2. Mostly M1 is used. -
setOutput <type> <ID>
: Set the type of data output used when starting data acquisition. Choices are : test or binary -
LoadConfig <config file path> <ID>
: Load the register value from the config file specified and write the values to the ATLASPix chip -
WriteConfig <config file suffix>
: Write the current configuration of the ATLASPix and DAQ to a config file in the output directory specified by the setOutputDirectory command. The suffix is provided by the command and two files are written two disk : suffix.cfg containing registers values, suffix_TDAC.cfg containing trim DAC and mask values for each pixels. -
powerStatusLog <ID>
: Outputs on screen the power consumption of the ATLASPix board -
lock <ID>
: Configure the ATLASPix to locked mode. All matrix functionality are shut down and power consumption is reduced to minimum. -
unlock <ID>
: Configure the ATLASPix to unlocked mode.Matrix functionality are turned on and chip is fully functional - 'LoadTDAC ' : Load into the matrix TDAC registers the TDAC and Mask values written in the TDAC file
-
setAllTDAC <value> <ID>
: Set all pixel TDAC registers to value. -
FindHotPixels <frequency> <ID>
: DAQ must be stopped when using this command. The command will perform a one second data acquisition, count the firing rate of the pixels that fires and mask the pixels with a rate higher that frequency (in Hz) -
MaskPixel <column> <row> <ID>
: Mask the pixel (col,row) - 'ReapplyMask ' : Re-apply the mask to all the pixel masked. To be used after setAllTDAC, for example, that erase the mask registers from the pixels
-
MaskColumn <column> <ID>
: Mask a whole column of the MAtrix -
setThreshold <threshold value> <ID>
: Set the threshold of the matrix, in V. Keep in mind the threshold has to be larger than bias BLPix, the amplifier baseline (default value 0.8V). Therefore, setting a threshold of 0.875V corresponds to a threshold of th = (ThPix - BLPix) = 0.875-0.8 = 0.075V. A typical operation threshold is 0.9V. -
setVMinus <value> <ID>
: Set the VMinusPD bias voltage (typical 0.65V). The VMinusPD voltage set the strength of the output stage of the pixel discriminator. Too low value lead to cross-talk and noise. Too high value prevent the output stage from working. To be adjusted device per device , if necessary. -
SetPixelInjection <column> <row> <amplifier output state> <discriminator output state> <injection> <ID>
: Set the output and injection register for pixel (col,row). The first bit, amplifier output state,when set to 1, route the output of the amplifier for pixel (col,row) to the lemo on PCB (only for column 0, unused for others). The second bit, discriminator output state, when set to 1, routes the discriminator output of the selected column to the lemo on PCB. The third bit, injection, activate the injection from pulser in the selected row when set to 1. -
SetInjectionOff <ID>
: Set all injection bit for all row to 0 -
pulse <number of pulse> <number of clock cycle low> <number of clock cycle high> <pulse height> <ID>
: Sends a number of pulses with a given amplitude to the ATLASPix. The time the pulser is low (0V) and high (pulse height) is set by providing the duration in number of clock cycle for each state. The clock period is 12.5ns unless otherwise notified. This command is also used to program the pulser when using he trigger_injection register to send pulses each time a trigger is received. -
doSCurvesPixel <column> <row> <vmin> <vmax> <npulses> <npoints> <ID>
: Perform a SCurve measurement on pixel (col,row) from vmin to vmax V with npulses pulses per pulse height, for npoints pulse heights. -
doSCurves <vmin> <vmax> <npulses> <npoints> <ID>
: Perform a SCurve measurement on all pixels from vmin to vmax V with npulses pulses per pulse height, for npoints pulse heights. -
MeasureTOT <vmin> <vmax> <npulses> <npoints> <ID>
: Perform a measurement of average TOT vs pulse height on all pixels from vmin to vmax V with npulses pulses per pulse height, for npoints pulse heights. -
VerifyTuning<vmin> <vmax> <npulses> <npoints> <ID>
: After loading a TDAC map, perform SCurves of all pixels to measure the threshold dispertion. Write a file named SCurve_TDAC_verification.txt containing the SCurves data. -
NoiseRun <time> <ID>
: Perform a data acquisition for X seconds. -
TDACScan <VNDAC> <vmin> <vmax> <npulses> <npoints> <ID>
: Perform a Scurve measurements on all pixels, for a given VNDAC, for all TDAC values (0 to 7). Files containing the SCurve data, names SCurves_VNDACX_TDACX.txt are saved to disk. -
getTriggerCount <ID>
: Print on screen the number of trigger received and accepted by the DAQ -
MonitorPower <ID>
: Starts a thread where power consumption of the ATLASPix is read and written to file every minute -
StopMonitorPower <ID>
: Stop the MonitorPower thread. -
resetFIFO <ID>
: reset the FIFO holding the ATLASPix data.