Changeset 10155 for firmware/FAD/doc


Ignore:
Timestamp:
02/15/11 12:07:05 (14 years ago)
Author:
neise
Message:
highly unstable version !!!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • firmware/FAD/doc/memory_manager.tex

    r10150 r10155  
    1941940x200A  & trg pos 3     & trg pos 2     & trg pos 1     & trg pos 0     \\
    1951950x200B  & ROI 3 & ROI 2 & ROI 1 & ROI 0 \\
    196 0x200C  & data adc3     & data adc2     & data adc1     & data adc0     \\
     1960x200C  & -fill- & -fill- & -fill- & -fill-  \\
     1970x200D  & data adc3     & data adc2     & data adc1     & data adc0     \\
    1971980x20..  &&&& ... \\
    198 0x206F  & data adc3     & data adc2     & data adc1     & data adc0     \\
     1990x2070  & data adc3     & data adc2     & data adc1     & data adc0     \\
    199200\hline
    2002010x20..  &&&& ... \\
     
    2032040x23??  & trg pos 3     & trg pos 2     & trg pos 1     & trg pos 0     \\
    2042050x23??  & ROI 3         & ROI 2         & ROI 1         & ROI 0 \\
     2060x23??  & -fill- & -fill- & -fill- & -fill-  \\
    2052070x23??  & data adc3     & data adc2     & data adc1     & data adc0     \\
    2062080x23..  &&&& ... \\
     
    318320        unsigned short start_cell;
    319321        unsigned short roi;
     322        unsigned short filling;
    320323        unsigned short adc_data[];
    321324}  __attribute__((__packed__)) PCHANNEL;
     
    327330\end{verbatim}
    328331
     332\subsection{mem manager calculations}
     333
     334Memory manager knows the size of FADs internal data RAM. This is implemented as VHDL-Generics called {\tt RAM_ADD_WIDTH_64B}
     335and {\tt RAM_ADD_WIDTH_16B}. Since word width is 64bit on the input side and 16bit on the outpt two generics are used.
     336Currently the values are:
     337\begin{table}[htbp]
     338\begin{tabular}{ll}
     339RAM_ADD_WIDTH_64B & 12 \\
     340RAM_ADD_WIDTH_16B & 14 \\
     341\end {tabular}
     342\caption{values of RAM width}
     343\label{RAM_GENERICS}
     344\end{table}
     345
     346Which results in
     347\begin{equation}
     348\mathtt{RAM size} = 2^{12} \cdot 8 byte= 2^14 * 2 byte = 32768 byte .
     349\end{equation}
     350
     351Now the memory manager is able to calculate the number of Events, fitting into this RAM.
     352
     353The number of samples of each channel beeing digitized is called region of interest(ROI). Since the ROI of each of the 36 input channel may be defined independently, but the RAM is organized in 64bit words on the input side, the memory manager needs to calculate the effective ROI of each channel first. The DRS Chips are digitized in a parallel manner, but their 9 channels are digitized serially. So first each DRS is ordered to output its channel 0 data, until as many samples are digitized as the maximum of all channel 0 ROIs is.
     354
     355In the states called MAX_ROI0..2 the array containing the maxima of each group of channels is calculated.
     356In addition the so called channel size array is calculated. This is the number of 16bit words which is needed to store a group of
     357channels in the W5300 FIFO. The header is included into the group of channels 0, while the package footer is included into group of channels 9.
     358
     359In the next state called FIFO CALC. Here
     360
     361
    329362
    330363\end{document}
Note: See TracChangeset for help on using the changeset viewer.