This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add step to the documentation build that compiles diagrams from latex…
…/tikz source into PNG files that can be included from Doxygen. Added diagram for a Costas loop.
- Loading branch information
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,5 +47,6 @@ clean: | |
done | ||
|
||
docs: | ||
$(MAKE) -C docs/diagrams | ||
doxygen docs/Doxyfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
DIAGRAMS = costas_loop.tex | ||
|
||
PDFS = $(DIAGRAMS:.tex=.pdf) | ||
|
||
PNGS = $(PDFS:.pdf=.png) | ||
|
||
all: $(PNGS) | ||
|
||
%.pdf: %.tex | ||
pdflatex $< | ||
|
||
%.png: %.pdf | ||
convert -density 120 -trim -bordercolor White -border 20 $< $@ | ||
|
||
clean: | ||
rm *.aux *.log *.pdf *.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
\documentclass{article} | ||
\pagestyle{empty} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{shapes,arrows} | ||
\begin{document} | ||
|
||
\input{tikz_styles.tex} | ||
|
||
\tikzstyle{mix} = [draw, circle, node distance=1cm, minimum size=0.7cm] | ||
\tikzstyle{input} = [coordinate] | ||
|
||
\begin{tikzpicture}[auto, thick, node distance=1.5cm, >=stealth'] | ||
|
||
\def\h{2.5cm} | ||
|
||
\node [input, name=input] {}; | ||
\node [input, right of=input, name=split] {}; | ||
\node [block, right of=split, node distance=2cm] (nco) {Carrier NCO}; | ||
\node [mix, above of=nco, node distance=\h] (Imix) {}; | ||
\node [simpleblock, below of=nco, node distance=\h*0.4] (Qphase) {$\frac{\pi}{2}$}; | ||
\node [mix, below of=nco, node distance=\h] (Qmix) {}; | ||
\node [block, right of=nco, node distance=3.5cm, text width=2cm] (filter) {Loop filter \\ $D[z]$}; | ||
\node [block, above of=filter, node distance=\h, text width=2cm] (Idump) {Integrate \& Dump}; | ||
\node [block, below of=filter, node distance=\h, text width=2cm] (Qdump) {Integrate \& Dump}; | ||
\node [block, right of=filter, node distance=3.5cm] (desc) {Discriminator}; | ||
|
||
\draw [->] (input) -- node {$x(n)$} (split); | ||
\draw [->] (split) |- (Imix); | ||
\draw [->] (split) |- (Qmix); | ||
\draw [->] (Imix) -- node {$x_i(n)$} (Idump); | ||
\draw [->] (Qmix) -- node {$x_q(n)$} (Qdump); | ||
\draw [->] (Idump) -| node[near start, above] {$I(n)$} (desc); | ||
\draw [->] (Qdump) -| node[near start, above] {$Q(n)$} (desc); | ||
\draw [->] (desc) -- node {$\varepsilon(n)$} (filter); | ||
\draw [->] (filter) -- node {$\tilde f(n)$} (nco); | ||
\draw [->] (nco) -- node {$\tilde x_i(n)$} (Imix); | ||
\draw [->] (nco) -- (Qphase); | ||
\draw [->] (Qphase) -- node[left] {$\tilde x_q(n)$} (Qmix); | ||
|
||
\draw [-] (Imix.south west) -- (Imix.north east); | ||
\draw [-] (Imix.south east) -- (Imix.north west); | ||
\draw [-] (Qmix.south west) -- (Qmix.north east); | ||
\draw [-] (Qmix.south east) -- (Qmix.north west); | ||
|
||
\node [above right of=Imix, node distance=0.7cm] {\textbf{I}}; | ||
\node [below right of=Qmix, node distance=0.7cm] {\textbf{Q}}; | ||
|
||
\end{tikzpicture} | ||
|
||
\end{document} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% Define some styles for use in Tikz diagrams. | ||
|
||
\tikzstyle{simpleblock} = [draw, rectangle, minimum height=2em, minimum width=1em] | ||
|
||
\tikzstyle{block} = [ | ||
draw=blue!50!black!50, | ||
very thick, | ||
top color=blue!5, | ||
bottom color=blue!15, | ||
rounded corners=1.5mm, | ||
rectangle, | ||
minimum height=2em, | ||
minimum width=1em, | ||
text centered | ||
] |