From dc1752ece277963f98fb96800a07c1dd8208612e Mon Sep 17 00:00:00 2001 From: Andreas Kopmann Date: Tue, 31 Jul 2012 23:57:04 +0200 Subject: Initial version of the UFO camera users manual --- admin.tex | 86 +++ appendix.tex | 40 ++ camera-manual-v1208.tex | 112 ++++ devel.tex | 73 +++ images/.DS_Store | Bin 0 -> 6148 bytes images/Figure_2.png | Bin 0 -> 776539 bytes images/Figure_3.png | Bin 0 -> 59791 bytes images/Figure_3_2.png | Bin 0 -> 118049 bytes images/Figure_3_3.png | Bin 0 -> 131998 bytes images/Figure_3_4.png | Bin 0 -> 121816 bytes images/Figure_3_5.png | Bin 0 -> 134325 bytes images/Fiji_select_frame.png | Bin 0 -> 20356 bytes images/Fiji_set_param.png | Bin 0 -> 18391 bytes images/Ufo_cam.png | Bin 0 -> 1402657 bytes images/camera_char1.png | Bin 0 -> 142937 bytes images/kit-logo.jpg | Bin 0 -> 26079 bytes images/kit_logo.png | Bin 0 -> 14632 bytes images/pic_LEDs.png | Bin 0 -> 2761038 bytes images/pixel_map.png | Bin 0 -> 25064 bytes images/regs | 116 ++++ images/software_layer.png | Bin 0 -> 97225 bytes images/software_layer2.png | Bin 0 -> 101601 bytes images/software_layer3.png | Bin 0 -> 110496 bytes images/ufo_gui2.png | Bin 0 -> 649827 bytes images/ufo_gui_piecewise_bar.png | Bin 0 -> 27735 bytes images/ufo_gui_temp.png | Bin 0 -> 15118 bytes ufo.bib | 94 ++++ user.tex | 1145 ++++++++++++++++++++++++++++++++++++++ 28 files changed, 1666 insertions(+) create mode 100644 admin.tex create mode 100644 appendix.tex create mode 100644 camera-manual-v1208.tex create mode 100644 devel.tex create mode 100644 images/.DS_Store create mode 100644 images/Figure_2.png create mode 100644 images/Figure_3.png create mode 100644 images/Figure_3_2.png create mode 100644 images/Figure_3_3.png create mode 100644 images/Figure_3_4.png create mode 100644 images/Figure_3_5.png create mode 100644 images/Fiji_select_frame.png create mode 100644 images/Fiji_set_param.png create mode 100644 images/Ufo_cam.png create mode 100644 images/camera_char1.png create mode 100644 images/kit-logo.jpg create mode 100644 images/kit_logo.png create mode 100644 images/pic_LEDs.png create mode 100644 images/pixel_map.png create mode 100644 images/regs create mode 100644 images/software_layer.png create mode 100644 images/software_layer2.png create mode 100644 images/software_layer3.png create mode 100644 images/ufo_gui2.png create mode 100644 images/ufo_gui_piecewise_bar.png create mode 100644 images/ufo_gui_temp.png create mode 100644 ufo.bib create mode 100644 user.tex diff --git a/admin.tex b/admin.tex new file mode 100644 index 0000000..51ce433 --- /dev/null +++ b/admin.tex @@ -0,0 +1,86 @@ +% UFO camera admin manual +% + +\chapter{Administration manual} + +The UFO camera consists of: +\begin{itemize} +\item Image sensor module +\item Camera controller board, including power supply, passive PCI backplane +\item PCI Express extender with client and host modules +\item Pci-tool package +\item Camera decoding package +\item High-speed storage library +\item Universal camera access library +\end{itemize} + +\section{Prerequisites, Requirements} + +Interface for lenses is C-mount. + +Software packages + + +\section{Connecting the hardware, Power, Computer interface} + +% TODO Describe the hardware setup + + +\section{Installation of the camera drivers and tools} + +The software needs to be installed in the order libufodecode, fastwriter, pcitool and libuca. The major dependencies are: +\begin{itemize} +\item GNU C compiler with glibc and other mayor system libraries +\item The Linux kernel development files +\item XFS development files +\item glib2 library +\end{itemize} + + +\subsection{Camera format decoder -- libufdecode} +\begin{verbatim} +cmake . +make +make install +\end{verbatim} + + +In case of problems it is possible to disable SSE support, in this case cmake should be run with \verb/HAVE_SSE=OFF/ parameter +\begin{verbatim} +cmake -D "HAVE_SSE=OFF" . +\end{verbatim} + + +\subsection{Camera format decoder -- libufdecode} +\begin{verbatim} +cmake . +make +make install +\end{verbatim} + + +\subsection{Camera driver -- pcitool} +The building of pcitool consists of 3 steps. The pcitool userspace may be simply installed with cmake as other applications. +\begin{verbatim} +cmake . +make +make install +\end{verbatim} + +To build kernel, module: +Change to the folder \verb/driver/ and adjust \verb/PCIE_IPECAMERA_DEVICE_ID/ in the file pciDriver.h if required (you may check actual device id with the tool lspci). +\begin{verbatim} +make +make install +depmod -a +modprobe pciDriver +\end{verbatim} +To autoload driver, copy \verb|misc/50-pcidriver.rules| into the \verb|/etc/udev/rules.d| directory + + + +\subsection{Universal camera layer -- libuca} + + + + diff --git a/appendix.tex b/appendix.tex new file mode 100644 index 0000000..ed1f94b --- /dev/null +++ b/appendix.tex @@ -0,0 +1,40 @@ +% Appendix to the UFO camera user manual +% + +\begin{appendix} + +\chapter{Camera characterization} +\label{camera_char} + +Camera characterization is done in IEKP using tungsten X-ray tube, and ANKA detector lab, using visible light. +Estimation of dark noise is given in \figurename~\ref{darknoise}. Camera setting for long integration time is setting the PGA value (analog gain) on address 102 to 0, which is a default value. For short integration time, PGA value is 3, which is a maximum one. Other sensor register values, unless otherwise stated, are recommended values. + +\begin{figure}[ht] +\centering +\includegraphics[width=0.70\textwidth]{images/camera_char1.png} +\caption{\label{darknoise}The total dark noise vs. integration time at different camera settings} +\end{figure} +\begin{table}[h] +\begin{center} +{\begin{tabular}{|c|c|} +\hline +Parameters & Values \\ +\hline +Quantum efficiency & 57.41 \% \\ +\hline +Dark noise $\sigma_{d}$ & 10 $e^{-}$\\ +\hline +Dynamic range & 57.22 dB \\ +\hline +Conversion factor & 7.82 $e^{-}/{DN}$ \\ +\hline +\end{tabular}} +\caption{10 bit characterization of UFO camera} +\label{char_10b} +\end{center} +\end{table} + + + +\end{appendix} + diff --git a/camera-manual-v1208.tex b/camera-manual-v1208.tex new file mode 100644 index 0000000..2f946c7 --- /dev/null +++ b/camera-manual-v1208.tex @@ -0,0 +1,112 @@ +% UFO camera manual +% A. Kopmann +% + +\documentclass[12pt,a4paper,twoside]{book} + +\parindent0mm +\parskip2ex plus1ex minus0.5ex + + +\usepackage{a4wide} +\usepackage[utf8]{inputenc} +\usepackage{graphicx} +\usepackage{longtable} +\usepackage{listings} +\usepackage[usenames]{color} +\definecolor{comment}{rgb}{1,0,0} + +\lstset{ + basicstyle=\scriptsize\ttfamily, + keywordstyle=\bfseries\ttfamily\color{orange}, + stringstyle=\color{green}\ttfamily, + commentstyle=\color{middlegray}\ttfamily, + emph={square}, + emphstyle=\color{blue}\texttt, + emph={[2]root,base}, + emphstyle={[2]\color{yac}\texttt}, + showstringspaces=false, + flexiblecolumns=false, + tabsize=8, + %numbers=left, + numberstyle=\tiny, + numberblanklines=false, + stepnumber=1, + numbersep=10pt, + xleftmargin=15pt + } + + +\begin{document} + +\begin{titlepage} +\includegraphics[width=4cm]{images/kit_logo.png} + + +\hspace{4cm} +\begin{minipage}{12cm} +\vspace{3cm} +{\LARGE\bf User manual} + +\vspace{0.2cm} +08/2012 + +\vspace{2.5cm} +{\LARGE UFO fully programmable\\[0.7ex] + high-throughput camera} + +\end{minipage} + +\vfill +\hspace{4cm} +\begin{minipage}{12cm} +\begin{description} +\item[\textnormal{Authors:}] U Stephanovic, M Caselle, M Vogelgesang, S Chilingaryan, A. Kopmann +\item[\textnormal{Project:}] UFO +\item[\textnormal{Revision:}] 31.7.2012 +\end{description} + +\vspace{3cm} +KIT -- University of the State of Baden-Württemberg and\\ +National Research Center of the Helmholtz Association +\end{minipage} +\end{titlepage} + +\tableofcontents + + +\chapter*{Introduction} + + +The manual introduces a new concept of a flexible camera platform for science. The camera platform is able +to include nearly all available image sensor. It comprises an readout module with FPGA and memory and +possesses an high-throughput interface to the camera PC. Linux drivers and applications are available. + +The manual splits in three parts basically user manual, administration manual and developers manual. + +Part 1: Overview of the system architecture, operation of the camera. + +Part 2: Installation of the camera drivers and the software tools. Update of the camera firmware. +Description of the camera characterization. + +Part 3: Overview of the firmware, drivers and software architecture, management of the source code, +Programming interfaces, instructions for analyzing and tracking bug. + +The appendix gives data sheets on the camera characteristics. + +The document refers to firmware version UFO5/12bit, pcitools-0.0.1, libuca-0.6.0. + + + +\include{user} +\include{admin} +\include{devel} +\include{appendix} + + +\bibliography{ufo}{} +\bibliographystyle{plain} + +\end{document} + + diff --git a/devel.tex b/devel.tex new file mode 100644 index 0000000..a48cce3 --- /dev/null +++ b/devel.tex @@ -0,0 +1,73 @@ +% UFO camera developers manual +% + +\chapter{Developers manual} + +\section{Hardware} + +\subsection{High-throughput architecture} + +The CMOS-image sensor receives a request for the new frame in combination with the defined exposure time. When the integration time is finished, the image stored in the pixelmatrix (global shutter) is read out sequentially, row-by-row. The pixel values are then passed to a column ADC cell, which ADC conversion is performed. Then, in 10bit/pixel configuration, the digital signals are read out over 16 parallels LVDS (low voltage differential signal) channels where each LVDS channel reads out 128 adjacent columns of the array. Control registers are used for the programming of the sensor. Overview is displayed in Figure \ref{fpga-arch}. + +\begin{figure} +\includegraphics[width=\textwidth]{images/Figure_3_5.png} +\caption{\label{fpga-arch} Readout chain and FPGA architecture.} +\end{figure} + + +In order to read out the CMOS sensor as fast as possible, a PCI Express interface is used to transfer the data arriving from the mother board directly to the computer embedded memory. A PCI Express x4 lane generation 2 standard, with a theoretical bandwidth of 20 Gbit/s, is used. The achieved bandwidth is only limited by the speed grade of the FPGA. Direct Memory Access (DMA) is used to transfer the data from the camera to the central system memory and vice versa. + +Addressable 32-bit user bank registers are implemented in the dedicated Base Address Registers (BAR) space. Bank registers are used to write/read the status/configurations of the DMA engines, the CMOSIS chip and the FPGA logic. Unused address locations of the bank can be used by further user applications. More information about the bank registers is given in chapter[[?]. The DDR (Double Data Rate) memory device is used for both temporary frame data storage before the transferring of the data and for an on-line data elaboration. + +Camera has full access of the pixel parameters in order to adapt the pixel response at any experiment condition, like adjustable image exposure time and pixel dynamic range, noise threshold, mask, analog gain, etc. Continuous data acquisition at full speed for each frame rate condition without any readout dead time is also achieved. This camera can easily be extended to any available CMOS-image sensor. + + +\subsection{Image sensor CMOSIS CMV2000} + +The CMV2000 is a high speed CMOS image sensor with 2048 by 1088 pixels (2/3 optical inch) developed for machine vision applications. The image array consists of 5.5$\mu$m x 5.5$\mu$m pipelined global shutter pixels which allow exposure during read out, while performing CDS operation. The image sensor has sixteen 10- or 12-bit digital LVDS outputs (serial). The image sensor also integrates a programmable gain amplifier and pixel threshold. Each channel runs at 480 Mbps maximum. Higher frame rates can be achieved in row-windowing mode or row-subsampling mode. These modes are all programmable using the SPI interface. All internal exposure and read out timings are generated by a programmable on-board sequencer. External triggering and exposure programming is a sensor feature which is also implemented in the camera. Extended optical dynamic range can be achieved by using piecewise feature of the sensor. + +Sensor features and characteristics: +\begin{itemize} +\item 2048 * 1088 active pixels on a 5.5$\mu$m pitch +\item Frame rate 270 frames/sec @10bit and 70 frames/s @12bit +\item row windowing capability +\item X-Y mirroring function +\item Master clocks: 5-48MHz and 50-480MHz (LVDS) +\item 16 LVDS-outputs @480MHz multiplexable to 4 at reduced frame rate +\item LVDS control line with frame and line information +\item LVDS DDR output clock to sample data on the receiving end +\item 10 bit ADC output at maximum frame rate, 12 bit ADC at reduced frame rate +\item Multiple High Dynamic Range modes supported +\item On chip temperature sensor +\item On chip timing generation +\item SPI-control +\item 3.3V signaling +\item Full well charge: 13.5Ke- +\item Dark noise: 13e- RMS +\item Dynamic range: 60 dB +\item Extended dynamic range: Piecewise linear response or interleaved read-out • Dark current: 125 e/s (@ 25C die temp) (from datasheet of the sensor) +\item Maximum power consumption: 600mW (from datasheet of the sensor) +\end{itemize} + +Please look at the CMV2000 datasheet for more information regarding the sensor, and additional CMOSIS white papers regarding recommended register settings \cite{CMOSIS:CMV2000}. Also, in section \ref{camera_char} is given the overview of the sensor characterization for several different parameters. + +\section{Software} + +The camera software splits in three parts. Interface to the camera hardware, a general camera interface library and specific decoding modules for the supported image sensors. + +\subsection{Camera driver and tools -- pcitool} + +The architecture of the software layer is presented in Figure 1.3. It includes a kernel module, an PCILIB library, command-line utility and a GUI. + +\begin{figure} +\includegraphics[width=\textwidth]{images/software_layer3.png} +\caption{\label{pcitool-arch} Software layer and data flow.} +\end{figure} + +The kernel module is kept as small as possible. It is only responsible for de- vice configuration, interrupt counting, management of DMA buffers, and mapping of both PCI I/O space and DMA buffers into the userspace. All other functions in- cluding the actual implementation of DMA engine are realized in user space. Finally, the design of the driver allows fine grained scripting. For example, it is possible to start the DMA engine, set some registers to initiate DMA transfer, read data from DMA engine, make an attempt to process it, and if the wrong data is returned, analyze the status registers to find the signature of the error. + +Scripts (using the pcitool) are used for the camera initialization, camera control, and for the main data acquisition. GUI can be used for data visualization in real time. GUI can also be used for data acquisition, but in such case, the maximum +frame rate is no more than 20 frames/s. + + + diff --git a/images/.DS_Store b/images/.DS_Store new file mode 100644 index 0000000..123f233 Binary files /dev/null and b/images/.DS_Store differ diff --git a/images/Figure_2.png b/images/Figure_2.png new file mode 100644 index 0000000..67326e8 Binary files /dev/null and b/images/Figure_2.png differ diff --git a/images/Figure_3.png b/images/Figure_3.png new file mode 100644 index 0000000..639e07f Binary files /dev/null and b/images/Figure_3.png differ diff --git a/images/Figure_3_2.png b/images/Figure_3_2.png new file mode 100644 index 0000000..5076e39 Binary files /dev/null and b/images/Figure_3_2.png differ diff --git a/images/Figure_3_3.png b/images/Figure_3_3.png new file mode 100644 index 0000000..dd5232b Binary files /dev/null and b/images/Figure_3_3.png differ diff --git a/images/Figure_3_4.png b/images/Figure_3_4.png new file mode 100644 index 0000000..61cd06b Binary files /dev/null and b/images/Figure_3_4.png differ diff --git a/images/Figure_3_5.png b/images/Figure_3_5.png new file mode 100644 index 0000000..0f40f85 Binary files /dev/null and b/images/Figure_3_5.png differ diff --git a/images/Fiji_select_frame.png b/images/Fiji_select_frame.png new file mode 100644 index 0000000..f5c1b0b Binary files /dev/null and b/images/Fiji_select_frame.png differ diff --git a/images/Fiji_set_param.png b/images/Fiji_set_param.png new file mode 100644 index 0000000..7f36d3d Binary files /dev/null and b/images/Fiji_set_param.png differ diff --git a/images/Ufo_cam.png b/images/Ufo_cam.png new file mode 100644 index 0000000..2cda82a Binary files /dev/null and b/images/Ufo_cam.png differ diff --git a/images/camera_char1.png b/images/camera_char1.png new file mode 100644 index 0000000..1603d9e Binary files /dev/null and b/images/camera_char1.png differ diff --git a/images/kit-logo.jpg b/images/kit-logo.jpg new file mode 100644 index 0000000..380542b Binary files /dev/null and b/images/kit-logo.jpg differ diff --git a/images/kit_logo.png b/images/kit_logo.png new file mode 100644 index 0000000..918955c Binary files /dev/null and b/images/kit_logo.png differ diff --git a/images/pic_LEDs.png b/images/pic_LEDs.png new file mode 100644 index 0000000..c10c088 Binary files /dev/null and b/images/pic_LEDs.png differ diff --git a/images/pixel_map.png b/images/pixel_map.png new file mode 100644 index 0000000..abecdb2 Binary files /dev/null and b/images/pixel_map.png differ diff --git a/images/regs b/images/regs new file mode 100644 index 0000000..f2ddcd9 --- /dev/null +++ b/images/regs @@ -0,0 +1,116 @@ + cmosis_number_lines = 1088 [1088] + cmosis_start1 = 0 [0] + cmosis_start2 = 0 [0] + cmosis_start3 = 0 [0] + cmosis_start4 = 0 [0] + cmosis_start5 = 0 [0] + cmosis_start6 = 0 [0] + cmosis_start7 = 0 [0] + cmosis_start8 = 0 [0] + cmosis_number_lines1 = 0 [0] + cmosis_number_lines2 = 0 [0] + cmosis_number_lines3 = 0 [0] + cmosis_number_lines4 = 0 [0] + cmosis_number_lines5 = 0 [0] + cmosis_number_lines6 = 0 [0] + cmosis_number_lines7 = 0 [0] + cmosis_number_lines8 = 0 [0] + cmosis_sub_s = 0 [0] + cmosis_sub_a = 0 [0] + cmosis_color = 1 [1] + cmosis_image_flipping = 0 [0] + cmosis_exp_flags = 0 [0] + cmosis_exp_time = 37 [1088] + cmosis_exp_step = 0 [1088] + cmosis_exp_kp1 = 2189 [1] + cmosis_exp_kp2 = 3365 [1] + cmosis_nr_slopes = 2 [1] + cmosis_exp_seq = 1 [1] + cmosis_exp_time2 = 1088 [1088] + cmosis_exp_step2 = 0 [1088] + cmosis_nr_slopes2 = 1 [1] + cmosis_exp_seq2 = 1 [1] + cmosis_number_frames = 1 [1] + cmosis_output_mode = 0 [0] + cmosis_training_pattern = 85 [85] + cmosis_channel_en = 262143 [262143] + cmosis_special_82 = 7 [7] + cmosis_vlow2 = 54 [96] + cmosis_vlow3 = 106 [96] + cmosis_offset = 16323 [16260] + cmosis_pga = 3 [0] + cmosis_adc_gain = 44 [32] + cmosis_bit_mode = 0 [1] + cmosis_adc_resolution = 0 [0] + cmosis_special_115 = 1 [1] + spi_conf_input = 0x7300 [0x0] + spi_conf_output = 0xb7301 [0x0] + spi_clk_speed = 0x4 [0x0] + firmware_info = 0x5 [0x0] + control = 0x3e1 [0x0] + status = 0x8449ffff [0x0] + status2 = 0xf001001 [0x0] + status3 = 0x3ffff111 [0x0] + fr_status = 0x0 [0x0] + start_address = 0xd8e8c0 [0x0] + end_address = 0xe179c4 [0x0] + rd_address = 0xe179c8 [0x0] + fr_param1 = 0x0 [0x0] + fr_param2 = 0x0 [0x0] + skiped_lines = 0x0 [0x0] + rawdata_pkt_addr = 0x1000 [0x0] + temperature_info = 0x14ab0483 [0x0] + num_lines = 0x440 [0x0] + start_line = 0x0 [0x0] + exp_time = 0x25 [0x0] + motor = 0x2c00000 [0x0] + write_status = 0x0 [0x0] + num_triggers = 0x0 [0x0] + trigger_period = 0x280 [0x280] + temperature_sample_period = 0x7735940 [0x0] + ddr_max_frames = 0x70 [0x64] + ddr_num_frames = 0x0 [0x0] + dma_control_and_status = 0x2008 [0x0] + dma_design_version = 0x0 [0x0] + dma_transmit_utilization = 0x0 [0x0] + dma_receive_utilization = 0x0 [0x0] + dma_mwr = 0x0 [0x0] + dma_cpld = 0x0 [0x0] + dma_init_fc_cpld = 0x0 [0x0] + dma_init_fc_cplh = 0x0 [0x0] + dma_init_fc_npd = 0x0 [0x0] + dma_init_fc_nph = 0x0 [0x0] + dma_init_fc_pd = 0x0 [0x0] + dma_init_fc_ph = 0x0 [0x0] + dma0w_engine_capabilities = 0x14000011 [0x0] + dma0w_engine_control = 0x0 [0x0] + dma0w_next_descriptor = 0x0 [0x0] + dma0w_sw_descriptor = 0x0 [0x0] + dma0w_last_descriptor = 0x0 [0x0] + dma0w_active_time = 0x7 [0x0] + dma0w_wait_time = 0x7 [0x0] + dma0w_counter = 0x3 [0x0] + dma1w_engine_capabilities = 0x14000111 [0x0] + dma1w_engine_control = 0x1d00 [0x0] + dma1w_next_descriptor = 0x6a640000 [0x0] + dma1w_sw_descriptor = 0x6a640000 [0x0] + dma1w_last_descriptor = 0x0 [0x0] + dma1w_active_time = 0x3b9aca03 [0x0] + dma1w_wait_time = 0x3b9aca03 [0x0] + dma1w_counter = 0x3 [0x0] + dma0r_engine_capabilities = 0x14000013 [0x0] + dma0r_engine_control = 0x0 [0x0] + dma0r_next_descriptor = 0x0 [0x0] + dma0r_sw_descriptor = 0x0 [0x0] + dma0r_last_descriptor = 0x0 [0x0] + dma0r_active_time = 0x7 [0x0] + dma0r_wait_time = 0x7 [0x0] + dma0r_counter = 0x3 [0x0] + dma1r_engine_capabilities = 0x14000113 [0x0] + dma1r_engine_control = 0x500 [0x0] + dma1r_next_descriptor = 0x6e651200 [0x0] + dma1r_sw_descriptor = 0x6e651140 [0x0] + dma1r_last_descriptor = 0x6e651140 [0x0] + dma1r_active_time = 0x3b9aca03 [0x0] + dma1r_wait_time = 0x7 [0x0] + dma1r_counter = 0x3 [0x0 diff --git a/images/software_layer.png b/images/software_layer.png new file mode 100644 index 0000000..4fa913c Binary files /dev/null and b/images/software_layer.png differ diff --git a/images/software_layer2.png b/images/software_layer2.png new file mode 100644 index 0000000..778c81f Binary files /dev/null and b/images/software_layer2.png differ diff --git a/images/software_layer3.png b/images/software_layer3.png new file mode 100644 index 0000000..f7f6c88 Binary files /dev/null and b/images/software_layer3.png differ diff --git a/images/ufo_gui2.png b/images/ufo_gui2.png new file mode 100644 index 0000000..ec8fe9f Binary files /dev/null and b/images/ufo_gui2.png differ diff --git a/images/ufo_gui_piecewise_bar.png b/images/ufo_gui_piecewise_bar.png new file mode 100644 index 0000000..180e88e Binary files /dev/null and b/images/ufo_gui_piecewise_bar.png differ diff --git a/images/ufo_gui_temp.png b/images/ufo_gui_temp.png new file mode 100644 index 0000000..ba3c606 Binary files /dev/null and b/images/ufo_gui_temp.png differ diff --git a/ufo.bib b/ufo.bib new file mode 100644 index 0000000..25ef18e --- /dev/null +++ b/ufo.bib @@ -0,0 +1,94 @@ +%% This BibTeX bibliography file was created using BibDesk. +%% http://bibdesk.sourceforge.net/ + + +%% Created for Andreas Kopmann at 2012-07-30 13:52:58 +0200 + + +%% Saved with string encoding Unicode (UTF-8) + + +%% Image sensors datasheets + +@MANUAL{CMOSIS:CMV2000, +title="{CMV2000} Datasheet", +organization="{CMOSIS NV Image Sensors}", +year="2010" +} + +@MANUAL{CMOSIS:CMV4000, +title="{CMV4000} Datasheet", +organization="{CMOSIS NV Image Sensors}", +year="2010" +} + +@MANUAL{FAIRCHILD:CIS1021, +title="{CIS1021} Datasheet", +organization="{BAE Systems Imaging Solutions}", +year="2011" +} + + +@MANUAL{XILINX:ML605, +title="ML605 Hardware User Guide", +organization="{Xilinx}", +url="http://www.xilinx.com/support/documentation/boards_and_kits/ug534.pdf", +year="2012" +} + +@MISC{SW:IMAGEJ, +title="{ImageJ -- Image processing and Analysis in Java}", +howpublished="http://rsbweb.nih.gov/ij/" +} + +@MISC{SW:FIJI, +title="{Fiji is just ImageJ}", +howpublished="http://fiji.sc/wiki/index.php/Fiji" +} + + + + +@article{ISI:000278830600027, + Abstract = {{The 7B2 bio-imaging beamline of the Pohang Accelerator Laboratory (PAL) + is newly equipped with a 3D X-ray tomography system. It can provide 3D + X-ray images with a resolving power better than 2 mu m in a + non-destructive way without destroying an optically opaque substance. By + using stable, high-flux synchrotron radiation, it can photograph digital + images with high resolution at exposure times of ms in real time. While + it; can obtain an absorption contrast image according to the absorption + difference of a substance, it can also obtain an image representing the + edge-enhanced mechanism by using a small angle diffraction of + synchrotron radiation, which takes place at the boundary surface of the + density difference in an individual component material. The 7B2 + bio-imaging beamline has been newly setup and provides users with image + acquisition, reconstruction, and image-rendering software for computer + X-ray tomography. In this presentation, we will introduce the beamline + setup, with optical instruments and imaging processing software, of the + 7B2 bio-imaging beamline.}}, + Address = {{635-4, YUKSAM-DONG, KANGNAM-KU, SEOUL 135-703, SOUTH KOREA}}, + Affiliation = {{Choi, HJ (Reprint Author), Pohang Accelerator Lab, Dept Beamline, Pohang 790784, South Korea. Choi, Hyo-Jin; Kim, Hyo-Yun; Lim, Jae-Hong; Huang, Jung Yun, Pohang Accelerator Lab, Dept Beamline, Pohang 790784, South Korea.}}, + Author = {Choi, Hyo-Jin and Kim, Hyo-Yun and Lim, Jae-Hong and Huang, Jung Yun}, + Author-Email = {{choihyo@postech.ac.kr huang@postech.ac.kr}}, + Doc-Delivery-Number = {{611PD}}, + Doi = {{10.3938/jkps.56.2055}}, + Issn = {{0374-4884}}, + Journal = {{JOURNAL OF THE KOREAN PHYSICAL SOCIETY}}, + Journal-Iso = {{J. Korean Phys. Soc.}}, + Keywords = {{X-ray image; 3D Tomography; Image reconstruction; Image rendering}}, + Language = {{English}}, + Month = {{JUN}}, + Note = {{13th International Conference on Accelerator and Beam Utilization, Gyeongju, SOUTH KOREA, OCT 13-14, 2009}}, + Number = {{6, Part 1, SI}}, + Number-Of-Cited-References = {{1}}, + Pages = {{2055-2058}}, + Publisher = {{KOREAN PHYSICAL SOC}}, + Subject-Category = {{Physics}}, + Times-Cited = {{0}}, + Title = {{3D X-ray Tomography System in the PLS 7B2 Bio-imaging Beamline}}, + Type = {{Article; Proceedings Paper}}, + Unique-Id = {{ISI:000278830600027}}, + Volume = {{56}}, + Web-Of-Science-Category = {{Physics, Multidisciplinary}}, + Year = {{2010}}, + Bdsk-Url-1 = {http://dx.doi.org/10.3938/jkps.56.2055%7D}} diff --git a/user.tex b/user.tex new file mode 100644 index 0000000..368435a --- /dev/null +++ b/user.tex @@ -0,0 +1,1145 @@ +% UFO camera user manual +% + +\chapter{Operation manual} + +\section{Concept} + +A high performance camera interface combined with application specific camera controllers opens +a wide range of opportunities for scientific applications. Figure \ref{camera-setup} shows the first +prototype of the fully programmable high-throughput UFO camera currently developed at KIT. + +The main features of the UFO camera are: + +\begin{itemize} +\item Modular concept with fast FMC interface between camera controller and image sensor. With minimal effort a large variety of image sensors can be included in the setup. +\item Powerful high bandwidth firmware to handle data rate currently up to 2GByte/sec. +\item Fast interface to the readout PC using a PCI Express extender. High performance Linux drivers for the architecture are available. +\item Interfaces for attaching application specific logic in FPGA and driver. +\end{itemize} + +\begin{figure} +\includegraphics[width=\textwidth]{images/Figure_2.png} +\caption{\label{camera-setup} Prototype of the modular UFO camera.} +\end{figure} + + + + +\section{Supported image sensors} + +The prototype of the UFO camera has been developed using the images sensor CMOSIS CMV2000 with 2.2 mega pixel and frames rates of up to 340 fps in full resolution. The sensor supports to modes of operation with 10bit and 12bit resolution \cite{CMOSIS:CMV2000}. + +A full list of supported and future sensors is given in table \ref{image-sensors}. + + + +\begin{table} +\caption{\label{image-sensors} List of supported image sensors.} +\begin{center} +\begin{tabular}{|c|c|p{8cm}|} +\hline +Image sensor & Mode & Comment \\ +\hline +CMOSIS CMV2000 & 10bit, 340fps & Implemented, tested, characterized \\ +\hline +CMOSIS CMV2000 & 12bit, 70fps & Implemented, tested, characterized \\ +\hline +CMOSIS CVM4000 & & Ordered. Note: the sensor is pin compatible with the smaller CMV2000 and provides the same operation mode \cite{CMOSIS:CMV4000}. \\ +\hline +Fairchild CIS1021 & 2x11bit, 100fps & Planned \cite{FAIRCHILD:CIS1021}\\ +\hline +\end{tabular} +\end{center} +\end{table} + + +\section{Starting the camera} +Camera and readout PC are considered as a unit. In order to establish word with the camera +prototype a certain procedure has to be followed. + +\begin{itemize} +\item First, the camera has to be turned ON while the readout PC is ON. +\item Reboot the readout PC. Currently only then the connection is properly established. +\item Check that the camera is operational. + +The LEDs on the controller board should show the following values:\\ +DS19 blinking, DS18 ON, DS20 ON, DS17 OFF. + +All three LEDs on FMC board should be ON to indicate proper voltage levels. + +CBL and EDGE LEDs should be ON to indicate proper PCIe connection. +\item Select the desired frame rate using the script \verb/Reset__bits.sh/ +\item Check again the status. + +Now also the LEDS DS21, DS14, DS15 need to be ON. +\end{itemize} + + +\subsection{LED status indicators} + +For visual confirmation of the camera's proper working state, number of LED indicators are provided on the camera controller board, shown in \figurename~\ref{pic_LED}. The description of this LEDs is given in \tablename~\ref{LEDs}. + +For other existing LEDs on the FPGA main board, they are related to ML605 board functionality \cite{XILINX:ML605}. +Beside the visual information of the LEDs more details are given by the status register of the camera. + +\begin{figure}[p] +\centering +\includegraphics[width=0.7\textwidth]{images/pic_LEDs.png} +\caption{\label{pic_LED} Camera indicator LEDs} +\end{figure} + + +\begin{table}[p] +\caption{\label{LEDs} List of status LEDs on the camera controller board.} +\begin{center} +\begin{tabular}{|c|c|c|} +\hline +LED & Status & Comment \\ +\hline +DS18 & On & DDR3 initialization has completed \\ +\hline +DS16 & On & Readout in progress \\ +\hline +DS14 & On & data register is locked\\ +\hline + & Off, Flashing & data register doesn’t work correctly \\ +\hline +DS15 & On & status register is locked\\ +\hline + & Off, Flashing & status register doesn’t work correctly \\ +\hline +DS19 & Flashing & 200 MHz clock is alive \\ +\hline +DS21 & On & Busy active \\ +\hline +DS17 & Off & PCIe connection is properly established \\ +\hline +DS12 & On & DMA ready to accept data \\ + +\hline +\end{tabular} +\end{center} +\end{table} + + +\newpage +\subsection{Reset scripts} +The script \verb/Reset__bits.sh/ will report if initialization completed successfully. +If initialization is executed successfully the status OK is printed and the camera is ready for operation. + +Example: configuring camera for 12 bit mode + +\begin{lstlisting} +ufo@ufocamera:~> Reset_Init_all_reg_12bit.sh + Reset Readout and CMOSIS + Release Reset for Readout + Start CMOSIS Configuration .. + 12 - bit mode, set Bit_mode + 12 bit mode, set ADC resolution 12 bits + End CMOSIS Configuration .. + Write exp time...... + cmosis_number_lines = 1088 + Camera READY ........ OK +\end{lstlisting} + + +\newpage +\section{Camera interfaces} + +The camera can be used by a graphical user interface. It displays life images and provides access to all camera parameters. +For automation of purpose the powerful command-line tool pcitool is available. The distribution contains several scripts that +implement some often used functions. + +\subsection{Graphical camera user interface} + +The camera comes with a graphical application that displays live images from the camera. +The bottom tab provides some short cuts for often used camera functions. +The full set of camera properties are accessible in the right part of the application. + +The graphical user inferface is shown in \figurename~\ref{camera-gui}. The main screen display the image data from the camera. The control buttons above the main window allow an video recorder like recording and replay of the selected scenes. +The bottom part provides some shortcuts for often used camera parameters. The full set of camera properties are accessible in the right part of the application. With the double click on the parameter name the value can be changed. All sensor registers are accessible as well. + +\begin{figure}[h] +\includegraphics[width=\textwidth]{images/ufo_gui2.png} +\caption{\label{camera-gui} Camera frontend} +\end{figure} + + +\subsubsection{Set camera parameters} + +Select the parameter "Exposure" in the bottom window, increment the value, or directly writing the desired value in the appropriate space. The value should be given in units of seconds. Alternatively the parameter "exposure-time" from the parameter list in the right window could be chosen. + +\subsubsection{Piecewise-linear response function} + +The camera can be used with a piecewise linear response function. This gives the possibility to achieve a virtual higher optical dynamic range. The feature will clip illuminated pixels which reach a programmable voltage, while leaving the darker pixels untouched. The clipping level can be adjusted 2 times within one exposure time to achieve a maximum of 3 slopes in the response curve. In the dislay it is shown using bar for piecewise linear response. It is shown in \figurename~\ref{ufo_gui_piecewise_bar}. + +More information for using the piecewise can be found in CMOSIS2000 reference sheet \cite{CMOSIS:CMV2000}. + +\begin{figure}[h] +\centering +\includegraphics[width=1\textwidth]{images/ufo_gui_piecewise_bar.png} +\caption{\label{ufo_gui_piecewise_bar} Dialog to customize the piecewise linear response function} +\end{figure} + +\subsubsection{Monitoring of the camera temperatures} + +Finally the temperature of sensor and FPGA is monitored. It is shown in \figurename~\ref{ufo_gui_temp_bar}. Alarm would indicate if the temperature of the FPGA exceeds the alarm limits. +\begin{figure}[h] +\centering +\includegraphics[width=\textwidth]{images/ufo_gui_temp.png} +\caption{\label{ufo_gui_temp_bar} Sensor temperature monitoring} +\end{figure} + + + +%TODO: How to save a picture with the GUI? + + +% Host: ipecamera + +\subsection{Command line tools in pci-tools} + + + +The pcitools provide complete control of all camera properties. It allows to read and write the camera registers, +trigger frame acquisition, initiate DMA transfers, and check the status of active operations. Basically, the command is +executed as follows: + +\begin{verbatim} +pci [options] [hex data] +\end{verbatim} + +The first argument mode defines the global mode of operation. Examples are retrieving current camera configuration, +reading and writing registers and device memory, performing DMA transfers, or performing continuous frame grabbing. +There mode of operation is followed by one or more options that specify various parameters like the register name or address to read/write, required frame rate, number of frames to grab, etc. Finally, the hex data is hex +decimal values written to the registers. More information about of the pcitool usage can be found +with \verb/pci -h/. + +\begin{lstlisting} +ufo@ufocamera:~> pci -h +Usage: + pci [options] [hex data] + Modes: + -i - Device Info + -l[l] - List (detailed) Data Banks & Registers + -r - Read Data/Register + -w - Write Data/Register + --benchmark - Performance Evaluation + --reset - Reset board + --help - Help message + + Event Modes: + --trigger [event] - Trigger Events + -g [event] - Grab Events + + DMA Modes: + --start-dma [r|w] - Start specified DMA engine + --stop-dma [num[r|w]] - Stop specified engine or DMA subsystem + --list-dma-engines - List active DMA engines + --list-dma-buffers - List buffers for specified DMA engine + --read-dma-buffer - Read the specified buffer + --wait-irq - Wait for IRQ + + Kernel Modes: + --list-kernel-memory - List kernel buffers + --read-kernel-memory - Read the specified block of the kernel memory + block is specified as: use:block_number + --free-kernel-memory - Cleans lost kernel space buffers (DANGEROUS) + dma - Remove all buffers allocated by DMA subsystem + #number - Remove all buffers with the specified use id + + Addressing: + -d - FPGA device (/dev/fpga0) + -m - Memory model (autodetected) + pci - Plain + ipecamera - IPE Camera + -b - PCI bar, Register bank, or DMA channel + + Options: + -s - Number of words (default: 1) + -a [fifo|dma] - Access type and bits per word (default: 32) + -e - Endianess Little/Big (default: host) + -o - Append output to file (default: stdout) + -t - Timeout in microseconds + + Event Options: + --event - Specifies event for trigger and grab modes + --data - Data type to request for the events + --run-time - Limit time to grab/trigger events + -t - Timeout to stop if no events triggered + --trigger-rate - Generate tps triggers per second + --trigger-time - Specifies delay between triggers (us) + -s - Number of events to grab and trigger + --format [type] - Specifies how event data should be stored + raw - Just write all events sequentially + add_header - Prefix events with 512 bit header: + event(64), data(64), nope(64), size(64) + seqnum(64), offset(64), timestamp(128) + --buffer [size] - Request data buffering, size in MB + --threads [num] - Allow multithreaded processing + + DMA Options: + --multipacket - Read multiple packets + --wait - Wait until data arrives + + Information: + --verbose [level] - Announce details of ongoing operations + -q - Quiete mode (suppress warnings) + + Data: + Data can be specified as sequence of hexdecimal number or + a single value prefixed with '*'. In this case it will be + replicated the specified amount of times + +\end{lstlisting} + + +Example: read the exposure time + +\begin{verbatim} +pci -r cmosis_exp_time +\end{verbatim} + +\begin{description} +\item[] The argument \verb/-r cmosis_exp_time/ reads the register from the image sensor. +\end{description} + + + + +\section{Working with the camera} + +This section describes common operations with the pcitools. + + +\subsection{Take a single picture} + +\begin{verbatim} +pci --grab -s 1 --trigger -o +\end{verbatim} + +\begin{description} +\item[ ] Mode \verb/--grab/ instructs pcitool to start grabbing +\item[ ] \verb/-s 1/ option specifies that only a single frame is required +\item[ ] \verb/--trigger/ instructs camera to self trigger, if this option not provided the pcitool will wait +until camera will decide to send the frame (possibly triggered by external hardware trigger) +\item[ ] \verb/-o / specifies the file to store images. The images are stored in raw format, each 16 bit word describing a single pixel. The horizontal dimension is changing before vertical. +\end{description} + +The raw image data does not contain information on image size and colors. This information has to be specified when the image should be displayed. Standard image analysis applications like \emph{Imagej} \cite{SW:IMAGEJ} have raw data import filter that allow to decode the data correctly. +The following examples shows the import dialog of an ImageJ distribution called \emph{Fiji} \cite{SW:FIJI}. + +\includegraphics[width=\textwidth]{images/Fiji_set_param.png} + +For opening the frame(s) we should execute: \textbf{File} $\rightarrow $ \textbf{Import} $ \rightarrow $ \textbf{Raw...}. After the selection of the frame we should set the frame info: width, height, it's size, endianess, and number of frames. When hovering over the picture with the mouse, in the status bar of the \emph{Fiji} is shown the pixel position and pixel value. In the upper left corner of the picture are additional informations: which frame is displayed, how many frames are open, size of the frame, etc. + + + + +\subsection{Taking a series of pictures} +Similarly, multiple images may be grabbed + +\begin{verbatim} +pci --grab --run-time --trigger --trigger-rate -o +\end{verbatim} + +In this case: +\begin{description} +\item[ ] \verb/--run-time / option specifies how long to grab frames in microseconds +\item[ ] \verb/--trigger-rate / option instructs pcitool how often to issue software triggers. This value is desired frame rate in frames per second +\item[ ] \verb/-o / option agains specifies the output file. The frames are stored sequentially one after another in a single file +\end{description} + +There is additional options which may define the duration and speed of grabbing process +\begin{description} +\item[ ] \verb/--trigger-time