From: Andreas Neiser Date: Thu, 25 Apr 2013 14:07:07 +0000 (+0200) Subject: Modified and added CTS External Trigger Module concerning Mainz A2 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d705cf7e27c6065e4e0615debb27e4d29d83bfb3;p=daqdocu.git Modified and added CTS External Trigger Module concerning Mainz A2 --- diff --git a/trb3/CtsHowtos.tex b/trb3/CtsHowtos.tex index 8c857cc..8ad0379 100644 --- a/trb3/CtsHowtos.tex +++ b/trb3/CtsHowtos.tex @@ -4,22 +4,31 @@ \subsection{HowTo Implement an External Trigger Module} This short tutorial will guide you through the steps necessary to implement an External Trigger Module: \begin{itemize*} - \item VHDL: Encapsulate the Trigger Logic into an entity (only the interface is discussed here - see section \ref{sec:cts_howto_etm_instantiation}) - \item VHDL: Instantiate the module and connected it to the system (see section \ref{sec:cts_howto_etm_instantiation}) - \item VHDL/Perl: Reserve a module id and implement the software support (see section \ref{sec:cts_howto_etm_instantiation}) + \item VHDL: Encapsulate the Trigger Logic into an entity (only + the interface is discussed here) % - see section \ref{sec:cts_howto_etm_instantiation}) + \item VHDL: Instantiate the module and connected it to the system %(see section \ref{sec:cts_howto_etm_instantiation}) + \item VHDL/Perl: Reserve a module id and implement the software support %(see section \ref{sec:cts_howto_etm_instantiation}) \end{itemize*} + It is also wise to start such developments in a new git branch to + prevent that you break the existing master branch code. If you have + successfully tested everything, the changes can easily be merged. \subsubsection{The module's interface} -\label{sec:cts_howto_etm_instantiation} +%\label{sec:cts_howto_etm_instantiation} An External Trigger Module (ETM) gives you the means to implement a high-level trigger criterion that does not require the preprocessing of the general purpose trigger inputs. A typical example is a network bridge. A CTS build can include at most one ETM. The module is directly connected to the trigger channel with the highest priority, thus if the ETM asserts the trigger line while the CTS is idle, the TrbNet Event Type of the next event is defined by the type configured for the ETM. - Listing \ref{lst:cts_howto_etm_instantiation} shows a minimal ETM instantiation. For a better readability, it is highly - recommended, that you keep the port's naming. Copy this into the top entity (\files{trb3\_central.vhd}). Make sure - there is no active code to instantiate another module (e.g. comment out the CBM/MBS part). You probably need to add - signals, e.g. to interface with off-board electronics. The semantics of the CTS interface are very straight-forward: + Listing \ref{lst:cts_howto_etm_instantiation} shows a minimal ETM + instantiation. For a better readability, it is highly recommended, + that you keep the port's naming. Copy this into the top entity + (\files{trb3\_central.vhd}) and wrap it with an analogous + \verb!generate if! statement. Also add another config option in + \files{config.vhd}. You probably need to add signals, e.g. to + interface with off-board electronics, but you can some inspiration + two existing modules. The semantics of the CTS interface are very + straight-forward: \begin{itemize*} \item Synchronously assert the \signal{cts\_ext\_trigger} line to indicate an event. If the CTS is idle (as indicated by a @@ -68,12 +77,13 @@ THE_ETM: \subsubsection{Obtaining a module id and registering the module} As discussed in chapter \ref{sec:cts_slow_control}, the software identifies the capabilities of any given CTS by enumerating over a sequence of module headers each containing a module id. The software then loads the drivers located in - \files{daqtools/web/CtsPlugins/CtsMod.pm}. This is also the central database of module ids. Just choose - a free number, use the template shown in listing \ref{lst:cts_howto_driver_template}) to create a new driver and check it in, - to ensure nobody else takes this id. - - - + \files{daqtools/web/CtsPlugins/CtsMod.pm}. This + is also the central database of module ids. All ETMs are + automatically assigned an ID starting from address 0x60. The order + is defined by the \verb!ETM_CHOICE_type! in \files{config.vhd}. + %Just choose + %a free number, use the template shown in listing \ref{lst:cts_howto_driver_template}) to create a new driver and check it in, + %to ensure nobody else takes this id. \begin{warning} The ETM's id has to be provided to the CTS via the generic constant \genericname{EXTERNAL\_TRIGGER\_ID}. The trigger logic then automatically reserves a memory block with two words payload (the status- and control register mentioned above). Even if your module, diff --git a/trb3/CtsSlowControl.tex b/trb3/CtsSlowControl.tex index 5c0ee35..69c592a 100644 --- a/trb3/CtsSlowControl.tex +++ b/trb3/CtsSlowControl.tex @@ -180,5 +180,16 @@ module. If set, the lowest bit of the control registers prevents the module from sending data to the event builder. The lower 24~bit of the status register contains the timestamp of the last event seen. The MSB holds the error flag. + \item \textbf{\addr{0x61} External logic - Mainz A2}. This module + indicates the presence of the Mainz A2 adapter module. If set, + the lowest bit of the control registers prevents the module from + sending data to the event builder. The lower 31~bit of the + status register contains the timestamp of the last event seen. + The MSB holds the error flag. + \end{itemize} - \ No newline at end of file + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "main" +%%% End: diff --git a/trb3/main.pdf b/trb3/main.pdf index 8c75710..503746e 100644 Binary files a/trb3/main.pdf and b/trb3/main.pdf differ