.
This commit is contained in:
parent
df3750364a
commit
1d70a432c9
29
Makefile
29
Makefile
@ -1,19 +1,26 @@
|
||||
CC?=cc
|
||||
C99?=c99
|
||||
|
||||
all: bericht
|
||||
all: bericht check fsm_tb
|
||||
|
||||
check: sqrt
|
||||
./sqrt
|
||||
|
||||
sqrt: sqrt.c
|
||||
$(CC) -lm -o sqrt sqrt.c
|
||||
sqrt: c/sqrt.c
|
||||
$(C99) -lm -o sqrt c/sqrt.c
|
||||
|
||||
debug:
|
||||
$(CC) -g -lm -o sqrt sqrt.c
|
||||
gdb ./sqrt
|
||||
bericht/graph.pdf: bericht/graph.dot
|
||||
cd bericht; dot -Tpdf graph.dot > graph.pdf
|
||||
|
||||
graph.pdf: graph.dot
|
||||
dot -Tpdf graph.dot > graph.pdf
|
||||
bericht: bericht/graph.pdf
|
||||
latexmk -pdf bericht/bericht.tex;
|
||||
|
||||
bericht: graph.pdf sqrt
|
||||
latexmk -pdf bericht.tex;
|
||||
fsm: verilog/fsm.vcd
|
||||
gtkwave verilog/fsm.vcd
|
||||
|
||||
fsm_tb: verilog/heron_fsm.vcd
|
||||
|
||||
%.vcd : %.vvp
|
||||
vvp $<
|
||||
|
||||
%.vvp: %_tb.v %.v
|
||||
iverilog -o $@ $^
|
||||
|
@ -1,9 +1,49 @@
|
||||
\documentclass[a4paper,landscape]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{amsmath, amsthm, amssymb}
|
||||
\usepackage[ansinew]{inputenc}
|
||||
%*******************************************************************************
|
||||
% * Copyright (c) 2006-2013
|
||||
% * Institute of Automation, Dresden University of Technology
|
||||
% *
|
||||
% * All rights reserved. This program and the accompanying materials
|
||||
% * are made available under the terms of the Eclipse Public License v1.0
|
||||
% * which accompanies this distribution, and is available at
|
||||
% * http://www.eclipse.org/legal/epl-v10.html
|
||||
% *
|
||||
% * Contributors:
|
||||
% * Institute of Automation - TU Dresden, Germany
|
||||
% * - initial API and implementation
|
||||
% ******************************************************************************/
|
||||
|
||||
\usepackage{listings}
|
||||
\documentclass[
|
||||
print, % print optimized version of the thesis, standard option
|
||||
% alternative:
|
||||
% screen, % makes the thesis better readable on screens (onesided, coloured links)
|
||||
% use only 'print' OR 'screen'
|
||||
% ATTENTION: 'screen' changes size of text area slightly. Always optimize document WITH
|
||||
% 'print' option first for printing (size of graphics etc.) and convert afterwards
|
||||
% in screen optimized version!
|
||||
listoffigures, % includes list of figures
|
||||
listoftables, % includes list of tables
|
||||
listoflistings, % includes list of listings
|
||||
abbrevations, % includes index of symbols and abbrevations
|
||||
bibIfa, % citation style (IfA standard), alternatives: bibNumeric, bibHarvard
|
||||
langDE % define the language (default: langDE)
|
||||
]{ifathesis}
|
||||
\ifaThesis{Belegarbeit}
|
||||
\ifaAuthor{Jörg Thalheim}
|
||||
\ifaAuthorBirthday{03.01.1992}
|
||||
\ifaAuthorBirthplace{Großröhrsdorf}
|
||||
\ifaAuthorCourse{Informationssystemtechnik}
|
||||
\ifaAuthorYearOfMatriculation{2011}
|
||||
\ifaKeywords{Praktikum, Schaltungsentwurf, Verilog} % Keywords included in pdf-file. Could be found e.g. by Windows file search.
|
||||
\ifaTitleDE{Schaltkreis- und Systementwurf}
|
||||
\ifaTitleEN{}
|
||||
|
||||
\ifaSupervisorA{Jens-Uwe Schlüßler}
|
||||
\ifaProfessor{Prof. Dr.-Ing. habil. René Schüffny}
|
||||
\ifaDayOfSubmission{\today}
|
||||
\ifaTopicDescriptionPDF{parts/00_Aufgabenstellung.pdf}
|
||||
\ifaAppendix{example_files/appendix}
|
||||
\ifaAbstractDE{example_files/00_abstract_de__invalid}
|
||||
\ifaAbstractEN{example_files/00_abstract_en__invalid}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{color}
|
||||
@ -42,13 +82,16 @@
|
||||
|
||||
\begin{document}
|
||||
|
||||
\subsection{Algorithmus}
|
||||
\chapter{Einleitung}
|
||||
TODO Kapitel 5.1 -> Aufgabenstellung
|
||||
|
||||
\chapter{Beschreibung des Algorithmus}
|
||||
|
||||
\begin{align}
|
||||
x_{n+1}=\frac{x_n + \frac{a}{x_n}}{2}
|
||||
\end{align}
|
||||
|
||||
\subsection{Implementierung in C}
|
||||
\section{Implementierung in C}
|
||||
\begin{lstlisting}
|
||||
typedef uint32_t u32;
|
||||
void heron_sqrt(u32 *mem) {
|
||||
@ -92,7 +135,7 @@ Jedes Datenfeld wird als vorzeichenlose Festkommazahl interpretiert.
|
||||
\subsection{Datenflussgraph}
|
||||
\begin{figure}[ht]
|
||||
\centering
|
||||
\includegraphics[width=0.5\textwidth]{graph.pdf}
|
||||
\includegraphics[width=0.3\textwidth]{graph.pdf}
|
||||
\label{fig1}
|
||||
\end{figure}
|
||||
|
11
bericht/bibliography.bib
Normal file
11
bericht/bibliography.bib
Normal file
@ -0,0 +1,11 @@
|
||||
%% This BibTeX bibliography file was created using BibDesk.
|
||||
%% http://bibdesk.sourceforge.net/
|
||||
|
||||
|
||||
%% Saved with string encoding Unicode (UTF-8)
|
||||
|
||||
#@misc{mda,
|
||||
# Date-Added = {2010-01-09 12:34:49 +0100},
|
||||
# Date-Modified = {2010-01-09 12:35:30 +0100},
|
||||
# Title = {{Model Driven Architecture}},
|
||||
# Url = {http://omg.org/mda}}
|
@ -5,7 +5,7 @@ digraph heron {
|
||||
graph [overlap=scale];
|
||||
subgraph {
|
||||
edge [weight=3];
|
||||
C0 -> C1 -> C2 -> C3 -> C4 -> C5 -> C6 -> C7 -> C8 -> C9 [minlen=3.5];
|
||||
C0 -> C1 -> C2 -> C3 -> C4 -> C5 -> C6 -> C7 -> C8 -> C9 -> C10 [minlen=3];
|
||||
}
|
||||
|
||||
// variables & constants
|
||||
@ -13,15 +13,12 @@ digraph heron {
|
||||
mem_i [label="mem[i]"];
|
||||
mem_i2 [label="mem[i]",shape="box"];
|
||||
i [label="i"];
|
||||
1 [ ];
|
||||
"1a" [label="1" ];
|
||||
"1b" [label="1" ];
|
||||
"1c" [label="1" ];
|
||||
"1d" [label="1" ];
|
||||
Finish [label="Finish"];
|
||||
|
||||
// operands
|
||||
s_shift_1 [label=">>",];
|
||||
s_shift_1 [label=">> 1",];
|
||||
i_lt_0 [label=">",];
|
||||
|
||||
// i <= mem[0]
|
||||
@ -36,17 +33,18 @@ digraph heron {
|
||||
i_lt_0 -> mem_s_gte_1 [style=dotted, arrowhead=normal,label="True"];
|
||||
// else
|
||||
i_lt_0 -> Finish [style=dotted, arrowhead=normal,label="False"];
|
||||
{ rank=same; C9; Finish;}
|
||||
{ rank=same; C10; Finish;}
|
||||
|
||||
subgraph i_lt_0 {
|
||||
mem_s_gte_1 [label=">"];
|
||||
|
||||
s_div_x [label="/",];
|
||||
new_x [label="+",];
|
||||
s_div_x_shift_1 [label=">>",];
|
||||
x_shift_1 [label=">>",];
|
||||
s_div_x_shift_1 [label=">> 1",];
|
||||
x_shift_1 [label=">> 1",];
|
||||
old_x_lte_new_x [label=">=",];
|
||||
dec_i [label="-",];
|
||||
comma_fix [label="<< Kommastellen/2"];
|
||||
|
||||
// (s > 1)
|
||||
mem_i -> mem_s_gte_1;
|
||||
@ -56,27 +54,24 @@ digraph heron {
|
||||
// if (s > 1)
|
||||
mem_s_gte_1 -> s_shift_1 [style=dotted,arrowhead=normal,label="True"];
|
||||
// else
|
||||
mem_s_gte_1 -> dec_i [style=dotted,arrowhead=normal,label="False"];
|
||||
mem_s_gte_1 -> comma_fix [style=dotted,arrowhead=normal,label="False"];
|
||||
|
||||
subgraph if_mem_i_gte_1 {
|
||||
// x = s >> 1
|
||||
mem_i -> s_shift_1;
|
||||
1 -> s_shift_1;
|
||||
s_shift_1 -> x [style=dotted,arrowhead=normal,label="C2->C3"];
|
||||
{ rank=same; C3; s_shift_1; x}
|
||||
|
||||
// (x >> 1)
|
||||
x [shape="box"];
|
||||
x -> x_shift_1;
|
||||
"1a" -> x_shift_1;
|
||||
// (s/x)
|
||||
mem_i -> s_div_x;
|
||||
x -> s_div_x;
|
||||
mem_i:ne -> s_div_x:ne;
|
||||
x -> s_div_x:nw;
|
||||
{ rank=same; C4; x_shift_1; s_div_x}
|
||||
|
||||
// ((s/x) >> 1)
|
||||
s_div_x -> s_div_x_shift_1;
|
||||
"1b" -> s_div_x_shift_1;
|
||||
{ rank=same; C5; s_div_x_shift_1}
|
||||
|
||||
// (x >> 1) + ((s/x) >> 1);
|
||||
@ -87,20 +82,26 @@ digraph heron {
|
||||
// (old_x <= X)
|
||||
x -> old_x_lte_new_x;
|
||||
new_x -> old_x_lte_new_x;
|
||||
new_x -> x [style=dotted,label="C7->C3"];
|
||||
new_x -> x [style=dotted,label="C7->C3 || C7->C8"];
|
||||
|
||||
x_2 [shape="box" label="x"];
|
||||
{ rank=same; C7; old_x_lte_new_x;}
|
||||
|
||||
x_2 -> comma_fix;
|
||||
{ rank=same; C8; comma_fix x_2}
|
||||
|
||||
// if (old_x <= X)
|
||||
old_x_lte_new_x -> dec_i [style=dotted,arrowhead=normal,label="True"];
|
||||
old_x_lte_new_x -> comma_fix [style=dotted,arrowhead=normal,label="True"];
|
||||
// else
|
||||
old_x_lte_new_x -> x [style=dotted,arrowhead=normal,label="False"];
|
||||
|
||||
comma_fix -> mem_i2 [label="C7->C8", style=dotted];
|
||||
comma_fix -> dec_i [style=dotted, arrowhead=normal, label="True"];
|
||||
|
||||
"1c" -> dec_i;
|
||||
i -> dec_i:ne;
|
||||
dec_i:s -> i:s;
|
||||
new_x -> mem_i2 [label="C7->C8", style=dotted];
|
||||
{ rank=same; C8; dec_i; mem_i2};
|
||||
{ rank=same; C9; dec_i; mem_i2};
|
||||
}
|
||||
}
|
||||
}
|
577
bericht/ifathesis.cls
Normal file
577
bericht/ifathesis.cls
Normal file
@ -0,0 +1,577 @@
|
||||
%!TEX root = example.tex
|
||||
%*******************************************************************************
|
||||
% * Copyright (c) 2006-2013
|
||||
% * Institute of Automation, Dresden University of Technology
|
||||
% *
|
||||
% * All rights reserved. This program and the accompanying materials
|
||||
% * are made available under the terms of the Eclipse Public License v1.0
|
||||
% * which accompanies this distribution, and is available at
|
||||
% * http://www.eclipse.org/legal/epl-v10.html
|
||||
% *
|
||||
% * Contributors:
|
||||
% * Institute of Automation - TU Dresden, Germany
|
||||
% * - initial API and implementation
|
||||
% ******************************************************************************/
|
||||
|
||||
\def\fileversion{0.1}
|
||||
\def\filedate{2013/07/05}
|
||||
\def\filename{ifathesis}
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{\filename}[\filedate DA/SA-Klasse des Instituts fuer Automatisierungstechnik, (c) by Stefan Hennig, Arne Sonnenburg, Matthias Freund, Christopher Martin]
|
||||
\typeout{Class: '\filename' Version \fileversion, Standard DA/SA-Klasse des Instituts fuer Automatisierungstechnik.}
|
||||
|
||||
\newif\if@useListOfFigures\@useListOfFiguresfalse
|
||||
\DeclareOption{listoffigures}{\@useListOfFigurestrue}
|
||||
|
||||
\newif\if@useListOfTables\@useListOfTablesfalse
|
||||
\DeclareOption{listoftables}{\@useListOfTablestrue}
|
||||
|
||||
\newif\if@useListOfListings\@useListOfListingsfalse
|
||||
\DeclareOption{listoflistings}{\@useListOfListingstrue}
|
||||
|
||||
\newif\if@useAbbrevations\@useAbbrevationsfalse
|
||||
\DeclareOption{abbrevations}{\@useAbbrevationstrue}
|
||||
|
||||
\newif\if@isReadyForPrint\@isReadyForPrinttrue
|
||||
\DeclareOption{print}{\@isReadyForPrinttrue}
|
||||
\DeclareOption{screen}{\@isReadyForPrintfalse}
|
||||
|
||||
\newcommand*{\@ifaThesisLanguage}{de}
|
||||
\DeclareOption{langDE}{\renewcommand*{\@ifaThesisLanguage}{de}}
|
||||
\DeclareOption{langEN}{\renewcommand*{\@ifaThesisLanguage}{en}}
|
||||
|
||||
\newcommand*{\@ifaBibliographyStyle}{}
|
||||
\DeclareOption{bibIfa}{\renewcommand*{\@ifaBibliographyStyle}{authoryear-comp}}
|
||||
\DeclareOption{bibHarvard}{\renewcommand*{\@ifaBibliographyStyle}{alphabetic}}
|
||||
\DeclareOption{bibNumeric}{\renewcommand*{\@ifaBibliographyStyle}{numeric-comp}}
|
||||
|
||||
\ProcessOptions\relax
|
||||
|
||||
% Lade Basisklasse der Vorlage
|
||||
\PassOptionsToPackage{%
|
||||
paper=a4, % Papiergröße
|
||||
headinclude=true, % Gehört Kopfzeile eher zur Seite oder zum Rand?
|
||||
footinclude=false, % Gehört Fußzeile eher zur Seite oder zum Rand?
|
||||
pagesize % Schreibt die Seitengröße ins Seitenregister,
|
||||
% sodass DVI- und PDF-Seiten die richtige Größe haben.
|
||||
}{typearea}
|
||||
|
||||
% Setze Bibliographie-Stil
|
||||
\PassOptionsToPackage{style=\@ifaBibliographyStyle, backend=bibtex8, maxbibnames=99}{biblatex}
|
||||
|
||||
\PassOptionsToPackage{svgnames}{xcolor} % Namensraum für xcolor Paket
|
||||
|
||||
\PassOptionsToPackage{fleqn}{amsmath}
|
||||
|
||||
\LoadClass[
|
||||
fontsize=12pt, % Grundschriftgröße
|
||||
\if@isReadyForPrint BCOR=15mm\else BCOR=0mm\fi, % Binderandgröße
|
||||
\if@isReadyForPrint DIV=10\else DIV=9\fi, % Teil der Seite, der als Seitenrand berücksichtigt wird (auch =calc mgl.):
|
||||
% Z.B. DIV=10: Randbreite Oben und Mitte 1/10, Unten und Außen 2/10 der Seite.
|
||||
% Regel: 60 bis 70 Zeichen pro Zeile, weniger ist besser, niemals mehr als 80!
|
||||
captions=tableheading, % Tabellenabstände für TabellenÜBERschriften optimieren
|
||||
\if@isReadyForPrint twoside=true\else twoside=false\fi, % Dokument zweiseitig?
|
||||
headings=small, % Relative Größe der Überschriften, small ist besser lesbar und erzeugt weniger Zweizeiligs
|
||||
fleqn, % Formeln linksbündig
|
||||
bibliography=totoc, % Literaturverzeichnis im Inhaltsverzeichnis referenziert
|
||||
numbers=noenddot, % Punkte nach Abschnittsnummern? (Weglassen = Automatik)
|
||||
% Nach Duden im vorliegenden Bsp. falsch, da auch Buchstaben in Gliederung (Anhang), sieht aber besser aus.
|
||||
]{scrbook} % Basisklasse der Vorlage: Koma-Skrip Klasse analog zur book-Klasse.
|
||||
|
||||
% ==============================================================
|
||||
% = Definiere mögliche Parameter zur Konfiguration der Vorlage =
|
||||
% ==============================================================
|
||||
%%%%%
|
||||
% Jetzt müssen zunächst die variablen Angaben geladen werden
|
||||
\newcommand*{\@ifaThesis}{Diplomarbeit}
|
||||
\newcommand*{\@ifaAuthor}{Max Mustermann}
|
||||
\newcommand*{\@ifaAuthorBirthday}{01.01.1970}
|
||||
\newcommand*{\@ifaAuthorBirthplace}{Dresden}
|
||||
\newcommand*{\@ifaAuthorCourse}{Informationssystemtechnik}
|
||||
\newcommand*{\@ifaAuthorYearOfMatriculation}{2000}
|
||||
\newcommand*{\@ifaKeywords}{Komma-separierte, Liste, mit, Schlagwörtern, zum Thema, der Arbeit}
|
||||
\newcommand*{\@ifaTitleDE}{Titel der Arbeit}
|
||||
\newcommand*{\@ifaTitleEN}{Thesis' title goes here}
|
||||
\newcommand*{\@ifaSupervisorA}{}
|
||||
\newcommand*{\@ifaSupervisorB}{}
|
||||
\newcommand*{\@ifaSupervisorC}{}
|
||||
\newcommand*{\@ifaSupervisorD}{}
|
||||
\newcommand*{\@ifaSupervisorE}{}
|
||||
\newcommand*{\@ifaProfessor}{Titel der Arbeit}
|
||||
\newcommand*{\@ifaDayOfSubmission}{\today}
|
||||
\newcommand*{\@ifaTopicDescriptionPDF}{he0ohDie}
|
||||
\newcommand*{\@ifaAppendix}{GoHaigh2}
|
||||
\newcommand*{\@ifaAbstractDE}{GoHaigh2}
|
||||
\newcommand*{\@ifaAbstractEN}{GoHaigh2}
|
||||
\newcommand*{\@ifaReferences}{IPhei0Ox}
|
||||
\newcommand*{\@ifaAbbrev}{00_Abbrev}
|
||||
\newcommand*{\@ifaAcknowledgements}{Acknowledgements}
|
||||
\newcommand*{\@ifaBibliographyBeforeAppendix}{true}
|
||||
\newcommand*{\@ifaAdditionalContributors}{}
|
||||
|
||||
\newcommand*{\ifaThesis}[1]{\renewcommand*{\@ifaThesis}{#1}}
|
||||
\newcommand*{\ifaAuthor}[1]{\renewcommand*{\@ifaAuthor}{#1}}
|
||||
\newcommand*{\ifaAuthorBirthday}[1]{\renewcommand*{\@ifaAuthorBirthday}{#1}}
|
||||
\newcommand*{\ifaAuthorBirthplace}[1]{\renewcommand*{\@ifaAuthorBirthplace}{#1}}
|
||||
\newcommand*{\ifaAuthorCourse}[1]{\renewcommand*{\@ifaAuthorCourse}{#1}}
|
||||
\newcommand*{\ifaAuthorYearOfMatriculation}[1]{\renewcommand*{\@ifaAuthorYearOfMatriculation}{#1}}
|
||||
\newcommand*{\ifaKeywords}[1]{\renewcommand*{\@ifaKeywords}{#1}}
|
||||
\newcommand*{\ifaTitleDE}[1]{\renewcommand*{\@ifaTitleDE}{#1}}
|
||||
\newcommand*{\ifaTitleEN}[1]{\renewcommand*{\@ifaTitleEN}{#1}}
|
||||
\newcommand*{\ifaSupervisorA}[1]{\renewcommand*{\@ifaSupervisorA}{#1}}
|
||||
\newcommand*{\ifaSupervisorB}[1]{\renewcommand*{\@ifaSupervisorB}{#1}}
|
||||
\newcommand*{\ifaSupervisorC}[1]{\renewcommand*{\@ifaSupervisorC}{#1}}
|
||||
\newcommand*{\ifaSupervisorD}[1]{\renewcommand*{\@ifaSupervisorD}{#1}}
|
||||
\newcommand*{\ifaSupervisorE}[1]{\renewcommand*{\@ifaSupervisorE}{#1}}
|
||||
\newcommand*{\ifaProfessor}[1]{\renewcommand*{\@ifaProfessor}{#1}}
|
||||
\newcommand*{\ifaDayOfSubmission}[1]{\renewcommand*{\@ifaDayOfSubmission}{#1}}
|
||||
\newcommand*{\ifaTopicDescriptionPDF}[1]{\renewcommand*{\@ifaTopicDescriptionPDF}{#1}}
|
||||
\newcommand*{\ifaAppendix}[1]{\renewcommand*{\@ifaAppendix}{#1}}
|
||||
\newcommand*{\ifaAbstractDE}[1]{\renewcommand*{\@ifaAbstractDE}{#1}}
|
||||
\newcommand*{\ifaAbstractEN}[1]{\renewcommand*{\@ifaAbstractEN}{#1}}
|
||||
\newcommand*{\ifaReferences}[1]{\renewcommand*{\@ifaReferences}{#1}}
|
||||
\newcommand*{\ifaAcknowledgements}[1]{\renewcommand*{\@ifaAcknowledgements}{#1}}
|
||||
\newcommand*{\ifaAbbrev}[1]{\renewcommand*{\@ifaAbbrev}{#1}}
|
||||
\newcommand*{\ifaBibliographyBeforeAppendix}[1]{\renewcommand*{\@ifaBibliographyBeforeAppendix}{#1}}
|
||||
\newcommand*{\ifaAdditionalContributors}[1]{\renewcommand*{\@ifaAdditionalContributors}{#1}}
|
||||
|
||||
%-------------------------------------------------------------------------
|
||||
\RequirePackage{ifthen}
|
||||
|
||||
% Paket für einfache Realisation von String-Vergleichen, die hier in der Vorlage verwendet werden
|
||||
\RequirePackage{xstring}
|
||||
|
||||
% Absatznummerierung fuer 4 Ebenen (z.B. 2.3.2.1) gemaess IfA Richtlinie einschalten.
|
||||
\setcounter{secnumdepth}{3}
|
||||
\setcounter{tocdepth}{3}
|
||||
|
||||
% Lade benötigte Pakete
|
||||
\RequirePackage{scrhack} %Zur Herstellung der Kompabilitaet mit Paketen, die nicht kompatibel zum KOMA-Script sind.
|
||||
|
||||
\include{packages}
|
||||
|
||||
% definiere Farben
|
||||
\definecolor{TUDBLAU}{rgb}{0.0,0.348,0.637}
|
||||
\definecolor{OSGREEN}{rgb}{0,0.75,0.25}
|
||||
|
||||
% Kläre zunächst einige Dinge, die von der Sprache abhängen
|
||||
\ifthenelse{\equal{\@ifaThesisLanguage}{de}}{
|
||||
% Deutsche Pakete
|
||||
\RequirePackage[ngerman]{babel} % Silbentrennung nach neuer deutscher Rechtschreibung.
|
||||
\RequirePackage[german]{nomencl}
|
||||
% Deutsche Begrifflichkeiten
|
||||
\newcommand{\@conTitle}{Inhaltsverzeichnis}
|
||||
\newcommand{\@bibTitle}{Literaturverzeichnis}
|
||||
\newcommand{\@appTitle}{Anhang}
|
||||
\renewcommand{\@pdftitle}{\@ifaTitleDE}
|
||||
\renewcommand{\nomname}{Abkürzungs- und Symbolverzeichnis}
|
||||
\renewcommand{\lstlistlistingname}{Quelltextverzeichnis}
|
||||
}{
|
||||
% Englische Pakete
|
||||
\RequirePackage[english]{babel} % Silbentrennung nach englischer Rechtschreibung.
|
||||
\RequirePackage[english]{nomencl}
|
||||
% Englische Begrifflichkeiten
|
||||
\newcommand{\@conTitle}{Contents}
|
||||
\newcommand{\@bibTitle}{References}
|
||||
\newcommand{\@appTitle}{Appendix}
|
||||
\renewcommand{\@pdftitle}{\@ifaTitleEN}
|
||||
\renewcommand{\nomname}{Nomenclature}
|
||||
\renewcommand{\lstlistlistingname}{List of Listings}
|
||||
}
|
||||
|
||||
%-------------------------------------------------------------------------
|
||||
% Macht im Anhang aus "A Quellcode" -> "Anhang A Quellcode"
|
||||
%-------------------------------------------------------------------------
|
||||
\newcommand*{\appendixmore}{%
|
||||
\renewcommand*{\chapterformat}{%
|
||||
\appendixname~\thechapter\autodot:\enskip}
|
||||
\renewcommand*{\chaptermarkformat}{%
|
||||
\appendixname~\thechapter\autodot:\enskip}
|
||||
}
|
||||
%-------------------------------------------------------------------------
|
||||
|
||||
% Veränderung der Bildunterschriften und Tabellenüberschriften:
|
||||
\addtokomafont{caption}{\small} % Kleinere Schriftgröße für Captions
|
||||
\setkomafont{captionlabel}{\sffamily\bfseries} % Caption-Label fett und serifenlos
|
||||
\setcapindent{1em} % 2. Zeile der Caption mit hängendem Einzug
|
||||
|
||||
% Anpassung des Literaturverzeichnisses
|
||||
\setlength{\bibitemsep}{10pt}
|
||||
\defbibheading{bibliography}{
|
||||
\chapter*{\@bibTitle}
|
||||
\addcontentsline{toc}{chapter}{\@bibTitle}
|
||||
}
|
||||
% Notwendig für Autovervollständigung der Zitate im Texnic Center
|
||||
\renewcommand*{\bibliography}[1]{\addbibresource{#1.bib}}
|
||||
% Anpassung für eckige Klammern bei 'authoryear-comp'
|
||||
\ifthenelse{\equal{\@ifaBibliographyStyle}{authoryear-comp}}{\renewcommand*{\citep}[2][]{\mkbibbrackets{\cite[#1]{#2}}}}{}
|
||||
|
||||
%-------------------------------------------------------------------------
|
||||
% Löst Probleme mit deutschen Umlauten in Listings
|
||||
%-------------------------------------------------------------------------
|
||||
\lstset{literate=%
|
||||
{Ö}{{\"O}}1
|
||||
{Ä}{{\"A}}1
|
||||
{Ü}{{\"U}}1
|
||||
{ß}{{\ss}}2
|
||||
{ü}{{\"u}}1
|
||||
{ä}{{\"a}}1
|
||||
{ö}{{\"o}}1
|
||||
}
|
||||
|
||||
%-------------------------------------------------------------------------
|
||||
% Integriert Listings und baut diese als Gleitobjekt aus, wenn gewünscht
|
||||
%-------------------------------------------------------------------------
|
||||
% Usage: \listing{<Caption>}{<Label>}{<[Dialect]Language>}{<Pfad>}{<float?>}
|
||||
|
||||
\newcommand*{\ifalisting}[6]{
|
||||
\renewcommand{\lstlistingname}{\hspace{-0.6cm}Listing}
|
||||
\ifthenelse{\equal{#6}{true}}{
|
||||
\ifalistingFloat{#1}{#2}{#3}{#4}{#5}
|
||||
}{
|
||||
\ifalistingNoFloat{#1}{#2}{#3}{#4}{#5}
|
||||
}
|
||||
\vspace{4.5mm}
|
||||
}
|
||||
|
||||
\newcommand*{\ifalistingFloat}[5]{%
|
||||
\begin{minipage}{0.96\textwidth}
|
||||
\lstset{belowcaptionskip=2mm} % Abstand unterhalb der Beschriftung
|
||||
\ifalistingRaw{#1}{#2}{#3}{#4}{#5}
|
||||
\end{minipage}
|
||||
}
|
||||
|
||||
% Thanks to Matthias Freund who provided the code to enables listings which are longer than one page.
|
||||
%
|
||||
\newcommand*{\ifalistingNoFloat}[5]{%
|
||||
\begin{addmargin}[4mm]{1.5mm} % verändert den Abstand ohne Verwendung einer Minipage
|
||||
\lstset{belowcaptionskip=2mm} % Abstand unterhalb der Beschriftung
|
||||
\ifalistingRaw{#1}{#2}{#3}{#4}{#5}
|
||||
\vspace{-1mm}
|
||||
\begin{flushright}
|
||||
\scriptsize
|
||||
Listing \ref{#2}
|
||||
\end{flushright}
|
||||
\end{addmargin}
|
||||
}
|
||||
|
||||
\newcommand*{\ifalistingRaw}[5]{
|
||||
\lstinputlisting[
|
||||
caption={#1},
|
||||
label={#2},
|
||||
language={#3},
|
||||
keywordstyle=\bfseries\color{blue},
|
||||
identifierstyle=\bf,
|
||||
stringstyle=\itshape\color{red},
|
||||
basicstyle=\ttfamily\color{black}\footnotesize, % Schriftschnitt des Codes
|
||||
showstringspaces=false, % Leerzeichen nicht markieren
|
||||
commentstyle=\color{green}, % Schriftschnitt der Kommentare
|
||||
tabsize=2, % Tabulatorengröße in Leerzeichen
|
||||
breaklines=true, % zu lange Zeilen umbrechen
|
||||
frame=tb, % Rahmen um das Listing
|
||||
abovecaptionskip=3mm, % Abstand oberhalb der Beschriftung
|
||||
captionpos=t, % Position der Beschriftung (b=bottom, t=top)
|
||||
numbers=#4,
|
||||
numbersep=5pt
|
||||
]{#5}
|
||||
}
|
||||
|
||||
% Erlaubt das Einfügen eines automatischen Symbolverzeichnisses
|
||||
% Definiere die richtige Sprache (bspw. für Silbentrennung, ...)
|
||||
% [Die entsprechenden Pakete wurden bereits eingefügt]
|
||||
\makenomenclature
|
||||
|
||||
% Jetzt geht es los...
|
||||
\AtBeginDocument{%
|
||||
% colorlinks: Farbige Verweise statt Umrahmung
|
||||
% Verhalten von hyperef Ändern: Farbe für Bildschirm, SW für Druck
|
||||
% ...color: Farbe verschiedener Verweise nach Farbpalette svgnames
|
||||
% pdf...: Setzten von Variablen die in den Eigenschaften der PDF-Datei angzeigt werden
|
||||
% Weitere Optionen möglich - siehe Dokumentation des Paktes hyperref
|
||||
\hypersetup{
|
||||
linkcolor=\if@isReadyForPrint black\else TUDBLAU\fi,%
|
||||
urlcolor=\if@isReadyForPrint black\else TUDBLAU\fi,%
|
||||
citecolor=\if@isReadyForPrint black\else OSGREEN\fi,%
|
||||
pdftitle=\@pdftitle,%
|
||||
pdfauthor=\@ifaAuthor,%
|
||||
pdfsubject=\@pdftitle,%
|
||||
pdfkeywords={\@ifaKeywords}%,%
|
||||
}
|
||||
|
||||
\frontmatter
|
||||
|
||||
% =================
|
||||
% = Titelseite(n) =
|
||||
% =================
|
||||
\begin{titlepage}
|
||||
\begin{picture}(0,0)
|
||||
\put(-97,-50){\includegraphics*{kopfzeile}}
|
||||
\end{picture}
|
||||
|
||||
% A dissertation will get a different titlepage
|
||||
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
|
||||
% ===============================
|
||||
% = Diplom-, Studienarbeit etc. =
|
||||
% ===============================
|
||||
\begin{center}
|
||||
\vfill
|
||||
\vfill
|
||||
{\huge\textsc{\@ifaThesis}}\\[0.5cm]
|
||||
zum Thema \\[0.5cm]
|
||||
{\large \IfStrEq{\@ifaThesisLanguage}{de}{\@ifaTitleDE}{\@ifaTitleEN}}\\
|
||||
\vfill
|
||||
\begin{tabular}{rl}
|
||||
vorgelegt von & \@ifaAuthor \\
|
||||
im Studiengang & \@ifaAuthorCourse,\:Jg.\:\@ifaAuthorYearOfMatriculation \\
|
||||
geboren am & \@ifaAuthorBirthday\:in\:\@ifaAuthorBirthplace\\
|
||||
\end{tabular}
|
||||
\vfill
|
||||
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{
|
||||
{\large zur Erlangung des akademischen Grades eines} \\[0.2cm]
|
||||
{\Large Diplomingenieurs\\[0.2cm](Dipl.-Ing.)}
|
||||
\vfill
|
||||
}{
|
||||
\vfill
|
||||
\vfill
|
||||
}
|
||||
\begin{tabular}{rl}
|
||||
Betreuer: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\\ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}
|
||||
Verantwortlicher Hochschullehrer: & \@ifaProfessor \\
|
||||
Tag der Einreichung: & \@ifaDayOfSubmission \\
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}{
|
||||
% ================
|
||||
% = Dissertation =
|
||||
% ================
|
||||
\begin{center}
|
||||
\vfill
|
||||
\vfill
|
||||
{\Large {\bfseries\@ifaTitleDE}}\\[5mm]
|
||||
{\Large \@ifaTitleEN}\\
|
||||
\vfill
|
||||
{\large \@ifaAuthor}
|
||||
\vfill
|
||||
Der Fakultät Elektrotechnik und Informationstechnik\\
|
||||
der Technischen Universität Dresden\\[5mm]
|
||||
zur Erlangung des akademischen Grades eines\\[2mm]
|
||||
{\Large Doktoringenieurs\\[0.2cm](Dr.-Ing.)}\\[5mm]
|
||||
vorgelegte\\
|
||||
{\bfseries Dissertation}
|
||||
\vfill
|
||||
\begin{tabular}{rl}
|
||||
Gutachter: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\\ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}
|
||||
Verantwortlicher Hochschullehrer: & \@ifaProfessor \\
|
||||
Tag der Einreichung: & \@ifaDayOfSubmission \\
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}
|
||||
\end{titlepage}
|
||||
|
||||
\cleardoublepage
|
||||
|
||||
\begingroup
|
||||
% Im Vorspann nur Seiten ohne Kopf- und Fußzeile (außer Abschnittsbeginn)
|
||||
\pagestyle{empty}
|
||||
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
|
||||
\renewcommand*{\chapterpagestyle}{empty}
|
||||
|
||||
% Aufgabenstellung
|
||||
\IfFileExists{\@ifaTopicDescriptionPDF} {
|
||||
\includepdf{\@ifaTopicDescriptionPDF}
|
||||
\cleardoublepage
|
||||
}{
|
||||
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
|
||||
\ClassWarning{ifathesis}{Es wurde keine Aufgabenstellung angegeben.}
|
||||
}{}
|
||||
}
|
||||
|
||||
% Kurzfassungen
|
||||
\IfFileExists{\@ifaAbstractDE}{
|
||||
\begin{picture}(0,0)
|
||||
\put(-97,-50){\includegraphics*{kopfzeile}}
|
||||
\end{picture}
|
||||
\vfill
|
||||
\section*{\@ifaTitleDE}
|
||||
\input{\@ifaAbstractDE}
|
||||
\vfill
|
||||
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
|
||||
\begin{flushleft}
|
||||
\scriptsize
|
||||
\begin{tabular}{ll}
|
||||
Betreuer: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\ \ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}Hochschullehrer: &\@ifaProfessor\\Tag der Einreichung: &\@ifaDayOfSubmission \\
|
||||
\end{tabular}
|
||||
\hfill
|
||||
\hrule
|
||||
\vspace{.2cm}\normalsize
|
||||
|
||||
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{DIPLOMARBEIT}{}
|
||||
\ifthenelse{\equal{\@ifaThesis}{Masterarbeit}}{MASTERARBEIT}{}
|
||||
\ifthenelse{\equal{\@ifaThesis}{Bachelorarbeit}}{BACHELORARBEIT}{}
|
||||
\ifthenelse{\equal{\@ifaThesis}{Studienarbeit}}{STUDIENARBEIT}{}
|
||||
\ifthenelse{\equal{\@ifaThesis}{Final Project}}{FINAL PROJECT}{}
|
||||
\ifthenelse{\equal{\@ifaThesis}{Forschungspraktikum}}{FORSCHUNGSPRAKTIKUM}{}
|
||||
\hfill Bearbeiter: \@ifaAuthor
|
||||
\end{flushleft}
|
||||
}{}
|
||||
\cleardoublepage
|
||||
}{
|
||||
\ClassWarning{ifathesis}{
|
||||
Konnte die englische Kurzfassung nicht finden. Diese ist fuer Arbeiten am Institut fuer
|
||||
Automatisierungstechnik unbedingt erforderlich. Sollte die Vorlage anderswo verwendet,
|
||||
dann kann diese Warnung ignoriert werden.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
% Englische Kurzfassung
|
||||
\IfFileExists{\@ifaAbstractEN}{
|
||||
\begin{picture}(0,0)
|
||||
\put(-97,-50){\includegraphics*{kopfzeile}}
|
||||
\end{picture}
|
||||
\vfill
|
||||
\section*{\@ifaTitleEN}
|
||||
\input{\@ifaAbstractEN}
|
||||
\vfill
|
||||
\ifthenelse{\not\equal{\@ifaThesis}{Dissertation}}{
|
||||
\begin{flushleft}
|
||||
\scriptsize
|
||||
\begin{tabular}{ll}
|
||||
Tutor: \ifthenelse{\equal{\@ifaSupervisorA}{}}{}{&\@ifaSupervisorA\\ \ifthenelse{\equal{\@ifaSupervisorB}{}}{}{&\@ifaSupervisorB\\ \ifthenelse{\equal{\@ifaSupervisorC}{}}{}{&\@ifaSupervisorC\\ \ifthenelse{\equal{\@ifaSupervisorD}{}}{}{&\@ifaSupervisorD\\ \ifthenelse{\equal{\@ifaSupervisorE}{}}{}{&\@ifaSupervisorE\\}}}}}Supervisor: &\@ifaProfessor\\Day of Submission: &\@ifaDayOfSubmission \\
|
||||
\end{tabular}
|
||||
\hfill
|
||||
\hrule
|
||||
\vspace{.2cm}\normalsize
|
||||
\ifthenelse{\equal{\@ifaThesis}{Diplomarbeit}}{DIPLOMA THESIS}{STUDENT RESEARCH THESIS}
|
||||
\hfill Author: \@ifaAuthor
|
||||
\end{flushleft}
|
||||
}{}
|
||||
\cleardoublepage
|
||||
}{
|
||||
\ClassWarning{ifathesis}{
|
||||
Konnte die englische Kurzfassung nicht finden. Diese ist fuer Arbeiten am Institut fuer
|
||||
Automatisierungstechnik unbedingt erforderlich. Sollte die Vorlage anderswo verwendet,
|
||||
dann kann diese Warnung ignoriert werden.
|
||||
}
|
||||
}
|
||||
|
||||
% Danksagung
|
||||
\IfFileExists{\@ifaAcknowledgements}{
|
||||
\chapter*{\IfStrEq{\@ifaThesisLanguage}{de}{Danksagung}{Acknowledgements}}
|
||||
\input{\@ifaAcknowledgements}
|
||||
\cleardoublepage
|
||||
}{}
|
||||
|
||||
% Verzeichnisse
|
||||
\pdfbookmark[1]{\@conTitle}{toc}
|
||||
\tableofcontents
|
||||
\clearpage
|
||||
\if@useListOfFigures
|
||||
\listoffigures
|
||||
\cleardoublepage
|
||||
\fi
|
||||
\if@useListOfTables
|
||||
\listoftables
|
||||
\cleardoublepage
|
||||
\fi
|
||||
\if@useListOfListings
|
||||
\lstlistoflistings
|
||||
\cleardoublepage
|
||||
\fi
|
||||
\if@useAbbrevations
|
||||
\IfFileExists{\@ifaAbbrev}{
|
||||
\input{\@ifaAbbrev}
|
||||
\cleardoublepage
|
||||
}{}
|
||||
\fi
|
||||
\endgroup
|
||||
|
||||
\mainmatter
|
||||
|
||||
\pagestyle{scrheadings}
|
||||
}
|
||||
|
||||
% ...und gleich ist Schluss!
|
||||
\AtEndDocument{
|
||||
\cleardoublepage
|
||||
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
|
||||
%\renewcommand*{\chapterpagestyle}{empty}
|
||||
% Literaturverzeichnis vor dem Anhang
|
||||
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{true}}{
|
||||
\if@isReadyForPrint
|
||||
\markboth{\@bibTitle}{}
|
||||
\else
|
||||
\markright{\@bibTitle}
|
||||
\fi
|
||||
\printbibliography
|
||||
\cleardoublepage
|
||||
\automark[section]{chapter}
|
||||
}{}
|
||||
|
||||
% Anhänge
|
||||
\IfFileExists{\@ifaAppendix}{
|
||||
\renewcommand{\appendixpagename}{\@appTitle}
|
||||
% Zuerst die Titelseite
|
||||
\begin{center}
|
||||
\thispagestyle{empty}
|
||||
\vspace*{\fill}
|
||||
{\sffamily\bf\huge\appendixpagename}
|
||||
\vspace{\fill}
|
||||
\cleardoublepage
|
||||
\end{center}
|
||||
% Nun die Anhänge, ohne Titelseite (siehe \RequirePackage --> ohne page-Option)
|
||||
\begin{appendices}
|
||||
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{true}}{
|
||||
\pagenumbering{Roman} % römische Nummerierung im Anhang
|
||||
\setcounter{page}{1} % beginne wieder mit Seitenzahl 1
|
||||
}{}
|
||||
\input{\@ifaAppendix}
|
||||
\cleardoublepage
|
||||
\end{appendices}
|
||||
}{}
|
||||
|
||||
% Literaturverzeichnis nach dem Anhang
|
||||
\ifthenelse{\equal{\@ifaBibliographyBeforeAppendix}{false}}{
|
||||
\if@isReadyForPrint
|
||||
\markboth{\@bibTitle}{}
|
||||
\else
|
||||
\markright{\@bibTitle}
|
||||
\fi
|
||||
\printbibliography
|
||||
\cleardoublepage
|
||||
\automark[section]{chapter}
|
||||
}{}
|
||||
|
||||
\backmatter
|
||||
|
||||
% Im Abspann nur Seiten ohne Kopf- und Fußzeile (außer Abschnittsbeginn)
|
||||
\pagestyle{empty}
|
||||
% Auch Abschnittsbeginn ohne Kopf- und Fußzeile
|
||||
\renewcommand*{\chapterpagestyle}{empty}
|
||||
|
||||
% Selbständigkeitserklärung
|
||||
\vspace*{\fill} %4cm}
|
||||
\section*{Selbstständigkeitserklärung}
|
||||
Hiermit versichere ich, \@ifaAuthor, geboren am \@ifaAuthorBirthday~in
|
||||
\@ifaAuthorBirthplace, dass ich \ifthenelse{\not\equal{\@ifaThesis}{Forschungspraktikum}}{die vorliegende \@ifaThesis}{das vorliegende \@ifaThesis}~zum Thema
|
||||
\begin{quote}
|
||||
\begin{center}
|
||||
\emph{\@ifaTitleDE}
|
||||
\end{center}
|
||||
\end{quote}
|
||||
ohne unzulässige Hilfe Dritter und ohne Benutzung anderer als der angegebenen Hilfsmittel angefertigt habe;
|
||||
die aus fremden Quellen direkt oder indirekt übernommenen Gedanken sind als
|
||||
solche kenntlich gemacht. Bei der Auswahl und Auswertung des Materials sowie
|
||||
bei der Herstellung des Manuskripts habe ich Unterstützungsleistungen von folgenden Personen erhalten:
|
||||
\begin{center}
|
||||
\emph{\@ifaSupervisorA\IfStrEq{\@ifaSupervisorB}{}{}{, \@ifaSupervisorB}\IfStrEq{\@ifaSupervisorC}{}{}{, \@ifaSupervisorC}\IfStrEq{\@ifaSupervisorD}{}{}{, \@ifaSupervisorD}\IfStrEq{\@ifaSupervisorE}{}{}{, \@ifaSupervisorE}\IfStrEq{\@ifaAdditionalContributors}{}{}{, \@ifaAdditionalContributors}}
|
||||
\end{center}
|
||||
Weitere Personen waren an der geistigen Herstellung \ifthenelse{\not\equal{\@ifaThesis}{Forschungspraktikum}}{der vorliegenden \@ifaThesis}{des vorliegenden \@ifaThesis s}~nicht beteiligt. Mir ist bekannt, dass die Nichteinhaltung dieser Erklärung zum nachträglichen Entzug des Diplomabschlusses (Masterabschlusses) führen kann.
|
||||
\vspace{2cm}
|
||||
\begin{flushright}
|
||||
Dresden, den \@ifaDayOfSubmission \hfill \dotfill\\
|
||||
Unterschrift
|
||||
\end{flushright}
|
||||
\vfill
|
||||
}%EOF
|
9244
bericht/kopfzeile.eps
Normal file
9244
bericht/kopfzeile.eps
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bericht/kopfzeile.pdf
Normal file
BIN
bericht/kopfzeile.pdf
Normal file
Binary file not shown.
75
bericht/nomencl.ist
Normal file
75
bericht/nomencl.ist
Normal file
@ -0,0 +1,75 @@
|
||||
%%
|
||||
%% This is file `nomencl.ist',
|
||||
%% generated with the docstrip utility.
|
||||
%%
|
||||
%% The original source files were:
|
||||
%%
|
||||
%% nomencl.dtx (with options: `idxstyle')
|
||||
%%
|
||||
%% Copyright 1996 Boris Veytsman
|
||||
%% Copyright 1999-2001 Bernd Schandl
|
||||
%% www http://sarovar.org/projects/nomencl
|
||||
%%
|
||||
%% This file can be redistributed and/or modified under the terms
|
||||
%% of the LaTeX Project Public License distributed from CTAN
|
||||
%% archives in the directory macros/latex/base/lppl.txt; either
|
||||
%% version 1.2 of the license, or (at your option) any later version.
|
||||
%%
|
||||
%%
|
||||
%% Nomenclature style file for MAKEINDEX.
|
||||
%% For nomencl v2.5 (and later)
|
||||
%%
|
||||
%% Formats glossary entries to show, e.g. nomenclature of equations.
|
||||
%%
|
||||
%% Written by Boris Veytsman boris@plmsc.psu.edu
|
||||
%% Changed by Bernd Schandl schandl@gmx.net (starting 1999/02/20)
|
||||
%% Changed by Lee Netherton ltn100@users.sourceforge.net
|
||||
%% (starting 2005/03/31)
|
||||
%%
|
||||
%% Changes:
|
||||
%% 2005/04/27. Updates to the documentation, including support for hyperref (LN)
|
||||
%% 2005/04/20. Improvements to Italian option, and minor documentation
|
||||
%% changes (LN)
|
||||
%% 2005/03/31. Made more compatible with other glossary packages. (LN)
|
||||
%% Added option to include nomenclature in TOC. (LN)
|
||||
%% 1996/11/25. Change quote character to % (BV)
|
||||
%% 1999/02/20. Removed setting of actual to its default value
|
||||
%% Removed setting of quote to '%' to get its default '"' instead
|
||||
%% Changed group_skip to do nothing; user should use \nomgroup
|
||||
%% Changed spacing in gls file
|
||||
%%
|
||||
%% \CharacterTable
|
||||
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
|
||||
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
|
||||
%% Digits \0\1\2\3\4\5\6\7\8\9
|
||||
%% Exclamation \! Double quote \" Hash (number) \#
|
||||
%% Dollar \$ Percent \% Ampersand \&
|
||||
%% Acute accent \' Left paren \( Right paren \)
|
||||
%% Asterisk \* Plus \+ Comma \,
|
||||
%% Minus \- Point \. Solidus \/
|
||||
%% Colon \: Semicolon \; Less than \<
|
||||
%% Equals \= Greater than \> Question mark \?
|
||||
%% Commercial at \@ Left bracket \[ Backslash \\
|
||||
%% Right bracket \] Circumflex \^ Underscore \_
|
||||
%% Grave accent \` Left brace \{ Vertical bar \|
|
||||
%% Right brace \} Tilde \~}
|
||||
%%
|
||||
%% ---- for input file ----
|
||||
keyword "\\nomenclatureentry"
|
||||
%% Germans might want to change this and delete the two %%
|
||||
%% quote '"'
|
||||
%% ---- for output file ----
|
||||
preamble "\\begin{thenomenclature} \n"%
|
||||
postamble "\n\n\\end{thenomenclature}\n" group_skip "\n"
|
||||
delim_0 ""
|
||||
delim_1 ""
|
||||
delim_2 ""
|
||||
%% The next lines will produce some warnings when
|
||||
%% running Makeindex as they try to cover two different
|
||||
%% versions of the program:
|
||||
lethead_prefix "\n \\nomgroup{"
|
||||
lethead_suffix "}\n"
|
||||
lethead_flag 1
|
||||
heading_prefix "\n \\nomgroup{"
|
||||
heading_suffix "}\n"
|
||||
headings_flag 1
|
103
bericht/packages.tex
Normal file
103
bericht/packages.tex
Normal file
@ -0,0 +1,103 @@
|
||||
%!TEX root = example.tex
|
||||
%*******************************************************************************
|
||||
% * Copyright (c) 2006-2013
|
||||
% * Institute of Automation, Dresden University of Technology
|
||||
% *
|
||||
% * All rights reserved. This program and the accompanying materials
|
||||
% * are made available under the terms of the Eclipse Public License v1.0
|
||||
% * which accompanies this distribution, and is available at
|
||||
% * http://www.eclipse.org/legal/epl-v10.html
|
||||
% *
|
||||
% * Contributors:
|
||||
% * Institute of Automation - TU Dresden, Germany
|
||||
% * - initial API and implementation
|
||||
% ******************************************************************************/
|
||||
|
||||
\RequirePackage[utf8]{inputenc} % Eingabe von Umlauten ermöglichen.
|
||||
\RequirePackage[T1]{fontenc} % EC-Fonts verwenden, so dass Wörter mit Umlauten getrennt werden
|
||||
\RequirePackage{lmodern} % Verbesserte Schriftart. Alternativ auch \RequirePackage{palatino}, \RequirePackage{fourier}, etc.
|
||||
|
||||
\RequirePackage{nameref} % Zusatzpaket zu hyperref. Muss vor inkompatiblen Paketen geladen werden.
|
||||
\RequirePackage{graphicx} % zum Einbinden von Graphiken (.png,.pdf,...)
|
||||
\RequirePackage{units} % zum Korrekten setzen von Einheiten mit \unit[Wert]{Einheit}
|
||||
% (noch weitere Befehle unterstützt)
|
||||
\RequirePackage{booktabs} % verbessert das Aussehen von Tabellen, neue Befehle \toprule, \midrule, etc.
|
||||
\RequirePackage{colortbl}
|
||||
\RequirePackage{multirow} % Mehrere Zeilen in Tabellen zusammenfassen
|
||||
\RequirePackage{multicol} % Mehrere Spalten in Tabellen zusammenfassen
|
||||
\RequirePackage{paralist} % Ermöglicht parametrisierbare Listen wie z.B. compactitem
|
||||
\RequirePackage{subfig} % Zum Benutzen der Subfigure Umgebung (2 Bilder in einem)
|
||||
\RequirePackage[section]{placeins} % Plaztiert zu einem Abschnitt gehörende Floating-Objekte spätestens am Ende des Abschnitts
|
||||
\RequirePackage{pdfpages} % Zum einbinden von kompletten PDF-Seiten (z.B. Aufgabenstellung)
|
||||
\RequirePackage{caption} % Paket zum Einbinden von Captions bei Nicht-Float-Objekten (hauptsächlich für Anhang)
|
||||
|
||||
\RequirePackage[ % Verwendung von biblatex für das Literaturverzeichnis
|
||||
backref=true,
|
||||
natbib=true
|
||||
]{biblatex}
|
||||
% Erlaube URL-Linebreaks
|
||||
\setcounter{biburlnumpenalty}{6000}% Penalty für Zahlenumbruch
|
||||
\setcounter{biburlucpenalty}{3000} % Penalty für Umbruch an Großbuchstaben
|
||||
\setcounter{biburllcpenalty}{9000} % Penalty für Umbruch an Kleinbuchstaben
|
||||
|
||||
\RequirePackage{csquotes} % Ergänzungspaket zu Babel für erweiterte Zitierfunktionen
|
||||
|
||||
\RequirePackage{calc} % Für Berechnungen mit Variablen
|
||||
\RequirePackage{upgreek} % Aufrechte griechische Buchstaben (beachte ISO konformer Formelsatz)
|
||||
\RequirePackage{bm} % Fette Formelzeichen (Vektoren, Matrizen, etc.)
|
||||
|
||||
\RequirePackage{microtype} % Optischer Randausgleich: Korrigert "Lücken" im Blocksatz; hervorgerufen z.B. durch Silbentrennung
|
||||
|
||||
\RequirePackage{textcomp} % Sonderzeichen wie Copyright, Trademark, Registered und nicht kursives mü
|
||||
% Zum hochgestellten Benutzen der des Registered-Zeichens
|
||||
\def\TReg{\textsuperscript{\textregistered}}
|
||||
% Zum hochgestellten Benutzen der des Copyright-Zeichens
|
||||
\def\TCop{\textsuperscript{\textcopyright}}
|
||||
% Zum hochgestellten Benutzen der des Trademark-Zeichens
|
||||
\def\TTra{\textsuperscript{\texttrademark}}
|
||||
|
||||
% für mathematische Symbole <Kompatibilität zu hyperref beachten!>
|
||||
\RequirePackage{amsmath}
|
||||
% Workaround für hyperref Verwendung
|
||||
\let\equation\gather
|
||||
% Workaround für hyperref Verwendung
|
||||
\let\endequation\endgather
|
||||
|
||||
% zur scrbook-Klasse passendes Koma-Skript- Paket zum Einbinden einer Kopf-/Fußzeile:
|
||||
\RequirePackage[
|
||||
headsepline, % headsepline für die Linie unter der Kopfzeie,
|
||||
automark % automark für das automatische Update des Kopfzeileninhalts
|
||||
]{scrpage2}
|
||||
|
||||
% Für farbige Verweise
|
||||
\RequirePackage{xcolor}
|
||||
|
||||
% Paket zum setzen von Verweisen im Dokument
|
||||
\IfStrEq{\@ifaThesisLanguage}{de}{\PassOptionsToPackage{ngerman}{hyperref}}{} % necessary for \autoref to work for german and english
|
||||
\RequirePackage[
|
||||
pdfpagelabels,
|
||||
plainpages=false,
|
||||
colorlinks=true,
|
||||
pdfdisplaydoctitle=true, %
|
||||
pdfpagemode=UseOutlines % Determines how the file is opening:
|
||||
% UseNone, UseThumbs (show thumbnails), UseOutlines (show bookmarks), FullScreen, UseOC, UseAttachments
|
||||
]{hyperref}
|
||||
|
||||
%\RequirePackage[draft]{fixme} % Zum Einfügen von Kommentaren im Text, z.B. Erinnerungen welche Stellen noch bearbeitet werden müssen.
|
||||
% Mit \fixme{}, \fxnote{}, \fxwarning{}, \fxerror{} können differnzierte Notizen gemacht werden.
|
||||
% Beim Kompilieren wird eine Zusammenfassung gegeben, wie viele fixme-Notizen noch im Dokument sind.
|
||||
|
||||
% Anhänge
|
||||
\RequirePackage[titletoc]{appendix}
|
||||
|
||||
% Quellcode Listings
|
||||
\RequirePackage{listings}
|
||||
|
||||
% Teilweise sind die Füllpunkte im Inhaltsverzeichnis nicht bündig:
|
||||
\RequirePackage{titletoc} % Inhaltsverzeichnis anpassen
|
||||
\contentsmargin{2em} % ungleiche Punkte in Verzeichnissen korrigieren
|
||||
|
||||
\RequirePackage{icomma}
|
||||
|
||||
% date time
|
||||
\RequirePackage{datetime}
|
144
bericht/rt_folgen.txt
Normal file
144
bericht/rt_folgen.txt
Normal file
@ -0,0 +1,144 @@
|
||||
#
|
||||
#Busse
|
||||
#
|
||||
#- BUS_A (Ad)
|
||||
#- BUS_B
|
||||
#- BUS_C
|
||||
#
|
||||
#- EDB (Externer Datenbus)
|
||||
#- EAB (Externer Adressbus)
|
||||
#
|
||||
#Register
|
||||
#
|
||||
#- I (Schleifenzähler)
|
||||
#
|
||||
#- ADR (Adressregister)
|
||||
#- DIN (Data In)
|
||||
#- DO (Data out)
|
||||
#
|
||||
#Rechenwerke
|
||||
#
|
||||
#ALU -> ALU_A, ALU_B
|
||||
#DIV -> DIV_A, DIV_B
|
||||
|
||||
|--+-------------------|
|
||||
| | NA |
|
||||
| | X-X |
|
||||
| | BC: |
|
||||
| | -> Load=0: IDLE |
|
||||
| | -> Load=1: LD_N_1 |
|
||||
| | Idle |
|
||||
|--+-------------------|
|
||||
|
||||
|-------------------+-----------|
|
||||
| 0 -> BUS_B -> ADR | DR |
|
||||
| EDB -> DIN | N/A - N/A |
|
||||
| | LD_N_2 |
|
||||
| | LD_N_1 |
|
||||
|-------------------+-----------|
|
||||
|
||||
|-----------------------+--------------|
|
||||
| DIN -> BUS_A -> ALU_A | NA |
|
||||
| 0 -> BUS_B -> ALU_B | SUB - Z: SET |
|
||||
| | N/A - N/A |
|
||||
| | I_GT_ZERO |
|
||||
| | LD_N_2 |
|
||||
|-----------------------+--------------|
|
||||
|
||||
|-------------------+------------------|
|
||||
| DIN -> BUS_A -> I | NA |
|
||||
| | N/A - N/A |
|
||||
| | BC: |
|
||||
| | -> Z = 0: LD_S_1 |
|
||||
| | -> Z = 1: IDLE |
|
||||
| | I_GT_ZERO |
|
||||
|-------------------+------------------|
|
||||
|
||||
|-------------------+-----------|
|
||||
| I -> BUS_A -> ADR | DR |
|
||||
| EDB -> DIN | N/A - N/A |
|
||||
| | LD_S_2 |
|
||||
| | LD_S_1 |
|
||||
|-------------------+-----------|
|
||||
|
||||
|-----------------------+--------------|
|
||||
| DIN -> BUS_A -> S | N/A |
|
||||
| DIN -> BUS_A -> ALU_A | SUB - S: SET |
|
||||
| 1 -> BUS_B -> ALU_B | - Z: SET |
|
||||
| | S_GT_ONE |
|
||||
| | LD_S_2 |
|
||||
|-----------------------+--------------|
|
||||
|
||||
|--+------------------------|
|
||||
| | N/A |
|
||||
| | N/A |
|
||||
| | BC: |
|
||||
| | -> S=0 and Z=0: X_1 |
|
||||
| | -> S=1 or Z=1: STORE_X |
|
||||
| | S_GT_ONE |
|
||||
|--+------------------------|
|
||||
|
||||
|-------------------------------+-------|
|
||||
| S_{shift 1} -> BUS_A -> DIV_A | N/A |
|
||||
| S_{shift 1} -> BUS_A -> X | N/A |
|
||||
| S_{shift 1} -> BUS_A -> OLD_X | DIV_2 |
|
||||
| S -> BUS_B -> DIV_B | X_1 |
|
||||
|-------------------------------+-------|
|
||||
|
||||
|---------------------+-------|
|
||||
| X -> BUS_A -> DIV_A | N/A |
|
||||
| S -> BUS_B -> DIV_B | N/A |
|
||||
| | DIV_2 |
|
||||
| | DIV_1 |
|
||||
|---------------------+-------|
|
||||
|
||||
|--+-------|
|
||||
| | N/A |
|
||||
| | N/A |
|
||||
| | DIV_3 |
|
||||
| | DIV_2 |
|
||||
|--+-------|
|
||||
|
||||
|--+-------|
|
||||
| | N/A |
|
||||
| | N/A |
|
||||
| | DIV_4 |
|
||||
| | DIV_3 |
|
||||
|--+-------|
|
||||
|
||||
|---------------------------------+---------------|
|
||||
| X -> BUS_A -> ALU_A | N/A |
|
||||
| DIV_{shift 1} -> BUS_B -> ALU_B | ADD - N/A |
|
||||
| | OLD_X_LTE_X_1 |
|
||||
| | DIV_4 |
|
||||
|---------------------------------+---------------|
|
||||
|
||||
|-------------------------+---------------|
|
||||
| ALU -> BUS_A -> X | N/A |
|
||||
| ALU -> BUS_A -> ALU_A | SUB - C: SET |
|
||||
| OLD_X -> BUS_B -> ALU_B | OLD_X_LTE_X_2 |
|
||||
| | OLD_X_LTE_X_1 |
|
||||
|-------------------------+---------------|
|
||||
|
||||
|---------------------+-----------------|
|
||||
| X -> BUS_A -> OLD_X | N/A |
|
||||
| | N/A |
|
||||
| | BC: |
|
||||
| | -> C=1: DIV_1 |
|
||||
| | -> C=0: STORE_X |
|
||||
| | OLD_X_LTE_X_2 |
|
||||
|---------------------+-----------------|
|
||||
|
||||
|----------------------------+---------|
|
||||
| X (shifted) -> BUS_A -> DO | DW |
|
||||
| | N/A |
|
||||
| | DEC_I |
|
||||
| | STORE_X |
|
||||
|----------------------------+---------|
|
||||
|
||||
|---------------------+--------------|
|
||||
| I -> BUS_A -> ALU_A | N/A |
|
||||
| 1 -> BUS_B -> ALU_B | SUB - Z: SET |
|
||||
| | I_GT_ZERO |
|
||||
| | DEC_I |
|
||||
|---------------------+--------------|
|
@ -6,17 +6,19 @@
|
||||
|
||||
typedef uint32_t u32;
|
||||
|
||||
#define COMMA 12
|
||||
// have to a multiply of 2
|
||||
#define COMMA 10
|
||||
#define COMMA_FIX (COMMA >> 1)
|
||||
|
||||
void heron_sqrt(u32 *mem) {
|
||||
int i = mem[0];
|
||||
while (i >= 1) {
|
||||
while (i > 0) {
|
||||
u32 s = mem[i];
|
||||
u32 x = s;
|
||||
if (s > 1) {
|
||||
// x_0 = (s + 1) / 2
|
||||
// without increment to avoid overflow for 0xffffffff
|
||||
u32 x = s >> 1;
|
||||
x = x >> 1;
|
||||
u32 old_x = x;
|
||||
|
||||
while(1) {
|
||||
@ -27,15 +29,18 @@ void heron_sqrt(u32 *mem) {
|
||||
}
|
||||
old_x = x;
|
||||
}
|
||||
mem[i] = x << COMMA_FIX;
|
||||
}
|
||||
mem[i] = x << COMMA_FIX;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
float data[] = {
|
||||
0,
|
||||
/0,
|
||||
//0.5,
|
||||
1.0 / (1 << COMMA),
|
||||
1.0 / (1 << (COMMA - 1)),
|
||||
1,
|
||||
2,
|
||||
2.5,
|
||||
@ -68,16 +73,19 @@ int main() {
|
||||
mem[0] = length;
|
||||
|
||||
for (i = 1; i <= length; i++) {
|
||||
// float to fixed point
|
||||
mem[i] = (u32) (data[i] * (1 << COMMA));
|
||||
}
|
||||
|
||||
heron_sqrt(mem);
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
if (data[i] < (0xfffffff >> (COMMA))) {
|
||||
printf("s = %f\n", data[i]);
|
||||
printf("sqrt(s) = %f\n", sqrt(data[i]));
|
||||
printf("heron_sqrt(s) = %f\n", ((float) mem[i]) / (1 << COMMA));
|
||||
// out-range-check
|
||||
if (data[i] <= (0xffffffff >> COMMA)) {
|
||||
printf("s = %10.10f\n", data[i]);
|
||||
printf("sqrt(s) = %10.10f\n", sqrt(data[i]));
|
||||
// fixed point to float
|
||||
printf("heron_sqrt(s) = %10.10f\n", ((float) mem[i]) / (1 << COMMA));
|
||||
}
|
||||
puts("\n");
|
||||
}
|
39
verilog/heron_ctrl.v
Normal file
39
verilog/heron_ctrl.v
Normal file
@ -0,0 +1,39 @@
|
||||
module heron_ctrl(
|
||||
state,
|
||||
ready,
|
||||
ram_wr_en,
|
||||
ram_rd_en,
|
||||
alu_mode,
|
||||
alu_set_z,
|
||||
alu_set_c,
|
||||
alu_set_s,
|
||||
k0_to_b,
|
||||
k1_to_b,
|
||||
alu_to_b,
|
||||
a_to_adr,
|
||||
a_to_i,
|
||||
a_to_old_x,
|
||||
a_to_s,
|
||||
a_to_x,
|
||||
b_to_adr,
|
||||
din_to_a,
|
||||
div_to_b_shift_1,
|
||||
i_to_a,
|
||||
old_x_to_b,
|
||||
s_to_b,
|
||||
s_to_b_shift_1,
|
||||
x_to_a,
|
||||
x_to_b_shifted);
|
||||
|
||||
input [3:0] state;
|
||||
|
||||
output ready;
|
||||
output ram_wr_en;
|
||||
output ram_rd_en;
|
||||
output rom_rd_en;
|
||||
output alu_mode;
|
||||
|
||||
always @(state) begin
|
||||
end
|
||||
|
||||
endmodule
|
80
verilog/heron_fsm.v
Normal file
80
verilog/heron_fsm.v
Normal file
@ -0,0 +1,80 @@
|
||||
module heron_fsm(clk, load, reset, flag_z, flag_c, flag_s, state);
|
||||
// (C) 1953, Frank Gray
|
||||
parameter IDLE = 4'b0000;
|
||||
parameter LD_N_1 = 4'b0001;
|
||||
parameter LD_N_2 = 4'b0011;
|
||||
parameter I_GT_ZERO = 4'b0010;
|
||||
parameter LD_S_1 = 4'b0110;
|
||||
parameter LD_S_2 = 4'b0111;
|
||||
parameter S_GT_ONE = 4'b0101;
|
||||
parameter X_1 = 4'b0100;
|
||||
parameter DIV_1 = 4'b1100;
|
||||
parameter DIV_2 = 4'b1101;
|
||||
parameter DIV_3 = 4'b1111;
|
||||
parameter DIV_4 = 4'b1110;
|
||||
parameter OLD_X_LTE_X_1 = 4'b1010;
|
||||
parameter OLD_X_LTE_X_2 = 4'b1011;
|
||||
parameter STORE_X = 4'b1001;
|
||||
parameter DEC_I = 4'b1000;
|
||||
|
||||
input clk;
|
||||
input load;
|
||||
input reset;
|
||||
|
||||
input flag_z;
|
||||
input flag_c;
|
||||
input flag_s;
|
||||
|
||||
output [3:0] state;
|
||||
|
||||
reg [3:0] state;
|
||||
reg [3:0] next_state;
|
||||
|
||||
always @(posedge clk or posedge reset)
|
||||
if(reset) begin
|
||||
state <= IDLE;
|
||||
end else begin
|
||||
state <= next_state;
|
||||
end
|
||||
|
||||
always @(state or flag_z or load)
|
||||
case(state)
|
||||
IDLE:
|
||||
if(load) begin
|
||||
next_state = LD_N_1;
|
||||
end else begin
|
||||
next_state = IDLE;
|
||||
end
|
||||
LD_N_1: next_state = LD_N_2;
|
||||
LD_N_2: next_state = I_GT_ZERO;
|
||||
I_GT_ZERO:
|
||||
if (flag_z) begin
|
||||
next_state = LD_S_1;
|
||||
end else begin
|
||||
next_state = IDLE;
|
||||
end
|
||||
LD_S_1: next_state = LD_S_2;
|
||||
LD_S_2: next_state = S_GT_ONE;
|
||||
S_GT_ONE:
|
||||
if (flag_s || flag_z) begin
|
||||
next_state = STORE_X;
|
||||
end else begin
|
||||
next_state = X_1;
|
||||
end
|
||||
X_1: next_state = DIV_2;
|
||||
DIV_1: next_state = DIV_2;
|
||||
DIV_2: next_state = DIV_3;
|
||||
DIV_3: next_state = DIV_4;
|
||||
DIV_4: next_state = OLD_X_LTE_X_1;
|
||||
OLD_X_LTE_X_1: next_state = OLD_X_LTE_X_2;
|
||||
OLD_X_LTE_X_2:
|
||||
if (flag_c) begin
|
||||
next_state = DIV_1;
|
||||
end else begin
|
||||
next_state = STORE_X;
|
||||
end
|
||||
STORE_X: next_state = DEC_I;
|
||||
DEC_I: next_state = I_GT_ZERO;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
62
verilog/heron_fsm_tb.v
Normal file
62
verilog/heron_fsm_tb.v
Normal file
@ -0,0 +1,62 @@
|
||||
module heron_fsm_tb;
|
||||
task assert;
|
||||
input condition;
|
||||
input [(20*8 - 1):0] message;
|
||||
begin
|
||||
if (condition !== 1'b1)
|
||||
begin
|
||||
$display("Assertion Failed: %s", message);
|
||||
$finish(2);
|
||||
end
|
||||
end
|
||||
endtask
|
||||
|
||||
parameter CYCLE = 50;
|
||||
|
||||
reg clk, reset;
|
||||
reg load;
|
||||
reg flag_z, flag_c, flag_s;
|
||||
|
||||
wire[3:0] state;
|
||||
|
||||
heron_fsm fsm(
|
||||
.clk(clk),
|
||||
.reset(reset),
|
||||
.load(load),
|
||||
.state(state),
|
||||
.flag_z(flag_z),
|
||||
.flag_c(flag_c),
|
||||
.flag_s(flag_s)
|
||||
);
|
||||
|
||||
initial clk = 1'b0;
|
||||
always #(CYCLE/2) clk = ~clk;
|
||||
|
||||
initial begin
|
||||
$dumpfile("fsm.vcd");
|
||||
$dumpvars;
|
||||
end
|
||||
|
||||
initial begin
|
||||
reset = 1'b1;
|
||||
#(3*CYCLE)
|
||||
reset = 1'b0;
|
||||
end
|
||||
|
||||
initial begin
|
||||
load = 0;
|
||||
#(5*CYCLE)
|
||||
load = 1;
|
||||
#(CYCLE)
|
||||
load = 0;
|
||||
|
||||
assert(state == fsm.LD_N_1, "IDLE -> LD_N_1");
|
||||
#(CYCLE)
|
||||
assert(state == fsm.LD_N_2, "LD_N_1 -> LD_N_2");
|
||||
#(CYCLE)
|
||||
assert(state == fsm.I_GT_ZERO, "LD_N_2 -> I_GT_ZERO");
|
||||
|
||||
$display("All tests passed!");
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user