1 |
7 |
dgisselq |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/
|
2 |
|
|
%
|
3 |
|
|
% Copyright (C) 2015, Gisselquist Technology, LLC
|
4 |
|
|
%
|
5 |
|
|
% This template is free software: you can redistribute it and/or modify it
|
6 |
|
|
% under the terms of the GNU General Public License as published by the
|
7 |
|
|
% Free Software Foundation, either version 3 of the License, or (at your
|
8 |
|
|
% option) any later version.
|
9 |
|
|
%
|
10 |
|
|
% This template is distributed in the hope that it will be useful, but WITHOUT
|
11 |
|
|
% ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
12 |
|
|
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
13 |
|
|
% for more details.
|
14 |
|
|
%
|
15 |
|
|
% You should have received a copy of the GNU General Public License along
|
16 |
|
|
% with this program. If not, see for a copy.
|
17 |
|
|
%
|
18 |
|
|
% License: GPL, v3, as defined and found on www.gnu.org,
|
19 |
|
|
% http://www.gnu.org/licenses/gpl.html
|
20 |
|
|
%
|
21 |
|
|
%
|
22 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
23 |
|
|
% \NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
24 |
|
|
\ProvidesClass{gqtekspec}[2015/03/03 v0.1 -- Gisselquist Technology Specification]
|
25 |
|
|
\typeout{by Dan Gisselquist}
|
26 |
|
|
\LoadClassWithOptions{report}
|
27 |
|
|
\usepackage{datetime}
|
28 |
|
|
\usepackage{graphicx}
|
29 |
|
|
\usepackage[dvips]{pstricks}
|
30 |
|
|
\usepackage{hhline}
|
31 |
|
|
\usepackage{colortbl}
|
32 |
|
|
\newdateformat{headerdate}{\THEYEAR/\twodigit{\THEMONTH}/\twodigit{\THEDAY}}
|
33 |
|
|
\setlength{\hoffset}{0.25in}
|
34 |
|
|
\setlength{\voffset}{-0.5in}
|
35 |
|
|
\setlength{\marginparwidth}{0in}
|
36 |
|
|
\setlength{\marginparsep}{0in}
|
37 |
|
|
\setlength{\textwidth}{6in}
|
38 |
|
|
\setlength{\oddsidemargin}{0in}
|
39 |
|
|
|
40 |
|
|
% **************************************
|
41 |
|
|
% * APPENDIX *
|
42 |
|
|
% **************************************
|
43 |
|
|
%
|
44 |
|
|
\newcommand\appfl@g{\appendixname} %used to test \@chapapp
|
45 |
|
|
%
|
46 |
|
|
% \renewcommand\appendix{\par\clearpage
|
47 |
|
|
% \setcounter{chapter}{0}%
|
48 |
|
|
% \setcounter{section}{0}%
|
49 |
|
|
% \renewcommand\@chapapp{\appendixname}%
|
50 |
|
|
% \renewcommand\thechapter{\Alph{chapter}}
|
51 |
|
|
% \if@nosectnum\else
|
52 |
|
|
% \renewcommand\thesection{\Alph{chapter}.\arabic{section}}
|
53 |
|
|
% \fi
|
54 |
|
|
% }
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
% FIGURE
|
58 |
|
|
% redefine the @caption command to put a period after the figure or
|
59 |
|
|
% table number in the lof and lot tables
|
60 |
|
|
\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
|
61 |
|
|
ext@#1\endcsname}{#1}{\protect\numberline{\csname
|
62 |
|
|
the#1\endcsname.}{\ignorespaces #2}}\begingroup
|
63 |
|
|
\@parboxrestore
|
64 |
|
|
\normalsize
|
65 |
|
|
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
|
66 |
|
|
\endgroup}
|
67 |
|
|
|
68 |
|
|
% ****************************************
|
69 |
|
|
% * TABLE OF CONTENTS, ETC. *
|
70 |
|
|
% ****************************************
|
71 |
|
|
|
72 |
|
|
\renewcommand\contentsname{Contents}
|
73 |
|
|
\renewcommand\listfigurename{Figures}
|
74 |
|
|
\renewcommand\listtablename{Tables}
|
75 |
|
|
|
76 |
|
|
\newif\if@toc \@tocfalse
|
77 |
|
|
\renewcommand\tableofcontents{%
|
78 |
|
|
\begingroup% temporarily set if@toc so that \@schapter will not
|
79 |
|
|
% put Table of Contents in the table of contents.
|
80 |
|
|
\@toctrue
|
81 |
|
|
\chapter*{\contentsname}
|
82 |
|
|
\endgroup
|
83 |
|
|
\thispagestyle{gqtekspecplain}
|
84 |
|
|
|
85 |
|
|
\baselineskip=10pt plus .5pt minus .5pt
|
86 |
|
|
|
87 |
|
|
{\raggedleft Page \par\vskip-\parskip}
|
88 |
|
|
\@starttoc{toc}%
|
89 |
|
|
\baselineskip=\normalbaselineskip
|
90 |
|
|
}
|
91 |
|
|
|
92 |
|
|
\def\l@appendix{\pagebreak[3]
|
93 |
|
|
\vskip 1.0em plus 1pt % space above appendix line
|
94 |
|
|
\@dottedtocline{0}{0em}{8em}}
|
95 |
|
|
|
96 |
|
|
\def\l@chapter{\pagebreak[3]
|
97 |
|
|
\vskip 1.0em plus 1pt % space above appendix line
|
98 |
|
|
\@dottedtocline{0}{0em}{4em}}
|
99 |
|
|
|
100 |
|
|
% \if@nosectnum\else
|
101 |
|
|
% \renewcommand\l@section{\@dottedtocline{1}{5.5em}{2.4em}}
|
102 |
|
|
% \renewcommand\l@subsection{\@dottedtocline{2}{8.5em}{3.2em}}
|
103 |
|
|
% \renewcommand\l@subsubsection{\@dottedtocline{3}{11em}{4.1em}}
|
104 |
|
|
% \renewcommand\l@paragraph{\@dottedtocline{4}{13.5em}{5em}}
|
105 |
|
|
% \renewcommand\l@subparagraph{\@dottedtocline{5}{16em}{6em}}
|
106 |
|
|
% \fi
|
107 |
|
|
|
108 |
|
|
% LIST OF FIGURES
|
109 |
|
|
%
|
110 |
|
|
\def\listoffigures{%
|
111 |
|
|
\begingroup
|
112 |
|
|
\chapter*{\listfigurename}%
|
113 |
|
|
\endgroup
|
114 |
|
|
\thispagestyle{gqtekspecplain}%
|
115 |
|
|
|
116 |
|
|
\baselineskip=10pt plus .5pt minus .5pt%
|
117 |
|
|
|
118 |
|
|
{\hbox to \hsize{Figure\hfil Page} \par\vskip-\parskip}%
|
119 |
|
|
|
120 |
|
|
\rule[2mm]{\textwidth}{0.5mm}\par
|
121 |
|
|
|
122 |
|
|
\@starttoc{lof}%
|
123 |
|
|
\baselineskip=\normalbaselineskip}%
|
124 |
|
|
|
125 |
|
|
\def\l@figure{\@dottedtocline{1}{1em}{4.0em}}
|
126 |
|
|
|
127 |
|
|
% LIST OF TABLES
|
128 |
|
|
%
|
129 |
|
|
\def\listoftables{%
|
130 |
|
|
\begingroup
|
131 |
|
|
\chapter*{\listtablename}%
|
132 |
|
|
\endgroup
|
133 |
|
|
\thispagestyle{gqtekspecplain}%
|
134 |
|
|
\baselineskip=10pt plus .5pt minus .5pt%
|
135 |
|
|
{\hbox to \hsize{Table\hfil Page} \par\vskip-\parskip}%
|
136 |
|
|
|
137 |
|
|
% Added line underneath headings, 20 Jun 01, Capt Todd Hale.
|
138 |
|
|
\rule[2mm]{\textwidth}{0.5mm}\par
|
139 |
|
|
|
140 |
|
|
\@starttoc{lot}%
|
141 |
|
|
\baselineskip=\normalbaselineskip}%
|
142 |
|
|
|
143 |
|
|
\let\l@table\l@figure
|
144 |
|
|
|
145 |
|
|
% ****************************************
|
146 |
|
|
% * PAGE STYLES *
|
147 |
|
|
% ****************************************
|
148 |
|
|
%
|
149 |
|
|
\def\ps@gqtekspectoc{%
|
150 |
|
|
\let\@mkboth\@gobbletwo
|
151 |
|
|
\def \@oddhead{}
|
152 |
|
|
\def \@oddfoot{\rm
|
153 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspectocn}}
|
154 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
155 |
|
|
\def\ps@gqtekspectocn{\let\@mkboth\@gobbletwo
|
156 |
|
|
\def \@oddhead{\rm \hfil\raisebox{10pt}{Page}}
|
157 |
|
|
\def \@oddfoot{\rm
|
158 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspectocn}}
|
159 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
160 |
|
|
|
161 |
|
|
\def\ps@gqtekspeclof{\let\@mkboth\@gobbletwo
|
162 |
|
|
\def \@oddhead{}
|
163 |
|
|
\def \@oddfoot{\rm
|
164 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspeclofn}}
|
165 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
166 |
|
|
\def\ps@gqtekspeclofn{\let\@mkboth\@gobbletwo
|
167 |
|
|
\def \@oddhead{\rm
|
168 |
|
|
\parbox{\textwidth}{\raisebox{0pt}{Figure}\hfil\raisebox{0pt}{Page} %
|
169 |
|
|
\raisebox{20pt}{\rule[10pt]{\textwidth}{0.5mm}} }}
|
170 |
|
|
|
171 |
|
|
\def \@oddfoot{\rm
|
172 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspeclofn}}
|
173 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
174 |
|
|
|
175 |
|
|
\def\ps@gqtekspeclot{\let\@mkboth\@gobbletwo
|
176 |
|
|
\def \@oddhead{}
|
177 |
|
|
\def \@oddfoot{\rm
|
178 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspeclotn}}
|
179 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
180 |
|
|
\def\ps@gqtekspeclotn{\let\@mkboth\@gobbletwo
|
181 |
|
|
\def \@oddhead{\rm
|
182 |
|
|
\parbox{\textwidth}{\raisebox{0pt}{Table}\hfil\raisebox{0pt}{Page} %
|
183 |
|
|
\raisebox{20pt}{\rule[10pt]{\textwidth}{0.5mm}} }}
|
184 |
|
|
|
185 |
|
|
\def \@oddfoot{\rm
|
186 |
|
|
\hfil\raisebox{-9pt}{\thepage}\hfil\thispagestyle{gqtekspeclotn}}
|
187 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
188 |
|
|
|
189 |
|
|
\def\ps@gqtekspecplain{\let\@mkboth\@gobbletwo
|
190 |
|
|
\def \@oddhead{\rput(0,-2pt){\psline(0,0)(\textwidth,0)}\rm \hbox to 1in{\includegraphics[height=0.8\headheight]{GT.eps} Gisselquist Technology, LLC}\hfil\hbox{\@title}\hfil\hbox to 1in{\hfil\headerdate\@date}}
|
191 |
|
|
\def \@oddfoot{\rput(0,9pt){\psline(0,0)(\textwidth,0)}\rm \hbox to 1in{www.opencores.com\hfil}\hfil\hbox{\r@vision}\hfil\hbox to 1in{\hfil{\thepage}}}
|
192 |
|
|
\let \@evenhead\@oddhead \let \@evenfoot\@oddfoot}
|
193 |
|
|
|
194 |
|
|
% \def\author#1{\def\auth@r{#1}}
|
195 |
|
|
% \def\title#1{\def\ti@tle{#1}}
|
196 |
|
|
|
197 |
|
|
\def\logo{\begin{pspicture}(0,0)(5.67in,0.75in)
|
198 |
|
|
\rput[lb](0.05in,0.10in){\includegraphics[height=0.75in]{GT.eps}}
|
199 |
|
|
\rput[lb](1.15in,0.05in){\scalebox{1.8}{\parbox{2.0in}{Gisselquist\\Technology, LLC}}}
|
200 |
|
|
\end{pspicture}}
|
201 |
|
|
% TITLEPAGE
|
202 |
|
|
%
|
203 |
|
|
\def\titlepage{\setcounter{page}{1}
|
204 |
|
|
\typeout{^^JTitle Page.}
|
205 |
|
|
\thispagestyle{empty}
|
206 |
|
|
\leftline{\rput(0,0){\psline(0,0)(\textwidth,0)}\hfill}
|
207 |
|
|
\vskip 2\baselineskip
|
208 |
|
|
\logo\hfil % Original is 3.91 in x 1.26 in, let's match V thus
|
209 |
|
|
\vskip 2\baselineskip
|
210 |
|
|
\vspace*{10pt}\vfil
|
211 |
|
|
\begin{minipage}{\textwidth}\raggedleft
|
212 |
|
|
\ifproject{\Huge\bfseries\MakeUppercase\@project} \\\fi
|
213 |
|
|
\vspace*{15pt}
|
214 |
|
|
{\Huge\bfseries\MakeUppercase\@title} \\
|
215 |
|
|
\vskip 10\baselineskip
|
216 |
|
|
\Large \@author \\
|
217 |
|
|
\ifemail{\Large \@email}\\\fi
|
218 |
|
|
\vskip 6\baselineskip
|
219 |
|
|
\Large \usdate\@date \\
|
220 |
|
|
\end{minipage}
|
221 |
|
|
% \baselineskip 22.5pt\large\rm\MakeUppercase\ti@tle
|
222 |
|
|
\vspace*{30pt}
|
223 |
|
|
\vfil
|
224 |
|
|
\newpage\baselineskip=\normalbaselineskip}
|
225 |
|
|
|
226 |
|
|
\newenvironment{license}{\clearpage\typeout{^^JLicense Page.}\ \vfill\noindent}%
|
227 |
|
|
{\vfill\newpage}
|
228 |
|
|
% ****************************************
|
229 |
|
|
% * CHAPTER DEFINITIONS *
|
230 |
|
|
% ****************************************
|
231 |
|
|
%
|
232 |
|
|
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
|
233 |
|
|
\thispagestyle{gqtekspecplain}%
|
234 |
|
|
\global\@topnum\z@
|
235 |
|
|
\@afterindentfalse
|
236 |
|
|
\secdef\@chapter\@schapter}
|
237 |
|
|
\renewcommand\@makechapterhead[1]{%
|
238 |
|
|
\hbox to \textwidth{\hfil{\Huge\bfseries \thechapter.}}\vskip 10\p@
|
239 |
|
|
\hbox to \textwidth{\rput(0,0){\psline[linewidth=0.04in](0,0)(\textwidth,0)}}\vskip \p@
|
240 |
|
|
\hbox to \textwidth{\rput(0,0){\psline[linewidth=0.04in](0,0)(\textwidth,0)}}\vskip 10\p@
|
241 |
|
|
\hbox to \textwidth{\hfill{\Huge\bfseries #1}}%
|
242 |
|
|
\par\nobreak\vskip 40\p@}
|
243 |
|
|
\renewcommand\@makeschapterhead[1]{%
|
244 |
|
|
\hbox to \textwidth{\hfill{\Huge\bfseries #1}}%
|
245 |
|
|
\par\nobreak\vskip 40\p@}
|
246 |
|
|
% ****************************************
|
247 |
|
|
% * INITIALIZATION *
|
248 |
|
|
% ****************************************
|
249 |
|
|
%
|
250 |
|
|
% Default initializations
|
251 |
|
|
|
252 |
|
|
\ps@gqtekspecplain % 'gqtekspecplain' page style with lowered page nos.
|
253 |
|
|
\onecolumn % Single-column.
|
254 |
|
|
\pagenumbering{roman} % the first chapter will change pagenumbering
|
255 |
|
|
% to arabic
|
256 |
|
|
\setcounter{page}{1} % in case a titlepage is not requested
|
257 |
|
|
% otherwise titlepage sets page to 1 since the
|
258 |
|
|
% flyleaf is not counted as a page
|
259 |
|
|
\widowpenalty 10000 % completely discourage widow lines
|
260 |
|
|
\clubpenalty 10000 % completely discourage club (orphan) lines
|
261 |
|
|
\raggedbottom % don't force alignment of bottom of pages
|
262 |
|
|
|
263 |
|
|
\date{\today}
|
264 |
|
|
\newif\ifproject\projectfalse
|
265 |
|
|
\def\project#1{\projecttrue\gdef\@project{#1}}
|
266 |
|
|
\def\@project{}
|
267 |
|
|
\newif\ifemail\emailfalse
|
268 |
|
|
\def\email#1{\emailtrue\gdef\@email{#1}}
|
269 |
|
|
\def\@email{}
|
270 |
|
|
\def\revision#1{\gdef\r@vision{#1}}
|
271 |
|
|
\def\r@vision{}
|
272 |
|
|
\def\at{\makeatletter @\makeatother}
|
273 |
|
|
\newdateformat{theyear}{\THEYEAR}
|
274 |
|
|
\newenvironment{revisionhistory}{\clearpage\typeout{^^JRevision History.}%
|
275 |
|
|
\hbox to \textwidth{\hfil\scalebox{1.8}{\large\bfseries Revision History}}\vskip 10\p@\noindent%
|
276 |
|
|
\begin{tabular}{|p{0.5in}|p{1in}|p{1in}|p{2.875in}|}\hline
|
277 |
|
|
\rowcolor[gray]{0.8} Rev. & Date & Author & Description\\\hline\hline}
|
278 |
|
|
{\end{tabular}\clearpage}
|
279 |
|
|
\newenvironment{clocklist}{\begin{tabular}{|p{0.75in}|p{0.5in}|l|l|p{2.875in}|}\hline
|
280 |
|
|
\rowcolor[gray]{0.85} Name & Source & \multicolumn{2}{l|}{Rates (MHz)} & Description \\\hhline{~|~|-|-|~}%
|
281 |
|
|
\rowcolor[gray]{0.85} & & Max & Min & \\\hline\hline}%
|
282 |
|
|
{\end{tabular}}
|
283 |
|
|
\newenvironment{reglist}{\begin{tabular}{|p{0.75in}|p{0.5in}|p{0.5in}|p{0.5in}|p{2.875in}|}\hline
|
284 |
|
|
\rowcolor[gray]{0.85} Name & Address & Width & Access & Description \\\hline\hline}%
|
285 |
|
|
{\end{tabular}}
|
286 |
|
|
\newenvironment{bitlist}{\begin{tabular}{|p{0.5in}|p{0.5in}|p{3.875in}|}\hline
|
287 |
|
|
\rowcolor[gray]{0.85} Bit \# & Access & Description \\\hline\hline}%
|
288 |
|
|
{\end{tabular}}
|
289 |
|
|
\newenvironment{portlist}{\begin{tabular}{|p{0.75in}|p{0.5in}|p{0.75in}|p{3.375in}|}\hline
|
290 |
|
|
\rowcolor[gray]{0.85} Port & Width & Direction & Description \\\hline\hline}%
|
291 |
|
|
{\end{tabular}}
|
292 |
|
|
\newenvironment{wishboneds}{\begin{tabular}{|p{2.5in}|p{2.5in}|}\hline
|
293 |
|
|
\rowcolor[gray]{0.85} Description & Specification \\\hline\hline}%
|
294 |
|
|
{\end{tabular}}
|
295 |
|
|
\newenvironment{preface}{\chapter*{Preface}}{\par\bigskip\bigskip\leftline{\hfill\@author}}
|
296 |
|
|
\endinput
|