From 7d8f747d9755baafdf5aae97efc786d220c0e5c3 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Thu, 31 Mar 2011 08:51:50 +0000 Subject: [PATCH] *** empty log message *** --- daqnet.kilepr | 96 +++++++---- hubs.tex | 6 +- installation_trbnet.tex | 33 ++-- lvl1trigger.tex | 11 +- mdc.tex | 20 ++- mediainterface.tex | 30 +++- slowcontrol.tex | 6 +- software.tex | 9 + trbnet2spec.tex | 363 ++++++++++++++++++++++++++++++++++++++++ 9 files changed, 501 insertions(+), 73 deletions(-) create mode 100644 trbnet2spec.tex diff --git a/daqnet.kilepr b/daqnet.kilepr index 7651f55..09d48b0 100755 --- a/daqnet.kilepr +++ b/daqnet.kilepr @@ -3,8 +3,8 @@ def_graphic_ext= img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 -kileversion=2.0.85 -lastDocument=endpoint.tex +kileversion=2.0.86 +lastDocument=mediainterface.tex masterDocument=main.tex name=daqnet pkg_extIsRegExp=false @@ -176,6 +176,14 @@ Indentation Mode= Mode=LaTeX ReadWrite=true +[document-settings,item:mediainterface.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Indentation Mode= +Mode=LaTeX +ReadWrite=true + [document-settings,item:networkaddresses.tex] Bookmarks= Encoding=UTF-8 @@ -239,7 +247,7 @@ encoding=ISO-8859-15 highlight=LaTeX line=0 mode=LaTeX -open=true +open=false order=14 [item:/local/trb/cvs/daq_docu/tof.tex] @@ -249,7 +257,7 @@ encoding=ISO-8859-15 highlight=LaTeX line=0 mode=LaTeX -open=true +open=false order=13 [item:biblio.bib] @@ -269,7 +277,7 @@ encoding=ISO-8859-15 highlight=LaTeX line=0 mode=LaTeX -open=true +open=false order=15 [item:cts.tex] @@ -279,7 +287,7 @@ encoding=UTF-8 highlight=LaTeX line=9 mode=LaTeX -open=true +open=false order=17 [item:daqcontrol.tex] @@ -319,7 +327,7 @@ encoding=UTF-8 highlight=LaTeX line=177 mode=LaTeX -open=true +open=false order=8 [item:ebmonitorguide.tex] @@ -339,7 +347,7 @@ encoding=UTF-8 highlight=LaTeX line=32 mode=LaTeX -open=true +open=false order=19 [item:endpoint.tex] @@ -350,7 +358,7 @@ highlight=LaTeX line=117 mode=LaTeX open=true -order=11 +order=4 [item:evtbuild.tex] archive=true @@ -359,7 +367,7 @@ encoding=UTF-8 highlight=LaTeX line=155 mode=LaTeX -open=true +open=false order=16 [item:gbe.tex] @@ -369,7 +377,7 @@ encoding=ISO-8859-15 highlight=LaTeX line=0 mode=LaTeX -open=true +open=false order=12 [item:generaldaq.tex] @@ -390,7 +398,7 @@ highlight=LaTeX line=49 mode=LaTeX open=true -order=6 +order=2 [item:installation_ethernet_table.tex] archive=true @@ -399,48 +407,48 @@ encoding=UTF-8 highlight=LaTeX line=122 mode=LaTeX -open=true +open=false order=18 [item:ipudataformat.tex] archive=true -column=0 +column=58 encoding=UTF-8 highlight=LaTeX -line=0 +line=240 mode=LaTeX open=true -order=1 +order=3 [item:lvl1trigger.tex] archive=true -column=74 +column=24 encoding=UTF-8 highlight=LaTeX -line=126 +line=206 mode=LaTeX open=true -order=2 +order=5 [item:main.tex] archive=true -column=23 +column=33 encoding=UTF-8 highlight=LaTeX -line=176 +line=3 mode=LaTeX open=true order=0 [item:mdc.tex] archive=true -column=23 +column=0 encoding=ISO-8859-15 highlight=LaTeX -line=134 +line=123 mode=LaTeX open=true -order=10 +order=1 [item:mdcinstructions.tex] archive=true @@ -452,6 +460,16 @@ mode=LaTeX open=false order=20 +[item:mediainterface.tex] +archive=true +column=6 +encoding=UTF-8 +highlight=LaTeX +line=99 +mode=LaTeX +open=true +order=7 + [item:networkaddresses.tex] archive=true column=0 @@ -459,7 +477,7 @@ encoding=UTF-8 highlight=LaTeX line=78 mode=LaTeX -open=true +open=false order=3 [item:rich.tex] @@ -470,7 +488,7 @@ highlight=LaTeX line=269 mode=LaTeX open=true -order=9 +order=6 [item:richinstructions.tex] archive=true @@ -489,7 +507,7 @@ encoding=UTF-8 highlight=LaTeX line=0 mode=LaTeX -open=true +open=false order=7 [item:showerinstructions.tex] @@ -509,7 +527,7 @@ encoding=UTF-8 highlight=LaTeX line=444 mode=LaTeX -open=true +open=false order=4 [item:software.tex] @@ -519,7 +537,7 @@ encoding=UTF-8 highlight=LaTeX line=559 mode=LaTeX -open=true +open=false order=5 [view-settings,view=0,item:/local/trb/cvs/daq_docu/cts.tex] @@ -583,25 +601,29 @@ CursorColumn=6 CursorLine=122 [view-settings,view=0,item:ipudataformat.tex] -CursorColumn=0 -CursorLine=0 +CursorColumn=58 +CursorLine=240 [view-settings,view=0,item:lvl1trigger.tex] -CursorColumn=74 -CursorLine=126 +CursorColumn=24 +CursorLine=206 [view-settings,view=0,item:main.tex] -CursorColumn=23 -CursorLine=176 +CursorColumn=33 +CursorLine=3 [view-settings,view=0,item:mdc.tex] -CursorColumn=23 -CursorLine=134 +CursorColumn=0 +CursorLine=123 [view-settings,view=0,item:mdcinstructions.tex] CursorColumn=23 CursorLine=35 +[view-settings,view=0,item:mediainterface.tex] +CursorColumn=6 +CursorLine=99 + [view-settings,view=0,item:networkaddresses.tex] CursorColumn=0 CursorLine=78 diff --git a/hubs.tex b/hubs.tex index 13c7323..3c32f3f 100755 --- a/hubs.tex +++ b/hubs.tex @@ -44,9 +44,9 @@ \item Bit 16 -- 23: Errorbits 0 - 7 on IPU channel \item Bit 24 -- 31: Errorbits 16 - 23 on IPU channel \end{itemize} - \item[0x4030 -- 0x403F: Inclusive busy counter]One register for each port counting the time the port is busy (waiting for the reply after a trigger has been sent). Writing to 0x4030 clears all counters. - \item[0x4040 -- 0x404F: Exclusive busy counter] One register for each port counting the time this port and only this port is busy (waiting for the reply after a trigger has been sent). Writing to 0x4040 clears all counters. - \item[0x4050: Global Time] Here, the global time also accessible in register 0x50 is readable. This allows to do a simultaneous readout with the busy counter registers to get exact time information. + \item[0x4030 -- 0x403F: Inclusive busy counter]One register for each port counting the time the port is busy (waiting for the reply after a trigger has been sent). Unit is clock cycles. Writing to 0x4030 clears all counters. + \item[0x4040 -- 0x404F: Exclusive busy counter] One register for each port counting the time this port and only this port is busy (waiting for the reply after a trigger has been sent). Unit is clock cycles. Writing to 0x4040 clears all counters. + \item[0x4050: Global Time] Here, the global time (in microseconds) also accessible in register 0x50 is readable. This allows to do a simultaneous readout with the busy counter registers to get exact time information. \item[0x4060 -- 0x406F: LSM Status $\dagger$] Status of the media interfaces. Bit 2--0: med\_error\_out, Bit 7--4: Link state machine status bits, Bit 23 -- 16: Number of retransmit requests received by media interface, Bit 31 -- 24: Number of retransmit requests sent by media interface. \end{description} diff --git a/installation_trbnet.tex b/installation_trbnet.tex index cbdd3ef..ffa9933 100644 --- a/installation_trbnet.tex +++ b/installation_trbnet.tex @@ -68,25 +68,26 @@ To get the real network address of the hub FPGAs, the FPGA number (1--4) has to \begin{sidewaystable} \begin{center} -\begin{tabular}{|c|c|c|c|c|c|c|c|c|} +\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline -\textbf{Address} & \multicolumn{2}{c|}{\textbf{FPGA 1}} & \multicolumn{2}{c|}{\textbf{FPGA 2}} & \multicolumn{2}{c|}{\textbf{FPGA 3}} & \multicolumn{2}{c|}{\textbf{FPGA 4}} \\ - & \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8} \\ - & \textbf{FOT 1--6} & \textbf{FOT 7--8}& \textbf{FOT 9--14} & \textbf{FOT 15--16}& \textbf{FOT 17--22} & \textbf{FOT 23--24}& \textbf{FOT 25--30} & \textbf{FOT 31--32} \\ +\textbf{Uplink} & \textbf{Address} & \multicolumn{2}{c|}{\textbf{FPGA 1}} & \multicolumn{2}{c|}{\textbf{FPGA 2}} & \multicolumn{2}{c|}{\textbf{FPGA 3}} & \multicolumn{2}{c|}{\textbf{FPGA 4}} \\ +& & \multicolumn{2}{c|}{Port 0 on central} & \multicolumn{2}{c|}{Port 1 on central} & \multicolumn{2}{c|}{Port 2 on central} & \multicolumn{2}{c|}{Port 3 on central} \\ +& & \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8}& \textbf{Port 1--6} & \textbf{Port 7--8} \\ +& & \textbf{FOT 1--6} & \textbf{FOT 7--8}& \textbf{FOT 9--14} & \textbf{FOT 15--16}& \textbf{FOT 17--22} & \textbf{FOT 23--24}& \textbf{FOT 25--30} & \textbf{FOT 31--32} \\ \hline \hline -1000 & \multicolumn{3}{c|}{P0 S4 0-D} & -- & \multicolumn{4}{c|}{P1 S2 0-F} \\ -1010 & P1 S0 0-5 & \multicolumn{3}{c|}{P1 S5 6-F} & P1 S1 0-5 & \multicolumn{3}{c|}{P1 S0 6-F} \\ -1020 & \multicolumn{3}{c|}{P0 S0 0-D} & -- & \multicolumn{3}{c|}{P0 S5 0-D} & -- \\ -1030 & \multicolumn{3}{c|}{P0 S1 0-D} & -- & \multicolumn{3}{c|}{P0 S2 0-D} & -- \\ -1040 & \multicolumn{3}{c|}{P0 S3 0-D} & -- & \multicolumn{4}{c|}{P1 S3 0-F} \\ -1050 & \multicolumn{4}{c|}{P1 S4 0-F} & P1 S5 0-5 & \multicolumn{3}{c|}{P1 S1 6-F} \\ -1100 & \multicolumn{4}{c|}{P2 S0 0-F} & \multicolumn{4}{c|}{P3 S0 0-F} \\ -1110 & \multicolumn{4}{c|}{P3 S1 F-0} & \multicolumn{4}{c|}{P2 S1 F-0} \\ -1120 & \multicolumn{4}{c|}{P3 S2 F-0} & \multicolumn{4}{c|}{P2 S2 F-0} \\ -1130 & \multicolumn{4}{c|}{P3 S3 F-0} & \multicolumn{4}{c|}{P2 S3 F-0} \\ -1140 & \multicolumn{4}{c|}{P2 S4 0-F} & \multicolumn{4}{c|}{P3 S4 0-F} \\ -1150 & \multicolumn{4}{c|}{P2 S5 0-F} & \multicolumn{4}{c|}{P3 S5 0-F} \\ +8101 P0 & 1000 & \multicolumn{3}{c|}{P0 S4 0-D} & -- & \multicolumn{4}{c|}{P1 S2 0-F} \\ +8101 P1 & 1010 & P1 S0 0-5 & \multicolumn{3}{c|}{P1 S5 6-F} & P1 S1 0-5 & \multicolumn{3}{c|}{P1 S0 6-F} \\ +8101 P2 & 1020 & \multicolumn{3}{c|}{P0 S0 0-D} & -- & \multicolumn{3}{c|}{P0 S5 0-D} & -- \\ +8101 P3 & 1030 & \multicolumn{3}{c|}{P0 S1 0-D} & -- & \multicolumn{3}{c|}{P0 S2 0-D} & -- \\ +8101 P4 & 1040 & \multicolumn{3}{c|}{P0 S3 0-D} & -- & \multicolumn{4}{c|}{P1 S3 0-F} \\ +8101 P5 & 1050 & \multicolumn{4}{c|}{P1 S4 0-F} & P1 S5 0-5 & \multicolumn{3}{c|}{P1 S1 6-F} \\ +8111 P0 & 1100 & \multicolumn{4}{c|}{P2 S0 0-F} & \multicolumn{4}{c|}{P3 S0 0-F} \\ +8111 P1 & 1110 & \multicolumn{4}{c|}{P3 S1 F-0} & \multicolumn{4}{c|}{P2 S1 F-0} \\ +8111 P2 & 1120 & \multicolumn{4}{c|}{P3 S2 F-0} & \multicolumn{4}{c|}{P2 S2 F-0} \\ +8111 P3 & 1130 & \multicolumn{4}{c|}{P3 S3 F-0} & \multicolumn{4}{c|}{P2 S3 F-0} \\ +8111 P4 & 1140 & \multicolumn{4}{c|}{P2 S4 0-F} & \multicolumn{4}{c|}{P3 S4 0-F} \\ +8111 P5 & 1150 & \multicolumn{4}{c|}{P2 S5 0-F} & \multicolumn{4}{c|}{P3 S5 0-F} \\ \hline \end{tabular} \caption{Connected OEPs on each MDC AddOn FPGA. Plane (P) and Sector (S) numbers are counted starting at 0. Port numbers refer to the bit numbers inside the Hub status and control registers. Port 0 is always the uplink.} diff --git a/lvl1trigger.tex b/lvl1trigger.tex index bd2f359..91eec09 100755 --- a/lvl1trigger.tex +++ b/lvl1trigger.tex @@ -226,12 +226,13 @@ The CTS will include features to set these bits via slow control either to a sta \textbf{Bits} & \textbf{Name} & \textbf{Description} \\ \hline\hline 0 & Suppress Output & Run a normal trigger as requested but suppress writing all data to the IPU channel. Small status words or debug output are acceptable. \\ -1 - 6 & t.b.d. & Not yet defined \\ +1 -- 6 & t.b.d. & Not yet defined \\ 7 & no timing trigger & Marks a LVL1 trigger which was not preceded by a timing trigger (e.g. calibration) \\ -8 - 10 & RICH & RICH data configuration bits \\ -11 - 13 & Shower & Not yet defined \\ -14 - 16 & MDC & Not yet defined \\ -17 - 23 & t.b.d. & Not yet defined \\ +8 -- 10 & RICH & RICH data configuration bits \\ +11 -- 13 & Shower & Not yet defined \\ +14 -- 16 & MDC & Not yet defined \\ +17 & TRB & Suppress sending all headers from TDCs on TRB \\ +18 -- 23 & t.b.d. & Not yet defined \\ \hline \end{tabularx} \caption{Trigger Information Bits.} diff --git a/mdc.tex b/mdc.tex index 7d8c34c..f06468c 100755 --- a/mdc.tex +++ b/mdc.tex @@ -40,18 +40,27 @@ Each word sent by an OEP can be of three types as shown in table \ref{MDCDataFor \textbf{Name} & \textbf{Code} & \textbf{Content} & \textbf{Note}\\ \hline \hline -Basic Information & 0x00 & Bit 15 -- 0: Internal trigger number, Bit 16: Short MBO, Bit 17: Long MBO, Bit 18: CMS active & \\ +Basic Info. & 0x00 & Bit 15 -- 0: Internal trigger number, Bit 16: Short MBO, Bit 17: Long MBO, Bit 18: CMS active & \\ Token Missing & 0x01 & Bit 23 -- 0: Number of missing token & 1\\ Phys. Triggers & 0x02 & Bit 23 -- 0: Number of received triggers & 1 \\ Calib. Triggers & 0x03 & Bit 23 -- 0: Number of received calibration triggers & 1 \\ Discarded Hit 1 & 0x04 & Bit 23 -- 0: Number of discarded hit~1 words from TDC due to threshold setting & 1 \\ Discarded Hit 0 & 0x05 & Bit 23 -- 0: Number of discarded hit~0 words from TDC due to threshold setting & 1 \\ Discarded Words & 0x06 & Bit 23 -- 0: Number of discarded words due to limit of words per event & 1 \\ -Truncated Events& 0x07 & Bit 23 -- 0: Number of truncated events due to limit of words per event & 1 \\ +Truncated Evt & 0x07 & Bit 23 -- 0: Number of truncated events due to limit of words per event & 1 \\ Single Hit 1 & 0x08 & Bit 23 -- 0: Number of single, double or triple hit 1 & 1 \\ Single Hit 0 & 0x09 & Bit 23 -- 0: Number of single, double or triple hit 0 & 1 \\ Retransmit Req. & 0x0A & Bit 11 -- 0: Number of retransmit requests sent, Bit 23 -- 12: Number of retransmit requests received & 1\\ Words & 0x0B & Bit 23 -- 0: Number of words given to data handler & 1\\ +Invalid Trg. & 0x0C & Bit 15 -- 0: Number of invalid triggers received & 1 \\ +Multiple Trg. & 0x0D & Bit 15 -- 0: Number of multiple triggers received & 1 \\ +Spikes Trg. & 0x0E & Bit 15 -- 0: Number of spikes on CMS received & 1 \\ +Spurious Trg. & 0x0F & Bit 15 -- 0: Number of spurious triggers received & 1 \\ +Idle Time & 0x10 & Bit 23 -- 0: Idle time of the trigger handler state machine in ${{\mu}s}$ & \\ +Init Time & 0x11 & Bit 23 -- 0: Time the OEP spent for reinitalizations in ${{\mu}s}$ & \\ +Calib Time & 0x12 & Bit 23 -- 0: Time the OEP spent with calibration in ${{\mu}s}$ & \\ +Readout Time & 0x13 & Bit 23 -- 0: Time while reading data from TDC in ${{\mu}s}$ & \\ +Waiting Time & 0x14 & Bit 23 -- 0: Time spent with various small waits in ${{\mu}s}$ & \\ Dummy Word & 0x1E & Dummy data word. Sent in every event when selected by CCR2 Bit 22 (see table \ref{MDCCommonCtrlReg2}). Bit 23 -- 16: Lower 8 bit of trigger number. Bit 11 -- 0: Word counter & \\ Debug Word & 0x1F & Debug word. Sent in every event when selected by CCR2 Bit 30 (see table \ref{MDCCommonCtrlReg2}). Bit 15 -- 0: Trigger number & \\ \hline @@ -61,6 +70,8 @@ Debug Word & 0x1F & Debug word. Sent in every event when selected by CCR2 B \end{center} \end{table} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Memory Map} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -343,11 +354,6 @@ The ADC monitoring most voltages on each OEP can be accessed using register addr \item[Bit 20] Processing a calibration trigger \end{description} \item[0x9008: \filename{Send\_Token\_To\_MB} status register] The status register of the entity that sends and receives the token to the MBO. Bits 3..0 show the status of the state machine. - \item[0x9110: Idle Time] Timer. Counts how long the trigger handler state machine is idle. Values are given in microseconds. - \item[0x9111: Initialization Time] Timer. Counts how long the OEP spends initializing the MBO. Values are given in microseconds. - \item[0x9112: Calibration Time] Timer. Counts how long the OEP spends to load the calibration settings to the TDC. Values are given in microseconds. - \item[0x9113: Readout Time] Timer. Counts how long the trigger handler spends waiting for data. The time from sending the token to the MBO until it returns is measured. Values are given in microseconds. - \item[0x9114: Waiting Time] Timer. Counts how long the trigger handler state machine waits for the data handler. I.e. when buffers are almost full or waiting for the LVL1 trigger information. Values are given in microseconds. \end{description} % STATISTICS_DATA_OUT <= x"00" & std_logic_vector(timer_fifo_almost_full(addr)); diff --git a/mediainterface.tex b/mediainterface.tex index 599702d..1cbbfea 100644 --- a/mediainterface.tex +++ b/mediainterface.tex @@ -49,6 +49,25 @@ \subsection{ECP2M FOT Interface} \subsubsection{Status Register} + +\begin{table} +\begin{center} +\begin{tabularx}{\textwidth}{|c|c|X|} +\hline +\textbf{Address} & \textbf{Register} & \textbf{Description} \\ +\hline\hline +9200-9207 & 0 & Register 0 of all 8 media links \\ +9208-920F & 1 & Register 1 of all 8 media links \\ +9210-9217 & 2 & Register 2 of all 8 media links \\ +9218-921F & 3 & Register 3 of all 8 media links \\ +9220-922F & Debug & 2 Debug Registers for each of the 8 media links \\ +\hline +\end{tabularx} +\caption{Status Registers of the FOT media interface - mapping in MDC Hub} +\label{FOTInterfaceRegsMDCHub} +\end{center} +\end{table} + \begin{table}[hbtp] \begin{center} \begin{tabularx}{\textwidth}{|c|c|X|} @@ -65,7 +84,8 @@ 0 & 19 & TX allow \\ 0 & 20 & Restart transmission from given RAM position \\ 0 & 21 & Request a restart of transmission \\ -0 & 31 -- 24 & Request restart position \\ +0 & 22 & load EOP comma with checksum \\ +%0 & 31 -- 24 & Request restart position \\ \hline \multicolumn{3}{|l|}{RX Full Packets}\\ \hline @@ -99,9 +119,15 @@ 2 & 18 & packet in transit (pkt\_in\_transit) \\ 2 & 31 -- 24 & Request retransmission position (request\_position) \\ \hline +\multicolumn{3}{|l|}{RX Comma Handler}\\ +\hline +3 & 7 -- 0 & Counter for CRC mismatch \\ +3 & 15 -- 8 & Counter for CRC found in wrong position \\ +3 & 23 -- 16 & Counter for code violations \\ +3 & 31 -- 24 & Counter for invalid kontrol characters \\ +\hline \end{tabularx} \caption{Status Registers of the FOT media interface} \label{MediaInterfaceFOTRegs} \end{center} \end{table} - diff --git a/slowcontrol.tex b/slowcontrol.tex index 80a059a..3716e3a 100755 --- a/slowcontrol.tex +++ b/slowcontrol.tex @@ -221,8 +221,8 @@ The common status and control registers are further explained in the next sectio 40 & information ROM 0 & ROM0 & Compile Time (set by generic) (r)\\ 41 & information ROM 1 & ROM1 & Design Version (set by generic) (r) \\ 42 & information ROM 2 & ROM2 & Hardware Information (set by generic) (r)\\ -50 & global time & TME & Global Time (r/w)\\ -51 & time since trigger & TSTR & Time since last timing trigger (r)\\ +50 & global time & TME & Global Time in microseconds (r/w)\\ +51 & time since trigger & TSTR & Time since last timing trigger in clock cycles (r)\\ 80 -- BF & user status reg & SRn & User status registers \\ C0 -- FF & user control reg & CRn & User control registers \\ 0100 -- 6FFF & reserved & --- & Reserved addresses on internal data port (e.g. for monitoring and other features)\\ @@ -442,7 +442,7 @@ A detailed bit definition can be found in table~\ref{CommonCtrlReg2}. 15 & reboot FPGA \\ 14 -- 11 & reserved \\ 10 & reset sequence counter \\ -9 & Reinitialize Frontends \\ +9 & Reinitialize Frontends \\ 8 -- 6 & reserved \\ 5 & reset status registers / error counters \\ 4 & reset persistent error flags \\ diff --git a/software.tex b/software.tex index 5efbc7f..d798a06 100755 --- a/software.tex +++ b/software.tex @@ -557,3 +557,12 @@ The default values for the settings vary depending on the selected plot. They ca \item[oep3V] Voltage monitor for +3V and -3V input on OEP \end{description} + + +\section{Logger} +All monitoring tools are supposed to write important messages to the central logile. +The command is as follows: +\\\verb!logger -p local1.info -t DAQ $message! +\\Message should follow the general rule that it starts with a system identifier with few letters (like DAQ, EB, MDC...). Then a padding to add up to 10 characters including the identifier. The type of message is specified by ,, for information, warning or error messages respectively. This defined part is then followed by the message. + +All log messages are written to one central file on lxhadesdaq: \verb!/home/hadeslog/messages!. \ No newline at end of file diff --git a/trbnet2spec.tex b/trbnet2spec.tex new file mode 100644 index 0000000..6389253 --- /dev/null +++ b/trbnet2spec.tex @@ -0,0 +1,363 @@ +\documentclass[11pt,a4paper,twoside]{scrartcl} %twoside + +%Einstellungen der Seitenr�nder +\usepackage[left=3.5cm,right=3cm,top=2.5cm,bottom=2.5cm,includeheadfoot]{geometry} + +\usepackage[utf8]{inputenc} +\usepackage{amsfonts} +\usepackage[american]{babel} +\usepackage[T1]{fontenc} +\usepackage[pdftex]{graphicx} +\usepackage{pslatex} +\usepackage{xcolor} +\usepackage{array} +\usepackage{rotating} +\usepackage{multirow} +\usepackage{tabularx} +\usepackage{url} +\linespread{1.15} +\usepackage{booktabs} +\usepackage{longtable} +\usepackage{ltxtable} +\usepackage{upgreek} +\usepackage{listings} +\usepackage{scrtime} +\usepackage{lscape} + + + +\definecolor{darkblue}{rgb}{.1,.1,.6} +\usepackage[linkbordercolor={0 0 0}, + pdfborder={0 0 0}, + bookmarks, + citecolor=blue, + linkcolor=darkblue, + colorlinks=true, + urlcolor=darkblue]{hyperref} +\usepackage{cite} + + +\newcolumntype{C}{>{\centering\arraybackslash}X} + +\usepackage{fancyhdr} +\pagestyle{headings}%{fancy} +\fancyhf{} +\fancyhead[R]{\nouppercase{\leftmark}} +\renewcommand{\headrulewidth}{0.5pt} +\fancyfoot[C]{\thepage} +%\renewcommand{\footrulewidth}{0} +%\usepackage[sort,square]{natbib} +%\usepackage{mathptmx} +%\usepackage{pslatex} + +\title{TrbNet v2.0 Specification\\DRAFT} +\date{\today ~-~\thistime} +\author{Jan Michel} + + +\newcommand{\filename}[1]{\textit{#1}} +\newcommand{\portname}[1]{\textsc{#1}} +\newcommand{\genericname}[1]{\textsc{#1}} +\newcommand{\constname}[1]{\textsc{#1}} +\newcommand{\netname}[1]{\textsc{#1}} +\newcommand{\cmdname}[1]{\texttt{#1}} +\bibliographystyle{alpha} + +\usepackage{remreset} +\makeatletter\@removefromreset{footnote}{chapter}\makeatother + +\lstset{ language = VHDL, + numbers =left, + stepnumber =1, + frame =single, + captionpos=b, + breaklines=true + basicstyle=\small, + identifierstyle=\small, + stringstyle=\small, + numberstyle=\small, + fontadjust=false} + +\begin{document} +\newcounter{line} +\newcounter{ct} + +\maketitle +\clearpage +% \tableofcontents +% \clearpage + +\part{Preface} +\section{Basic Requirements} +The main premisses for the second generation of TrbNet +\begin{itemize} + \item Reduce the complexity of logic + \begin{itemize} + \item No concurrent read signals to remove sbuf logic + \item read signals should always be high, even if no data is provided + \item read signals have the usual latency of one clock cycle - if it is high, data can be accepted in the next clock cycle + \end{itemize} + \item Increase bandwidth + \item Reduce Latency (or at least keep at the same level) + \item Inherent checksum / error correction on media level + \item Greater use of 8b/10b comma characters + \item No compatibility to TLK2501 transceiver on TRBv2 + \item Increase link speed to increase bandwidth / reduce latency to about 3 GBit/s (or 2.5 GBit/s if we find that hardware can not reach this speed) + \item no init / reply active / passive endpoint mixtures + \item Streaming mode should be available - all endpoints send data to hub - then either merged based on timestamp or simply forwarded +\end{itemize} + +\section{Glossary} +\begin{description} + \item[Data Word] A data word are 32 Bit + \item[Buffer] (as in end-of-buffer packet or buffer size) The receiver buffers + \item[Block] A block of data is a bunch of up to 8 data words transmitted on the media interface in one block and that is ended by a COP or EOP word. +\end{description} + +\section{Operation Modes} +\begin{itemize} + \item Media Interfaces are running at 3 GBit/s raw data rate (16 Bit @ 150 MHz) + \item Media Interfaces can be throttled to 2 GBit/s raw data rate (16 Bit @ 100 MHz) + \item Endpoints can use 16 Bit or 32 Bit data word size + \item 16 bit operation mode may be implemented, but 32 bit bus width is preferred + \item Endpoints can choose a frequency between 100 MHz and 150 MHz. Note that a 16 bit interface will be throttled when running with a speed below 150 MHz while the 32 bit interface can run as slow as 75 MHz before throttling is needed - nonetheless latencies are reduced when running at higher speeds. +\end{itemize} + + +\part{Network Layers} +\section{Media Layer} +\begin{itemize} + \item The basic structure of TrbNet v1.0 is kept. Packet types and channel numbers are reused without change. End-of-Buffer and Acknowledge packets are used in the same manner. + \item No IDLE characters are allowed inside a packet + \item The start (SOP) and end (EOP) of each packet is formed by comma characters + \item The length of a packet is an arbitrary multiple of 32 bit. The shortest possible packet (32 Bit) has no payload, the maximum size is limited by the buffer size on the receiver. In case of a buffer of one BRAM, divided into two blocks (like in the old system) the limit is 480 Byte payload or a total size of 484 Byte including SOP and EOP. + \item In the middle of a packet, an arbitrary number of ``carrier extend'' (COP - continuation of packet) commas can be sent + \begin{itemize} + \item A slow sender (e.g. with 16 bit data busses running at 100 MHz) will add COP at a rate of 1 COP per 2 32 Bit words of data to reduce the total raw data rate to the provided 2 GBit/s. + \item A slow receiver can request the insertion of COP during link start-up. + \item COP will be inserted at a rate of at least one COP per 8 data words to guarantee a good balance between error correction and data payload. Additionally, this has a direct influence on the link latency since the media interface is allowed to forward data only if the checksum as been found to be correct. + \item A COP may directly follow a SOP or may directly be followed by an EOP if no data is sent in between. + \end{itemize} + + \item Each COP and EOP carry a 8 Bit CRC in the high byte. The media interface keeps received data in an internal buffer until a COP/EOP word has been received and the checksum has been checked. + \item In case of an transmission error or an invalid checksum, the receiver may request a retransmission of data. + \begin{itemize} + \item Retransmission always starts at the at the beginning of one block of data + \item Retransmission is requested by sending a REQ comma containing a 8 bit position identifier + \item When receiving a retransmission request, the original sender sends a BGN (Begin) comma containing the 8 bit position identifier followed by all data that was already sent, starting with the requested buffer position. + \item Retransmission is handled on a point-to-point basis. Hence, a buffer size of 256 16 bit words is sufficient. + \item All comma characters despite IDLE are part of the retransmitted data and are stored in the data buffer + \end{itemize} + \item A CTRL comma character may be inserted any time to negotiate link level settings. It is used during start-up to signal that the receiver is ready, to inform about the link speed (if throttling is needed). The meaning depends on the data send in the upper 8 bits. + \item The CRC-8 checksum is the last 8 bit word transferred with each packet. It covers the full packet, including the data representation of the SOP comma character. The COP/EOP comma character is not included in the checksum. +\end{itemize} + +\section{Multiplexer} +\subsection{Receiver} +\begin{itemize} + \item Data from the media interface comes either as 16 Bit or 32 Bit words + \item SOP / EOP are included, but are used for routing purposes only and are discarded + \item Data is forwarded in a 16+5 or 32+4 scheme (see below) to the IO-Buffers without any comma characters +\end{itemize} + +\subsection{Sender} + \begin{itemize} + \item The multiplexer inserts SOP / EOP where needed + \item An EOP may be inserted in any place (at a 32 bit boundary in 16 bit mode) if a higher priority channel requests sending data. The multiplexer takes care to add an SOP when resuming the transfer. + \end{itemize} + + +\section{IO-Buffer} +No changes in behavior needed in case of IO-Buffers. + +\section{API} +No change in behavior needed. Structure is simplified since no packet headers have to be generated. + +\section{Trigger / Data / IPU Handler} +Ipu\_handler and ipu\_data entities can be merged. + +The read-out should run in a streaming mode: CTS read-out request are only sent to the GbE-Interface, all FEE send data in push mode, Hub transports data from all ports in round-robin manner ordered by event number. + +\section{SlowControl / RegIO} +No necessary changes, but RegIO should be rewritten in any case. Data format can be compressed, multiple random accesses should be possible. + + +\part{Data Format} +\section{Comma Characters} +\begin{table}[ht] +\begin{center} +\begin{tabular}{|c|c|c|c|} + \hline + \textbf{Name} & \textbf{Full Name} & \textbf{K Character} & \textbf{D Character}\\ +\hline\hline +IDLE& Idle & BC & 50 or C5 \\ +SOP & Start of Packet & FB & Channel / Packet Type \\ +EOP & End of Packet & FD & CRC \\ +COP & Continuation of Packet & F7 & CRC \\ +BGN & Begin of Transmission & 1C & Buffer Position\\ +REQ & Retransmit Request & 7C & Buffer Position\\ +CTRL & Control & & Control Message \\ +\hline +\end{tabular} +\caption{Comma Characters} +\end{center} +\end{table} + +\begin{table}[ht] +\begin{center} +\begin{tabular}{|c|c|} + \hline + \textbf{Bits} & \textbf{Name} \\ +\hline\hline +31 - 0 & Data \\ +34 - 32 & Packet Type \\ +35 & Packet End \\ +\hline +\end{tabular} +\caption{Internal 32 Bit Data Format} +\end{center} +\end{table} + +\begin{table}[ht] +\begin{center} +\begin{tabular}{|c|c|} + \hline + \textbf{Bits} & \textbf{Name} \\ +\hline\hline +15 - 0 & Data \\ +18 - 16 & Packet Type \\ +19 & Packet End \\ +20 & High Word (1) / Low Word (0)\\ +\hline +\end{tabular} +\caption{Internal 16 Bit Data Format} +\end{center} +\end{table} + + +\begin{table}[ht] +\begin{center} +\begin{tabular}{*{4}{|*{4}{p{0.4cm}}}|} + \hline + \textbf{15} & & & & & & & \textbf{8} & \textbf{7} & & & & & & & \textbf{0} \\ +\hline\hline +R & R & C & C & T & 0 & 0 & 1 & \multicolumn{8}{|c|}{SOP}\\ +\hline +\multicolumn{16}{|c|}{Addr Target}\\ +\hline +\multicolumn{16}{|c|}{Addr Sender}\\ +\hline +\multicolumn{16}{|c|}{Length}\\ +\hline +\multicolumn{8}{|c|}{Seq. Number} & \multicolumn{4}{|c}{res.} & \multicolumn{4}{|c|}{Type}\\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{EOP}\\ + +\hline +\end{tabular} +\caption[Packet Type HDR]{Packet Type HDR. C: Channel, T: Init/Reply, R: reserved} +\end{center} +\end{table} + + +\begin{table}[ht] +\begin{center} +\begin{tabular}{*{4}{|*{4}{p{0.4cm}}}|} + \hline + \textbf{15} & & & & & & & \textbf{8} & \textbf{7} & & & & & & & \textbf{0} \\ +\hline\hline +R & R & C & C & T & 0 & 1 & 1 & \multicolumn{8}{|c|}{SOP}\\ +\hline +\multicolumn{16}{|c|}{Statusbits 31 -- 16}\\ +\hline +\multicolumn{16}{|c|}{Statusbits 15 -- 0}\\ +\hline +\multicolumn{8}{|c|}{Seq. Number} & \multicolumn{4}{|c}{res.} & \multicolumn{4}{|c|}{Type}\\ +\hline +\multicolumn{16}{|c|}{CRC-16}\\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{EOP}\\ + +\hline +\end{tabular} +\caption[Packet Type TRM]{Packet Type TRM. C: Channel, T: Init/Reply, R: reserved} +\end{center} +\end{table} + +\begin{table}[ht] +\begin{center} +\begin{tabular}{*{4}{|*{4}{p{0.4cm}}}|} + \hline + \textbf{15} & & & & & & & \textbf{8} & \textbf{7} & & & & & & & \textbf{0} \\ +\hline\hline +R & R & C & C & T & 0 & 0 & 0 & \multicolumn{8}{|c|}{SOP}\\ +\hline +\multicolumn{16}{|c|}{Data Word 0H}\\ +\hline +\multicolumn{16}{|c|}{Data Word 0L}\\ +\hline +\multicolumn{16}{|c|}{Data Word 1H}\\ +\hline +\multicolumn{16}{|c|}{Data Word 1L}\\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{COP}\\ +\hline +\multicolumn{16}{|c|}{Data Word 2H}\\ +\hline +\multicolumn{16}{|c|}{Data Word 2L}\\ +\hline +\multicolumn{16}{|c|}{Data Word 3H}\\ +\hline +\multicolumn{16}{|c|}{Data Word 3L}\\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{EOP}\\ +\hline +\end{tabular} +\caption[Packet Type DAT]{Packet Type DAT. C: Channel, T: Init/Reply, R: reserved. COP words are generated by the media interface and may be inserted at any 32 bit data boundary. SOP and EOP words are generated by the multiplexer. A EOP / SOP pair may be inserted at any 32 bit boundary.} +\end{center} +\end{table} + +\begin{table}[ht] +\begin{center} +\begin{tabular}{*{4}{|*{4}{p{0.4cm}}}|} + \hline + \textbf{15} & & & & & & & \textbf{8} & \textbf{7} & & & & & & & \textbf{0} \\ +\hline\hline +R & R & C & C & T & 0 & 1 & 0 & \multicolumn{8}{|c|}{SOP}\\ +\hline +\multicolumn{8}{|c|}{Buffer Size} & \multicolumn{8}{|c|}{Buffer Sequence Number} \\ +\hline +\multicolumn{16}{|c|}{CRC-16}\\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{EOP}\\ + +\hline +\end{tabular} +\caption[Packet Type EOB]{Packet Type EOB. C: Channel, T: Init/Reply, R: reserved} +\end{center} +\end{table} + +\begin{table}[ht] +\begin{center} +\begin{tabular}{*{4}{|*{4}{p{0.4cm}}}|} + \hline + \textbf{15} & & & & & & & \textbf{8} & \textbf{7} & & & & & & & \textbf{0} \\ +\hline\hline +R & R & C & C & T & 1 & 0 & 1 & \multicolumn{8}{|c|}{SOP}\\ +\hline +\multicolumn{8}{|c|}{Buffer Size} & \multicolumn{8}{|c|}{Buffer Sequence Number} \\ +\hline +\multicolumn{16}{|c|}{Reserved} \\ +\hline +\multicolumn{8}{|c|}{CRC-8} & \multicolumn{8}{|c|}{EOP}\\ + +\hline +\end{tabular} +\caption[Packet Type ACK]{Packet Type ACK. C: Channel, T: Init/Reply, R: reserved} +\end{center} +\end{table} + + +\section{Example Data Transfer} + +\end{document} \ No newline at end of file -- 2.43.0