SDC (Scalable Detector Control)
Introduction
SDC Will be soon Updated to v.2
SDC (Scalable Detector Control ) was introduced on November 2010 for the remote control of the SRS (Scalable Readout System). It was developed in order to replace the existing way of initializing the readout electronics of Micromegas Chambers which was through the Xilinx Chip Scop Pro Analyzer which was connected through
DLC9G USB interface. The need of that came from the decision to install test chambers in ATLAS cavern on which only the remote, through ethernet, solution seemed to let us continue. The interface communicates with UDP protocol packets with the FEC cards. The basic idea is that the communication is established to a specific IP address or a range of IP addresses and to different ports. Each port is identical for a kind of peripheral.
Packet Design
Each value on a packet has 32bits and is starting with the request ID which is the number that the FEC card will respond in order to provide information about the success or not of the command.
SDC and QT
The final decision to develop such a tool to Qt came from two main reasons:
- Cross Platform application
- Need of a UI
Both of them are satisfied in Qt. The final application is really working stably on MAC OS X, Ubuntu, SLC 5 and should also work (although not tested) on Windows giving a very good flexibility.
Initialization Sequence
In order to succeed a full initialization the steps that needs to be followed are:
- Check first the connection label if it's true. If false press connect. If true connection is not succeed means that port 6007 is occupied by another program on your PC.
- Select ADC card from choose peripheral and press Configure. Press Apply and then Send button on the right of the panel (not send all). The utility start automatically on ADC pre-selected.
- Select APV Hybrid and then follow the same: Apply->Send. (sometimes after this step is good to give a Hybrid Reset command)
- Select APV Application and then the same: Apply->Send.
- Select PLL and the same: Apply-> Send.
You can close the windows after pressed Apply and before pressing Send. You should be now fully initialized. Keep in mind that every peripheral widget is opening with the default values.
Main Interface
Opening the application someone gets the following image. The UI is divided in two large areas: the sending area and the Reply area. The first one is subdivided into
other which will be explained in the following sections. At the starting point the app is trying to open the connection from the local PC which means that is checking if the
port 6007 (which is the listener port also). This step is very important. If this port is occupied by another application the communication with the FEC card is impossible
because the source port of the UDP packets should be this one. In addition an error is occurred. If you want manually to open the connection press the connect button
on the top left side and the label should be turn to TRUE indicating a successful occupy of that port. False is the alternative response. Is IMPORTANT to keep in mind that
since the communication is done through UDP protocol means that no actual connection is establishing and only a virtual one. Also the IP of the FEC should be configured at this
point because the default one is preconfigured for the need of FEC card installed on ATLAS Cavern.
FEC Properties
At this area the FEC properties are configured. First the IP address and after that the "virtual" communication. After that there is the area of peripherals which is easily expandable
for future purposes and the configure button that will be described later. There are also the "Recipe File" field and the reset commands for the FEC
FEC Resets
This field is a very expert field and that's why you will be asked to agree if you really know what command you are about to send. If you agree in the popup window the resets
area will be enabled and you will be able to send a command. After that the area is disabled again to avoid multiple sending. The available commands are:
- Warm Initialization which is a soft reset on FEC
- Force Reboot which is a hard reboot command in case of troubles.
Recipe Files
On this field someone can load a Recipe file and send the full initialization to FEC. The file must have been created with this tool otherwise for security reasons the tool
won't let you load it. You will get a message in case of successful load. The file must have a structure with:
- First the ADC Port and identifier 1 which are 16bit each and then the full packet for this peripheral.
- Second the APV Hybrid Port and identifier 2 which are 16bit each and then the full packet for this peripheral.
- Thirdly the APV Application Port and identifier 3 which are 16bit each and then the full packet for this peripheral.
- Finally the PLL Port and identifier 4 which are 16bit each and then the full packet for this peripheral.
Like that there is easily the ability to create new coming chips without loosing the existing files. To create a Recipe file someone has to follow the initialization sequence described above but instead of sending should press the save to file button on each configuration panel. Once you successfully load a Recipe file you can easily load each peripheral values
by clicking the Load from file on each configuration window. You can easily also replace the data for the specific peripheral also by saving each configuration to the same file.
Peripheral Configuration
Pressing the configure button a new widget will open depending your selection on the left Peripheral selection Radio Button. If you have already loaded a Recipe file the data on
the file are already available if you press load from file button. In different case a popup window will warn you that no file is loaded and if you want you can load one already created
before.
ADCCARD registers (port 6519)
Here are the addresses and the default values for the ADC Card:
Name |
Address(hex) |
Value(hex) |
BCLK_ENABLE |
06 |
xFF |
HYBRID_RST_N |
00 |
xFF |
PWRDOWN_CH0 |
01 |
x00 |
PWRDOWN_CH1 |
02 |
x00 |
EQ_LEVEL_0 |
03 |
x00 |
EQ_LEVEL_1 |
04 |
x00 |
TRGOUT_ENABLE |
05 |
x00 |
APV Hybrid registers (port 6263)
These are the addresses and default values for APV Hybrids:
Name |
Address |
Value(hex) |
CSEL |
0011101x |
b11110111 |
MODE |
0000001x |
b00011001 |
LATENCY |
0000010x |
128 |
MUXGAIN |
0000011x |
b00000100 |
IPRE |
0010000x |
98 |
IPCASC |
0010001x |
52 |
IPSF |
0010010x |
34 |
ISHA |
0010011x |
34 |
ISSF |
0010100x |
34 |
IPSP |
0010101x |
55 |
IMUXIN |
0010110x |
16 |
ICAL |
0011000x |
100 |
VPSP |
0011011x |
40 |
VFS |
0011010x |
60 |
VFP |
0011001x |
30 |
CDRV |
0011100x |
b11101111 |
- Sometimes is useful to send a reset command after sending initialization of this.
The MODE address is one of the very useful and the values that are used are described in the following table.
APV MODE Values:
Bit Number |
Function |
Value(0) |
Value(1) |
0 |
Analogue Bias |
OFF |
ON |
7 |
Not used |
- |
- |
6 |
Not used |
- |
- |
5 |
Preamp Polarity |
Non-Inverting |
Inverting |
4 |
Read-out Frequency |
20MHz |
40MHz |
3 |
Read-out Mode |
Deconvolution |
Peak |
2 |
Calibration Inhibit |
OFF |
ON |
1 |
Trigger Mode |
3-sample |
1-sample |
APV Applications registers (port 6039)
These are the addresses and default values for APV Applications :
Name |
Address(hex) |
Value(hex) |
EVBLD_EVENTINFODATA |
0C |
hAABB0BB8 |
BCLK_MODE |
00 |
b00000111 |
BCLK_TRGBURST |
01 |
4 |
BCLK_FREQ |
02 |
4000 |
BCLK_TRGDELAY |
03 |
256 |
BCLK_TPDELAY |
04 |
128 |
BCLK_ROSYNC |
05 |
300 |
EVBLD_CHMASK |
08 |
hffff |
EVBLD_DATALENGTH |
09 |
3000 |
EVBLD_MODE |
0A |
0 |
EVBLD_EVENTINFOTYPE |
0B |
0 |
BCLK_TRGBURST: controls how many time slots the APV chip is reading from its memory. The formula is (n + 1) x 3. Setting this to 4 means a number of 15 time slots. The maximum is 30 time slots (n = 9).
BCLK_TRGDELAY: The FPGA delays the trigger for this number of clock-cycles (25ns) until propagating it to the chip. The global latency of the trigger is the difference between APV_LATENCY and BCLK_TRGDELAY.
BCLK_FREQ: When trigger source is set to external, this parameter controls the deadtime introduced by the FPGA. After accepting a trigger, the FPGA will ignore all triggers incoming for Bclk_freq x 64 x 25ns time. 40000 means 1ms. This time should not be lower than the total acquisition time of one event which is about 222 us (with default parameters). When the trigger source is set to internal, this parameter controls the repetition rate of the internal generated trigger.
The BCLK_MODE address is one of the very useful and the values that are used are described in the following table.
BCLK_MODE Values:
Bit Number |
Function |
Value(0) |
Value(1) |
0 |
APV Reset |
disabled |
enabled |
7 |
Not used |
- |
- |
6 |
Not used |
- |
- |
5 |
Not used |
- |
- |
4 |
Not used |
- |
- |
3 |
TRGIN polarity |
NIM |
Inverse NIM |
2 |
TRIGGER mode |
Continuous loop |
Controlled by TRGIN |
1 |
APV Test Pulse |
disabled |
enabled |
PLL registers (port 6263)
These are the addresses and default values for PLL :
Name |
Address(hex) |
Value |
TRG_DELAY |
03 |
0 |
CSR1_FINEDELAY |
01 |
b00010000 |
Configurations
In these field someone can configure first the command type of sending. There are options to send packets for Master/Slave APV or Both of them as to define which of the
channels (HDMI) you want to initialize. Keep in mind that this has to do with the kind of the peripheral you are using. The app by default changes this option when you do through
peripherals. All channels are preselected bey default.
Note down that there is no problem to select a channel that has no connection.
Write/Read Mode
This has to do with the type of initialization. Write Pairs is preselected. Pairs means that the initialization is done by defining the address and value you are writing. Burst means
you specify first the address and then all values the you want to write which correspond to coming addresses. The same philosophy is applied on Read commands.
Trigger
This is a shortcut to BCLK_MODE APV Application described above and you can easily change the trigger control.
Acquisition
From here you can start or stop the Data Acquisition. Keep in mind that the FEC boots with ACQ OFF.
Hybrid Resets
This is a reset commend, useful after APV Hybrid configuration/initialization.
Sending Packets
In this area someone can send commands from the Peripheral configuration recently made. There is also a counter with a unique Request ID to which the FEC
will respond with the success of the command.
Reply Screen & Formats
In this are you are getting important messages. If there is nothing here after you send a packet means that there is no communication with the FEC card. Normally the FEC
card will respond to every request you make including an echoing of the Request ID and then a set of Errors which will be equal to Zero in case of success and different in case
of error occurred. This form is also used if you want to read already configured values from a peripheral.
OS requirements
The requirements to run the tool is the Qt Libraries 4.7 and above which is easily downloadable from
Qt Download Center
Version and changes
v1.4.2
- Fixed Bug on .txt files on SL5, possible to load every type now.
- By default loading configuration file if present.
- Fixed bug on Send all command on configuration file.
v1.4.1
- Added the saving logs functionality
- Added more security on sending commands
- Added appending replies to Reply form
v1.4
- Added Recipe files functionality
- Fixed ui minor bugs
- Added Help link on the top that redirects through the web browser to this page.
- Added Reset functions for the FEC itself.
v1.3
Developers and Credits
- George Iakovidis
- Konstantinos Karakostas
NTUA Group in collaboration with Brookhaven Laboratory
Download
Source Code
Example Configuration File
Linux
Ubuntu and SLC5 verified
MAC OS X
10.6.5 and above verified (although should work in every release of Snow Leopard 10.6.x or Leopard 10.5.x)
Windows
Future Plans
- Include Broadcasting packets
- IP Ranges initialization for larger applications.
- Save logs to file if needed
- more...
Major updates:
--
GeorgeIakovidis - 08-Apr-2011
Responsible:
GeorgeIakovidis
Subject: detector
Last reviewed by:
Never reviewed