From: Manuel Penschuck Date: Fri, 24 Oct 2014 17:47:13 +0000 (+0200) Subject: Billboard documentaion added X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=a391955a37854f90985ffaa00ba3f7e1deb5ab73;p=daqdocu.git Billboard documentaion added --- diff --git a/trb3/Billboard.tex b/trb3/Billboard.tex new file mode 100644 index 0000000..1b90922 --- /dev/null +++ b/trb3/Billboard.tex @@ -0,0 +1,131 @@ +The billboard block is designed to help embedding external data directly into the read-out data stream. +The module consists of a 256x4b memory area that can be randomly accessed via slow-control and a trigger unit that controls how often data is sent. + +\subsection{Trigger Scheme} + In order to reduce the band-width, the module can skip certain triggers; by default it is completely inactive. + There are two methods to select a trigger, namely time-based and trigger-type-based. + A combination of both concepts allows you, for instance, to send data at each status trigger, at each 1000th physics trigger, but at-least once every 10~ms. + Of course, a time-based read-out only happens, if the CTS issues a trigger. + + If either of the following two sub-modules fires, data is written into the stream (this is called an active event): + \begin{enumerate} + \item + \textbf{Time-Based}: + The \texttt{TimeThresholdReg} registers allows you to define a time interval between two active event. + If a read-out happened, all events within this window are ignored for the time-based decision. + The first event to arrive after the threshold is selected and triggers a read-out. + The counter is reset by any active event. + Set the threshold register to 0 (default) to prevent any time-based decision. + + \item + \textbf{Trigger-Type Thinning}: + For each trigger type $i$ there exists a so called skip register $i$. + It specifies the number of triggers of this type to be ignored between two active read-out. + Consider the physics trigger type 1 and let $x$ be the value of the corresponding register: + The first physics trigger received invokes an active read-out, while the next $x$ physics trigger are ignored. + The subsequent trigger then becomes active again (and so on). + Time-based decisions from other trigger types do not interfere with this pattern. + \end{enumerate} + +\subsection{Memory} + The memory is directly mapped into the slow-control address space and is randomly accessible. + The module employs a shadow-memory to prevent data corruption in case a read-out occurs while you update the data. + This, however, happens fully transparent and is not resembled on the slow-control addresses. + + Once you have written all values into the memory, you can \emph{commit} the data by writing its length into \texttt{CommitReg}. + In the next active event, the module will send the number of words specified whilst committing into the read-out stream, starting at the lowest memory address. + Due to the shadow memory, you cannot reuse unchanged parts of the data, but have to write the whole block, before commit. + \textbf{Do not assume any initial value!} + + \emph{Note:} In theory it can happen, that you commit while a read-out takes place. + In this case, the new memory block is directly accessible (even if it is still used by the read-out). + However, the module will stall writes to addresses, that are not sent yet. + This may lead to a time-out error for the write-command via slow-control. + In this case, simply write it again. + The odds for this to happen are very small and it will never occur if you start writing at the lowest address. + +\subsection{Slow Control} + {\small +\begin{longtable} +{ p{4cm} l c p{8cm} } +\toprule + \textbf{Register} & \textbf{Addr} & \textbf{Bits} & \textbf{Description} \\ +\midrule +\midrule +\endfirsthead\multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\\toprule + \textbf{Register} & \textbf{Addr} & \textbf{Bits} & \textbf{Description} \\ +\midrule +\midrule +\endhead\multicolumn{4}{r}{\textit{Continued on next page}} \\ + \endfoot + \endlastfoot \textbf{CommitReg}\hfill(rw) & b000 & & When reading: Length of data block used for current read-out, When writing: Commit data in memory and set length of data \\ + \quad CommitLength & & 0--7 & Length of data in 32-bit words \\ +\rowcolor{light-gray} + \textbf{TimeThresholdReg}\hfill(rw) & b001 & & Time-Out used for time-based trigger decision (Once a read-out happened use first trigger after at least the time specified) \\ +\rowcolor{light-gray} + \quad TimeThreshold & & 0--31 & 0: Disable timing-based decision, otherwise: Minimal time between two events in TrbNet clock cycles \\ + \textbf{FramesSentReg}\hfill(r) & b002 & 0--31 & Statistics: Number of triggers with active read-out (frames sent) \\ +\rowcolor{light-gray} + \textbf{WordsSentReg}\hfill(r) & b003 & 0--31 & Statistics: Number of words sent (incl. header) \\ + \textbf{NumberCommitsReg}\hfill(r) & b004 & 0--31 & Statistics: Number of commits issued \\ +\rowcolor{light-gray} + \textbf{AgeLastCommitReg}\hfill(r) & b005 & 0--31 & TrbNet clock cycles since last commit \\ + \textbf{SkipTriggerReg.0}\hfill(rw) & b010 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.1}\hfill(rw) & b011 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.2}\hfill(rw) & b012 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.3}\hfill(rw) & b013 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.4}\hfill(rw) & b014 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.5}\hfill(rw) & b015 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.6}\hfill(rw) & b016 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.7}\hfill(rw) & b017 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.8}\hfill(rw) & b018 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.9}\hfill(rw) & b019 & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.10}\hfill(rw) & b01a & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.11}\hfill(rw) & b01b & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.12}\hfill(rw) & b01c & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.13}\hfill(rw) & b01d & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ + \textbf{SkipTriggerReg.14}\hfill(rw) & b01e & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\rowcolor{light-gray} + \textbf{SkipTriggerReg.15}\hfill(rw) & b01f & 0--31 & Number of event of trigger type addr[3:0] to be skipped \\ +\bottomrule +\caption{Registers in group StatusAndControl}\label{tab:BillboardStatusAndControl}\end{longtable} +} + +\subsection{SubSubEvent Format} + The read-out data-stream starts with a header word, that is present even if no data follows. + If the event is active, memory words 0 to $n$ follow, where $n$ is the length specified when commiting. + In case of an inactive event, the length indicator still shows $n$ but the ActiveEvent-bit is 0. + This allows you to check, whether the slow-control update have been successful. + + {\small +\begin{longtable} +{ p{4cm} c p{8cm} } +\toprule + \textbf{Register} & \textbf{Bits} & \textbf{Description} \\ +\midrule +\midrule +\endfirsthead\multicolumn{3}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\\toprule + \textbf{Register} & \textbf{Bits} & \textbf{Description} \\ +\midrule +\midrule +\endhead\multicolumn{3}{r}{\textit{Continued on next page}} \\ + \endfoot + \endlastfoot + \textbf{ReadoutHeader} & & First word of data-stream \\ + \quad CommitLength & 0--11 & Number of data (in 32-bit words) committed \\ + \quad NumberCommits & 12--15 & Lower bits of the NumberCommits statistics counter \\ + \quad CommitAge & 16--30 & Age of commit in 1.31~ms \\ + \quad ActiveEvent & 31 & 0: No data follows \\ + & & 1: Amount specified in CommitLength follows \\ +\bottomrule +\caption{Readout Header}\label{tab:BillboardReadoutHeader}\end{longtable} +} + + diff --git a/trb3/main.tex b/trb3/main.tex index a064a3a..e1fb8b8 100644 --- a/trb3/main.tex +++ b/trb3/main.tex @@ -11,7 +11,6 @@ \usepackage[T1]{fontenc} \usepackage[pdftex]{graphicx} \usepackage{pslatex} -\usepackage{xcolor} \usepackage{array} \usepackage{rotating} \usepackage{multirow} @@ -32,6 +31,10 @@ \usepackage{amsmath} \usepackage{setspace} \usepackage[update,prepend]{epstopdf} +\usepackage[table]{xcolor} +\definecolor{light-gray}{gray}{0.90} + + \definecolor{darkblue}{rgb}{.1,.1,.6} \definecolor{darkgray}{rgb}{.5,.5,.5} @@ -232,8 +235,13 @@ \subsection{Design Blocks} \subsection{Data Format} \subsection{Slow Control} + + \clearpage + \section{Billboard} + \input{Billboard.tex} + \cleardoublepage - + \part{Experimental Setups and Configurations} \section{Trigger Time vs Reference Time}