User Tools

Site Tools


itk:fei4b

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
itk:fei4b [2016/03/01 20:50]
rwang [Data analysis]
itk:fei4b [2017/01/12 19:12] (current)
asc
Line 1: Line 1:
 ======  ITK module testing ====== ======  ITK module testing ======
  
 +This wiki describes UsbPix teststand.
 +Alternatively, consider using RCE, HSIO setup (see a collection of links in [[https://twiki.cern.ch/twiki/bin/view/Main/IFAEPixel|this page]]. 
  
 ===== Setup documentation ===== ===== Setup documentation =====
- 
- 
  
 [[http://icwiki.physik.uni-bonn.de/twiki/bin/view/Systems/UsbPix|UsbPix setup]] [[http://icwiki.physik.uni-bonn.de/twiki/bin/view/Systems/UsbPix|UsbPix setup]]
Line 15: Line 15:
 Afterwards, you can configure the FPGA, connect FE-I4B and run a digital scan. Afterwards, you can configure the FPGA, connect FE-I4B and run a digital scan.
  
-==== Ubuntu instructions ==== 
  
-Prepare for USB3 connections: 
-<code> 
-sudo apt-get install python-pip 
-apt-get install git 
-pip install git+https://github.com/walac/pyusb.git@master#egg=pyusb 
-pip install pySiLibUSB 
-</code> 
  
- 
-===== CentOS7 instruction ===== 
- 
- 
- 
- 
-<code bash> 
-rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 
-yum -y update 
-yum -y install python-pip 
-pip install --upgrade pip 
-yum install libgusb libusbx libusb-devel  
-yum install libudev-devel 
-yum install libgudev1 libgudev1-devel python-pyudev 
-sudo pip install pyusb 
-tar -jvxf libusb-1.0.20.tar.bz2; cd libusb; ./configure; make; make install; 
-pip install pySiLibUSB 
-# get Anaconda2-2.4.1-Linux-x86_64.sh 
-./Anaconda2-2.4.1-Linux-x86_64.sh  # say yes to all 
-# get  ViTables-develop_py27.zip 
-unzip ViTables-develop_py27.zip 
-cd ViTables-develop/ 
-python setup.py install 
-# get from github 
-unzip pyusb-master.zip # from github 
-cd pyusb-master/ 
-python setup.py install 
-# get master pyBar 
-cd pyBAR-master 
-python setup.py install 
-</code> 
- 
- 
-Run this code: 
- 
-<code python> 
-import SiLibUSB 
-sidev = SiLibUSB.SiUSBDevice() 
-print "FWVersion: ", sidev.GetFWVersion() 
-</code> 
  
 ===== Windows 7 instruction ===== ===== Windows 7 instruction =====
Line 76: Line 28:
   - Download Java Runtime Environment 8 (32 bits, to be consistent with Eclipse) from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html   - Download Java Runtime Environment 8 (32 bits, to be consistent with Eclipse) from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
   - Download Eclipse with PyDev (32-bit Eclipse IDE for C/C++ Developers) from http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/mars1   - Download Eclipse with PyDev (32-bit Eclipse IDE for C/C++ Developers) from http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/mars1
-  - Download git+  - Download git https://git-scm.com/download/win
   - Download vivoda Lab Edition from http://www.xilinx.com/support/download.html (registration needed)   - Download vivoda Lab Edition from http://www.xilinx.com/support/download.html (registration needed)
   - Download unzip from http://gnuwin32.sourceforge.net/packages/unzip.htm, place under pyBAR/test   - Download unzip from http://gnuwin32.sourceforge.net/packages/unzip.htm, place under pyBAR/test
Line 82: Line 34:
 ====Install usb3.0==== ====Install usb3.0====
 Follow the steps in https://github.com/SiLab-Bonn/pySiLibUSB/wiki to install the usb3.0 in windows 7 Follow the steps in https://github.com/SiLab-Bonn/pySiLibUSB/wiki to install the usb3.0 in windows 7
-  - make sure no driver installed for the cypress usb3.0+  - make sure no driver installed for the cypress usb3.0 (on pixel1 computer). For "pixel2" computer, we use "renesanse" external PCI-I card.
   - in Device manager looking in the "other device"->"FX3"(the one appeared when mmc3 board is connected)   - in Device manager looking in the "other device"->"FX3"(the one appeared when mmc3 board is connected)
-  - install the cypress kit from http://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit?source=search&cat=software_tools+  - install the cypress kit from [[http://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit?source=search&cat=software_tools]]. Note that renaissance PCI-E USB3 card will be normally recognized by Windows 10 using some internal driver from "system32" directory. You should update it with Cypress driver ("cyusb"). Then start Cypus control center and check "Program->FX3".  
 +  - If you use Windows 10, use these dedicated drives [[http://www.cypress.com/knowledge-base-article/drivers-ez-usb-fx1-and-fx2lp-kba94413?source=search&keywords=94413]]
   - right click on the "FX3", FX3->update diver->browse my computer of local software->C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin\win7\x64   - right click on the "FX3", FX3->update diver->browse my computer of local software->C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin\win7\x64
   - Ordered List Itemopen the control center, the "Cypress FX3 USB BootLoader Device" will appear {{:itk:cypress.png?200|}}   - Ordered List Itemopen the control center, the "Cypress FX3 USB BootLoader Device" will appear {{:itk:cypress.png?200|}}
-  - Ordered List Itemupload the .img file "SILABFX3" for the USB3.0 in C:\ITK\backup using control center. Select the "cypress FX3 USB BootLoader Device"->Program->FX3->RAM +  - Ordered List Itemupload the .img file "SILABFX3" for the USB3.0 in C:\ITK\backup using control center. Select the "cypress FX3 USB BootLoader Device"->Program->FX3->RAM. Fot pixel2 computer (Windows10), use the directory "PyBarSetup" on desktop. 
-  - **Not Need** use Zadig to reinstall FX3 device +  - use Zadig to reinstall FX3 device 
-  - reboot PC +  - the USB devices "FX3" should show up in the Device manager 
-  - select "FX3", the USB ID should be 5312 0300+  - select "FX3" in Zadig, the USB ID should be 5312 0300
   - install driver WinUSB(v6.1.7600.16385)   - install driver WinUSB(v6.1.7600.16385)
   - download libusb 1.0.20 from http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.20/libusb-1.0.20.7z/download   - download libusb 1.0.20 from http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.20/libusb-1.0.20.7z/download
Line 99: Line 52:
  
 ==Install basil mio3== ==Install basil mio3==
-change "basil" in line 74 to "basil_daq"+change "basil" in line 74 to "basil_daq"
 +You will need the branch "mio3" from github. Download the file "basil-mio3.zip", go to "host" directory and install as "python setup.py install". It will be copied somewhere in Miniconda directory. 
 +If you will use wrong basil, when running "python scan_analog.py", you will get a complain about "FPGA" and "basil"
  
 Download pySiLibUSB from https://github.com/SiLab-Bonn/pySiLibUSB. Download pySiLibUSB from https://github.com/SiLab-Bonn/pySiLibUSB.
Line 135: Line 91:
  
  
-====Data analysis====+=====Data analysis=====
 by default the raw data are converted and stored inform of HDF5 file. by default the raw data are converted and stored inform of HDF5 file.
 The .h5 file can be opened using: The .h5 file can be opened using:
Line 141: Line 97:
 vitables 56_module_test_digital_scan_fe1.h5  vitables 56_module_test_digital_scan_fe1.h5 
 </code> </code>
-===Data structure=== +====Data structure==== 
-==Raw data==+===Raw data===
 The raw data contains all FE words + FPGA trigger words + FPGA TDC words in an one dimensional array. The raw data contains all FE words + FPGA trigger words + FPGA TDC words in an one dimensional array.
 Every word is a 32-bit unsigned int. The format is: 82444303 = **0** 000 __0100__ 1110 1010 0000 0000 0000 1111 Every word is a 32-bit unsigned int. The format is: 82444303 = **0** 000 __0100__ 1110 1010 0000 0000 0000 1111
Line 148: Line 104:
  {{:itk:vitable.png?200|}}  {{:itk:vitable.png?200|}}
  
-If the first bold bit is 1 the word is a trigger word followed by a trigger number. If it is 0 the following bits indicate the FE number. This number is usually 5 when you use the single chip adapter card. With other adapter cards (e.g. burn-in card) this number identifies the different FE connected to it. The remaining 24-bits hold the FE word. For more information (e.g. TDC word) please look here.+If the first bold bit is 1 the word is a trigger word followed by a trigger number. If it is 0 the following bits indicate the FE number. This number is usually 5 when you use the single chip adapter card. With other adapter cards (e.g. burn-in card) this number identifies the different FE connected to it. The remaining 24-bits hold the FE word. For more information (e.g. TDC word) please look [[https://github.com/SiLab-Bonn/pyBAR/blob/master/pybar/analysis/RawDataConverter/defines.h]].
 ==Meta data== ==Meta data==
 The meta data stores read out related infos:One row is added for every read out. It contains the word index at the first / last+1 word of the read out and the total numbers of words. To allow time based analysis it also has a timestamp and an error code indicating read out errors (like out of sync). The error code is not used so far. The meta data stores read out related infos:One row is added for every read out. It contains the word index at the first / last+1 word of the read out and the total numbers of words. To allow time based analysis it also has a timestamp and an error code indicating read out errors (like out of sync). The error code is not used so far.
Line 160: Line 116:
 ==Parameter Data== ==Parameter Data==
 In the parameter table the parameters that are changed during a scan is monitored (e.g. PlsrDAC setting during a threshold scan). At every readout the acutal parameter settings is added to the table. One column is reserved for one parameter. In the parameter table the parameters that are changed during a scan is monitored (e.g. PlsrDAC setting during a threshold scan). At every readout the acutal parameter settings is added to the table. One column is reserved for one parameter.
 + 
 +===Interpreted Data File===
 +The raw data is interpreted, analysed and plotted with the raw data converter class. The output HDF5 file can hold hit data, cluster data, meta data and histograms at different HDF5 notes.
 +
 +==Hit data==
 +The hit data table stores the information for every hit.
 +
 +{{:itk:vitable_hits.png?200|}}
 +
 +The columns are:
 +  * Unordered List Itemevent_number: The absolute event number. Only events with hits appear here.
 +  * trigger_number: The TLU trigger number. If no TLU is used the trigger number is always 0.
 +  * relative_BCID: The relative BCID is the number of data headers of one event when the hit occured.
 +  * LVL1ID: The LVL1ID is the internal LVL1 trigger counter value of the FE.
 +  * column: the column position of the hit
 +  * row: the row position of the hit
 +  * tot: the tot code of the hit
 +  * BCID: the absolute BCID value
 +  * TDC: the TDC value. If TDC was not used this values is always 0.
 +  * TDC_time_stamp: the TDC time stamp value. If not used it is always 255.
 +  * trigger_status: the trigger status of the event where the hit occured. The trigger status error code is a sum of the different binary coded trigger error codes that occured during the event. Please take a look at the histogram section for the error code explanation.
 +  * service_record: the service records that occured in the event of the hit. The service record code is a sum of the different binary coded service records that occured during the event.
 +  * event_status: the status of the event of the hit. The event error code is a sum of the different binary coded event error codes that occured during the event. Please take a look at the histogram section for the error code explanation.
 +
 +===Clustered Data===
 +
 +Clustered data is usually stored as additional nodes in the analyzed data file or in a new file. The nodes are cluster hits, cluster or histograms.
 +
 +==Cluster hits==
 +{{:itk:vitable_clusterhit.png?200|}}
 +
 +The table ClusterHits is a copy of the Hits table (see above) but with four additional columns:
 +  * cluster_id: The cluster ID of the hit [0:number of cluster in the event]
 +  * is_seed: Is one if the hit is the seed hit, otherwise 0.
 +  * cluster_size: The size of the cluster the hit belongs to.
 +  * n_cluster: The number of cluster of the event the hit belongs to.
 +
 +==Cluster==
 +The table Cluster stores the infos for each cluster.
 +
 +{{:itk:vitable_cluster.png?200|}}
 +
 +The columns are:
 +  * event_number: The absolute event number. Only events with cluster appear here.
 +  * id: The cluster ID of the cluster [0:number of cluster in the event].
 +  * size: The number of hits that belong to the cluster.
 +  * tot: The tot sum of all hits.
 +  * charge: The charge sum of all hits (not used yet).
 +  * seed_column: The column of the seed pixel.
 +  * seed_row: The row of the seed pixel.
 +  * event_status: The status of the event of the cluster. The event error code is a sum of the different binary coded event error codes that occured during the event. Please take a look at the histogram section for the error code explanation.
 +
 + 
 +====Simple data convertion====
 +pyBAR provide few scripts under pybar/scan for raw data analysis.
 +<code>
 +python analyze_example_conversion.py (on windows 7)
 +</code>
 +(Remember to change the file name in the script to the raw HDF5 file you would like to analysis)
 +
 +The converted raw data then stored as interpreted HDF5 file. It can be converted to root file using:
 +<code>
 +python convert_table_root_tree.py (on ATLAS cluster)
 +</code>
 +(Remember to change the file name in the script to the interpreted HDF5 file you would like to convert)
 ====== After computer shutdown ====== ====== After computer shutdown ======
 FX3 and FPGA firmware that you are uploading is not permanently stored on the board. Instruction from Viacheslav Filimonov: FX3 and FPGA firmware that you are uploading is not permanently stored on the board. Instruction from Viacheslav Filimonov:
Line 171: Line 192:
  
 ======Data analysis====== ======Data analysis======
 +
 +
 + --- //[[[email protected]|Sergei Chekanov]] 2016/01/02 03:17//
 + --- //[[[email protected]|Rui Wang]] 2016/03/02 02:27//
itk/fei4b.1456865443.txt.gz · Last modified: 2016/03/01 20:50 by rwang