Commit c49edce7 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

doc/design-notes: few words on the TDC VHDL module [wip]

parent 043329c6
Backup_*.cdr
\#*\#
*.texi
*.wb
*.aux
*.info
*.ky
*.log
*.toc
*.cp
*.fn
*.in~
*.pdf
*.pg
*.tp
*.txt
*.vr
#
# Makefile for the documentation directory
#
# Copyright 1994,2000,2010,2011 Alessandro Rubini <rubini@linux.it>
#
#################
# There is not basenames here, all *.in are considered input
INPUT = $(wildcard *.in)
TEXI = $(INPUT:.in=.texi)
INFO = $(INPUT:.in=.info)
HTML = $(INPUT:.in=.html)
TXT = $(INPUT:.in=.txt)
PDF = $(INPUT:.in=.pdf)
ALL = $(PDF)
MAKEINFO ?= makeinfo
%.texi: %.in
@rm -f $@
sed -f ./infofilter $< > $@
emacs -batch --no-site-file -l fixinfo $@
chmod -w $@
%.pdf: %.texi
texi2pdf --batch $<
#%.info: %.texi
# $(MAKEINFO) $< -o $@
#%.html: %.texi
# $(MAKEINFO) --html --no-split -o $@ $<
#%.txt: %.texi
# $(MAKEINFO) --no-headers $< > $@
##############################################
.PHONY: all images check terse clean install
.INTERMEDIATE: $(TEXI)
all: images $(ALL)
$(MAKE) terse
images::
if [ -d images ]; then $(MAKE) -C images || exit 1; fi
check: _err.ps
gs -sDEVICE=linux -r320x200x16 $<
terse:
for n in cp fn ky pg toc tp vr aux log; do rm -f *.$$n; done
rm -f *~
clean: terse
rm -f $(ALL) $(TEXI)
install:
......@@ -397,7 +397,7 @@ this something and the ACAM's internal time base is known (or better, fixed). In
@item @code{subcycle_offset} - offset between the ACAM's and TDC core's timescales.
@end itemize
It's very simple if we work in local time base mode, as
It is very simple if we work in local time base mode, as
the counters need not be aligned to any other counters. The WR mode is a bit more complicated:
TDC start occurs every 16 reference clock ticks, but a PPS pulse from the Csync
unit can come anytime. The most straightformward method here would be to reset the TDC start
......@@ -413,6 +413,28 @@ bits of the Csync coarse counter and the subcycle counter (@code{subcycle_offset
@subsection Input stage and TDC control
This part of the core takes care of the coarse input pulse, TDC start and stop enable singnals. It is responsible for:
@itemize
@item @b{Sampling the coarse pulse input.} This is done in the @code{p_sync_trigger} process which implements
a modified 3-stage synchronizer with enable signal ANDed with the input signal at each synchronization stage,
minimizing the input's on/off reaction time.
@item @b{Safely enable and disable the TDC input}.
There are three processes involved here: @code{p_safety_counter}, which disables the input upon the rising edge
of the incoming pulse and re-enables it a certain time (@code{c_FALLING_REENABLE_TIMEOUT}) after the falling
edge of the currently processed pulse. This prevents the core from generating incorrect timestamps when the
input pulses come too close to each other or in case of poor quality or noise on the falling edge of the signal, which
could be misinterpreted as a spurious input event. Even if the signal quality is fine, such spurious pulses may
occur while plugging the trigger input to a live signal. The remaining processes: @code{p_gen_acam_start_dis}
and @code{p_gen_acam_stop} drive the TDC's START and STOP disable signals. The former ensures that the start
input is not enabled in the middle of a rising edge of the 7.125 MHz start clock. The latter enables the stop
mainput when the TDC has received at least one valid start pulse and while we are not in the ``dead'' period.
@item @b{Reject pulses that are not within the requirements.}
@end itemize
@subsection Host interface
......@@ -486,8 +508,6 @@ have shown that the error between DDMTD calibration mechanism and the external T
For more information on DDMTD phase/time measurement techniques please refer to @ref{book:toms_msc}.
@chapter Long term stability
@chapter Carrier implementation example
This chapter shows how to implement the FD core on an FMC carrier, taking the production design of the SVEC VME carrier equipped with two Fine Delays as an example.
......
This diff is collapsed.
;; use:
;; emacs -batch -l ./fixinfo.el <file>
;; or, better:
;; emacs -batch --no-site-file -l ./fixinfo.el <file>
(defun fixinfo (file)
(find-file-other-window file)
(message (concat "Maxing texinfo tree in " file))
(texinfo-all-menus-update)
(texinfo-every-node-update)
(save-buffer)
(kill-buffer (current-buffer))
)
;; loop over command line arguments
(mapcar 'fixinfo command-line-args-left)
(kill-emacs)
#! /usr/bin/sed -f
# allow "%" as a comment char, but only at the beginning of the line
s/^%/@c /
#s/[^\\]%.*$//
s/^\\%/%/
#preserve blanks and braces in @example blocks
/@example/,/@end example/ s/{/@{/g
/@example/,/@end example/ s/}/@}/g
/@example/,/@end example/ p
/@example/,/@end example/ d
/@smallexample/,/@end smallexample/ s/{/@{/g
/@smallexample/,/@end smallexample/ s/}/@}/g
/@smallexample/,/@end smallexample/ p
/@smallexample/,/@end smallexample/ d
# remove leading blanks
s/^[ ]*//
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment