From 32816bd88cf485be1a1cf15bcf28b1c50d35597b Mon Sep 17 00:00:00 2001 From: Michael Wiebusch Date: Tue, 15 Jul 2014 10:28:20 +0200 Subject: [PATCH] progress, renamed startup.pl -> init_setup.pl, start.pl -> init_system.pl --- mvdsensorcontrol/appendix.tex | 191 ++++++++++++++++++---------------- mvdsensorcontrol/gui.tex | 8 +- mvdsensorcontrol/jtag.tex | 5 + mvdsensorcontrol/remarks.tex | 4 +- 4 files changed, 116 insertions(+), 92 deletions(-) diff --git a/mvdsensorcontrol/appendix.tex b/mvdsensorcontrol/appendix.tex index 6330800..ea1a482 100644 --- a/mvdsensorcontrol/appendix.tex +++ b/mvdsensorcontrol/appendix.tex @@ -9,7 +9,7 @@ This script creates a low level ini file for the JTAG programming script from a file. The specification file which is used to build the ini file is referenced inside the configuration XML file and has not to be given as an argument. Under normal conditions this script is not used stand-alone but is called during the execution of -\hyperref[sec:startup.pl]{startup.pl}. +\hyperref[sec:initsetup.pl]{init\_setup.pl}. \begin{Verbatim} xml2ini.pl -c config.xml [-o output.ini] @@ -98,6 +98,7 @@ parameter explanation: \end{Verbatim} \subsubsection{changeConfigVal.pl} +\label{sec:changeconfigval.pl} Regarding \hyperref[sec:xmlOperation.pl]{xmlOperation.pl}, changeConfigVal.pl is redunant in its functionality. It is merely a comfortable shortcut to change parameters inside a configuration XML file on the fly. @@ -117,24 +118,25 @@ changeConfigVal.pl -c /path/to/config.xml [-v] (including path if necessary!) \end{Verbatim} -\subsubsection{startup.pl} -\label{sec:startup.pl} -The script runs the necessary steps to configure and start the MAPS sensors. From a given -\hyperref[sec:setupFile]{setup configuration file} (with full path!) the script extracts: +\subsubsection{init\_setup.pl} +\label{sec:initsetup.pl} +The script performs the necessary actions to configure and start the MAPS sensors. From a given +\hyperref[sec:setupFile]{setup configuration file} the script extracts: \begin{itemize} \item -The topology of the setup, i.e. how many controllers (and their addresses), how many chains, how many -sensors in each chain +The topology of the setup, i.e. how many controllers (and their addresses) are there, +how many chains and how many sensors are in each chain? \item -Which JTAG configuration XML file is associated to which sensor +Which JTAG configuration XML file is associated to which sensor? \end{itemize} Subsequently the script builds a set of low level JTAG configuration ini files (using \hyperref[sec:xml2ini.pl]{xml2ini.pl}) and calls the JTAG programming tools to program and start -the sensors. -(!!) It does not (yet) set the sensor enable, JTAG enable, and power switches on the Converter Board -to the correct settings! This has to be done manually! (!!) -\begin{Verbatim}[label=startup.pl usage] -startup.pl /path/to/setupFile +the sensors. +Furthermore, if the setup file contains directives which contain converter board +settings (e.g. power and signal switch settings), the settings will be applied to the respective +converter board (internally using \hyperref[sec:getputpl]{put.pl}). +\begin{Verbatim}[label=init\_setup.pl usage] +init_setup.pl /path/to/setupFile Options: -h, --help brief help message @@ -143,6 +145,18 @@ startup.pl /path/to/setupFile \end{Verbatim} +\subsubsection{init\_system.pl} +\label{sec:initsystem.pl} +This script initializes the readout system which corresponds to one TRB3. +It has to be run prior to executing \hyperref[sec:initsetup.pl]{init\_setup.pl}. +All FPGAs on the TRB3 are being reset and get assigned their unique TrbNet addresses, +according to the definitions in "mvdconfig/network/addresses\_trb3.db". + + +\begin{Verbatim}[label=init\_system.pl usage] +init_system.pl +\end{Verbatim} + \subsection{Miscellaneous command line tools} \subsubsection{adcread.pl} @@ -210,7 +224,7 @@ Example: adcread.pl?DAQOPSERVER=localhost:88&FPGA=0xd882&chip=0&channel=CurrentDigital \end{Verbatim} -\subsubsection{Get.pl and put.pl} +\subsubsection{get.pl and put.pl} \label{sec:getputpl} Get.pl and put.pl are command line tools to read (get) from and write (put) to slow-control registers, while making use of the benefits of \hyperref[sec:xml-db]{xml-db}. @@ -228,85 +242,86 @@ get.pl put.pl \end{Verbatim} +% +% +% \subsection{Overview of the daqscripts (draft!)} +% \subsubsection{run.pl} +% \label{sec:run.pl} +% \begin{description} +% \item[is called by] +% testgui.pl with parameters "setupFile" and "runtime" (CGI/HTTP request) +% \item[does] +% \begin{itemize} +% \item +% parse \hyperref[sec:setupFile]{setupFile}, extract systemName +% \item +% parse \hyperref[sec:systemFile]{systemFile}, extract gbe address and gbe port(s), extract daqopserver and set this as env variable. +% \item +% remove stale hld dumps, remove stale matrix plots +% \end{itemize} +% \item[calls] +% init\_setup.pl with parameter setupFile +% \item[calls] +% ./preview/exec\_evtbuild\_t.pl with arguments runtime, dumpPath, systemName and ports +% \item[calls] +% ./preview/unpack\_hld.pl with arguments dumpfile, picPath and systemName +% \end{description} +% +% \subsubsection{exec\_evtbuild\_t.pl} +% \begin{description} +% \item[is called by] +% \hyperref[sec:run.pl]{run.pl} with arguments runtime, dumpPath, systemName and ports +% \item[calls] +% daq\_netmem with timeout and shm name +% \item[calls] +% daq\_evtbuild with timeout and shm name +% \end{description} +% +% \subsubsection{init\_system.pl} +% \begin{description} +% \item[is called by] manual with argument systemName (not file, no path) +% \item[does] +% \begin{itemize} +% \item +% Parse corresponding systemFile to systemName +% \item +% Extract addresses of hub, gbe and roc +% \item +% Set addresses of FPGAs according to database definitions +% \item +% Set GbE Configuration (common for all boards) (??) +% \item +% Send arbiter start signal +% \end{itemize} +% +% \end{description} +% +% \subsubsection{init\_setup.pl} +% Run the necessary steps to configure and start MAPS sensors. +% (see also section \hyperref[sec:initsetup.pl]{init\_setup.pl}) +% \begin{description} +% \item[is called by] +% run.pl or manual with argument /path/to/setupFile +% \item[does] +% \begin{itemize} +% \item +% extract sensor, chain and controller parameters from setup file +% \item +% generate all necessary low level JTAG configuration ini files from the high level configuration +% XML files +% \item +% call JTAG programmer, program and initialize the sensors +% \end{itemize} +% \end{description} +\subsection{Slow control register definitions} - -\subsection{Overview of the daqscripts (draft!)} -\subsubsection{run.pl} -\label{sec:run.pl} -\begin{description} -\item[is called by] -testgui.pl with parameters "setupFile" and "runtime" (CGI/HTTP request) -\item[does] -\begin{itemize} -\item -parse \hyperref[sec:setupFile]{setupFile}, extract systemName -\item -parse \hyperref[sec:systemFile]{systemFile}, extract gbe address and gbe port(s), extract daqopserver and set this as env variable. -\item -remove stale hld dumps, remove stale matrix plots -\end{itemize} -\item[calls] -startup.pl with parameter setupFile -\item[calls] -./preview/exec\_evtbuild\_t.pl with arguments runtime, dumpPath, systemName and ports -\item[calls] -./preview/unpack\_hld.pl with arguments dumpfile, picPath and systemName -\end{description} - -\subsubsection{exec\_evtbuild\_t.pl} -\begin{description} -\item[is called by] -\hyperref[sec:run.pl]{run.pl} with arguments runtime, dumpPath, systemName and ports -\item[calls] -daq\_netmem with timeout and shm name -\item[calls] -daq\_evtbuild with timeout and shm name -\end{description} - -\subsubsection{start.pl} -\begin{description} -\item[is called by] manual with argument systemName (not file, no path) -\item[does] -\begin{itemize} -\item -Parse corresponding systemFile to systemName -\item -Extract addresses of hub, gbe and roc -\item -Set addresses of FPGAs according to database definitions -\item -Set GbE Configuration (common for all boards) (??) -\item -Send arbiter start signal -\end{itemize} - -\end{description} - -\subsubsection{startup.pl} -Run the necessary steps to configure and start MAPS sensors. -(see also section \hyperref[sec:startup.pl]{startup.pl}) -\begin{description} -\item[is called by] -run.pl or manual with argument /path/to/setupFile -\item[does] -\begin{itemize} -\item -extract sensor, chain and controller parameters from setup file -\item -generate all necessary low level JTAG configuration ini files from the high level configuration -XML files -\item -call JTAG programmer, program and initialize the sensors -\end{itemize} -\end{description} - -\subsubsection{Converter board microcontroller registers} +\subsubsection{CbUcReg registers} \input{xml-dbtables/CbUcReg} \newpage -\subsection{Slow control register definitions} +\subsubsection{CbCtrlReg registers} \input{xml-dbtables/CbCtrlReg} \newpage -\subsubsection{Converter board SPI data stream registers} +\subsubsection{CbSpiStream registers} \input{xml-dbtables/CbSpiStream} diff --git a/mvdsensorcontrol/gui.tex b/mvdsensorcontrol/gui.tex index 87342d7..709945c 100644 --- a/mvdsensorcontrol/gui.tex +++ b/mvdsensorcontrol/gui.tex @@ -4,7 +4,7 @@ \subsection{Graphical JTAG Editor} \label{sec:jtageditor} -To further facilitate JTAG register manipulation an editor with graphical user interface has been +To further facilitate JTAG register manipulation, an editor with graphical user interface has been implemented. When "jtageditor.pl" is invoked from a browser, the user will be presented with a three panel layout (see figure \ref{fig:jtageditor_ssht}). In the top panel @@ -35,10 +35,14 @@ MIMOSA26 datasheet) and the possible value range. Furthermore, a configuration file can inherit settings from another (existing and valid) configuration file. Therefore an ancestor file can be selected in a dropdown menu at the top of the bottom right panel. All settings from the ancestor file are imported as new defaults, which are then partially overridden -by the configuration's own settings. This feature can be used for example to operate a multitude +by the configuration's own settings. When selecting an ancestor, the editor automatically +checks for circular dependencies and prevents inheriting from any file that inherits from +the current configuration file. +This feature can be used for example to operate a multitude of sensors with the same parameters from a common ancestor file, while each sensor's own configuration file contains merely individual tuning parameters. + The editor assumes, that the configuration XML files are stored in "../../mvdconfig/config/" and the specification files are stored in "../specs/" (relative to the location of jtageditor.pl). diff --git a/mvdsensorcontrol/jtag.tex b/mvdsensorcontrol/jtag.tex index 1d0b55e..707bd1e 100644 --- a/mvdsensorcontrol/jtag.tex +++ b/mvdsensorcontrol/jtag.tex @@ -104,6 +104,11 @@ configuration file, the user has a clear "key->value" type interface to the sens While, in principle, the settings files can be edited by hand, it is recommended to use the graphical JTAG editor (see section \ref{sec:jtageditor}), which greatly simplifies the task. +Alternatively, if the user wants to automate a special data acquisition task, that requires +the alteration of sensor settings, the user can use back-end scripts of the JTAG editor +as stand-alone software. The back-end can be operated from the command line or via HTTP request. +See section \ref{sec:xmlOperation.pl} in the appendix for details. + \begin{Verbatim}[label=mvdconfig/config/ExampleJtagConf.xml] should be called roc \item Why are there rocs defined in the system file? Are the controller entries in the setup file -not sufficient? -> for renaming by start.pl +not sufficient? -> for renaming by init\_system.pl \item seems to have no use at all \end{itemize} @@ -19,7 +19,7 @@ not sufficient? -> for renaming by start.pl \item We don't have multiple JTAG chains and CbControllers in the peripheral FPGA yet. \item -In start.pl the handling of the (readout)-system is not yet generic we still have +In init\_system.pl the handling of the (readout)-system is not yet generic we still have \begin{Verbatim} if($system eq 'Vacuum') { trb_write($ccu,0x00c0,0x00e1); -- 2.43.0