sv: More tests for wildcard port connections
[yosys.git] / manual / manual.tex
1 \documentclass[oneside,a4paper]{book}
2
3 \usepackage[T1]{fontenc} % required for luximono!
4 \usepackage{lmodern}
5 \usepackage[scaled=0.8]{luximono} % typewriter font with bold face
6
7 % To install the luximono font files:
8 % getnonfreefonts-sys --all or
9 % getnonfreefonts-sys luximono
10 %
11 % when there are trouble you might need to:
12 % - Create /etc/texmf/updmap.d/99local-luximono.cfg
13 % containing the single line: Map ul9.map
14 % - Run update-updmap followed by mktexlsr and updmap-sys
15 %
16 % This commands must be executed as root with a root environment
17 % (i.e. run "sudo su" and then execute the commands in the root
18 % shell, don't just prefix the commands with "sudo").
19
20 % formats the text according the set language
21 \usepackage[english]{babel}
22 \usepackage[table,usenames]{xcolor}
23 % generates indices with the "\index" command
24 \usepackage{makeidx}
25 % enables import of graphics. We use pdflatex here so do the pdf optimisation.
26 %\usepackage[dvips]{graphicx}
27 \usepackage[pdftex]{graphicx}
28 \usepackage{pdfpages}
29 % includes floating objects like tables and figures.
30 \usepackage{float}
31 % for generating subfigures with ohne indented captions
32 \usepackage[hang]{subfigure}
33 % redefines and smartens captions of figures and tables (indentation, smaller and boldface)
34 \usepackage[hang,small,bf,center]{caption}
35 % enables tabstops and the numeration of lines
36 \usepackage{moreverb}
37 % enables user defined header and footer lines (former "fancyheadings")
38 \usepackage{fancyhdr}
39 % Some smart mathematical stuff
40 \usepackage{amsmath}
41 % Package for rotating several objects
42 \usepackage{rotating}
43 \usepackage{natbib}
44 \usepackage{epsf}
45 \usepackage{dsfont}
46 \usepackage[algochapter, boxruled, vlined]{algorithm2e}
47 %Activating and setting of character protruding - if you like
48 %\usepackage[activate,DVIoutput]{pdfcprot}
49 % If you really need special chars...
50 \usepackage[latin1]{inputenc}
51 % Hyperlinks
52 \usepackage[colorlinks,hyperindex,plainpages=false,%
53 pdftitle={Yosys Manual},%
54 pdfauthor={Clifford Wolf},%
55 %pdfkeywords={keyword},%
56 pdfpagelabels,%
57 pagebackref,%
58 bookmarksopen=false%
59 ]{hyperref}
60 % For the two different reference lists ...
61 \usepackage{multibib}
62 \usepackage{multirow}
63 \usepackage{booktabs}
64 \usepackage{pdfpages}
65
66 \usepackage{listings}
67 \usepackage{pifont}
68 \usepackage{skull}
69 % \usepackage{draftwatermark}
70
71 \usepackage{tikz}
72 \usetikzlibrary{calc}
73 \usetikzlibrary{arrows}
74 \usetikzlibrary{scopes}
75 \usetikzlibrary{through}
76 \usetikzlibrary{shapes.geometric}
77
78 \lstset{basicstyle=\ttfamily}
79
80 \def\B#1{{\tt\textbackslash{}#1}}
81 \def\C#1{\lstinline[language=C++]{#1}}
82 \def\V#1{\lstinline[language=Verilog]{#1}}
83
84 \newsavebox{\fixmebox}
85 \newenvironment{fixme}%
86 {\newcommand\colboxcolor{FFBBBB}%
87 \begin{lrbox}{\fixmebox}%
88 \begin{minipage}{\dimexpr\columnwidth-2\fboxsep\relax}}
89 {\end{minipage}\end{lrbox}\textbf{FIXME: }\\%
90 \colorbox[HTML]{\colboxcolor}{\usebox{\fixmebox}}}
91
92 \newcites{weblink}{Internet References}
93
94 \setcounter{secnumdepth}{3}
95 \makeindex
96
97 \setlength{\oddsidemargin}{4mm}
98 \setlength{\evensidemargin}{-6mm}
99 \setlength{\textwidth}{162mm}
100 \setlength{\textheight}{230mm}
101 \setlength{\topmargin}{-5mm}
102
103 \setlength{\parskip}{1.5ex plus 1ex minus 0.5ex}
104 \setlength{\parindent}{0pt}
105
106 \lstdefinelanguage{liberty}{
107 morecomment=[s]{/*}{*/},
108 morekeywords={library,cell,area,pin,direction,function,clocked_on,next_state,clock,ff},
109 morestring=[b]",
110 }
111
112 \lstdefinelanguage{rtlil}{
113 morecomment=[l]{\#},
114 morekeywords={module,attribute,parameter,wire,memory,auto,width,offset,size,input,output,inout,cell,connect,switch,case,assign,sync,low,high,posedge,negedge,edge,always,update,process,end},
115 morestring=[b]",
116 }
117
118
119
120 \begin{document}
121
122 \fancypagestyle{mypagestyle}{%
123 \fancyhf{}%
124 \fancyhead[C]{\leftmark}%
125 \fancyfoot[C]{\thepage}%
126 \renewcommand{\headrulewidth}{0pt}%
127 \renewcommand{\footrulewidth}{0pt}}
128 \pagestyle{mypagestyle}
129
130 \thispagestyle{empty}
131 \null\vfil
132
133 \begin{center}
134 \bf\Huge Yosys Manual
135
136 \bigskip
137 \large Clifford Wolf
138 \end{center}
139
140 \vfil\null
141 \eject
142
143 \chapter*{Abstract}
144 Most of today's digital design is done in HDL code (mostly Verilog or VHDL) and
145 with the help of HDL synthesis tools.
146
147 In special cases such as synthesis for coarse-grain cell libraries or when
148 testing new synthesis algorithms it might be necessary to write a custom HDL
149 synthesis tool or add new features to an existing one. In these cases the
150 availability of a Free and Open Source (FOSS) synthesis tool that can be used
151 as basis for custom tools would be helpful.
152
153 In the absence of such a tool, the Yosys Open SYnthesis Suite (Yosys) was
154 developed. This document covers the design and implementation of this tool.
155 At the moment the main focus of Yosys lies on the high-level aspects of
156 digital synthesis. The pre-existing FOSS logic-synthesis tool ABC is used
157 by Yosys to perform advanced gate-level optimizations.
158
159 An evaluation of Yosys based on real-world designs is included. It is shown
160 that Yosys can be used as-is to synthesize such designs. The results produced
161 by Yosys in this tests where successfully verified using formal verification
162 and are comparable in quality to the results produced by a commercial
163 synthesis tool.
164
165 \bigskip
166
167 This document was originally published as bachelor thesis at the Vienna
168 University of Technology \cite{BACC}.
169
170 \chapter*{Abbreviations}
171 \begin{tabular}{ll}
172 AIG & And-Inverter-Graph \\
173 ASIC & Application-Specific Integrated Circuit \\
174 AST & Abstract Syntax Tree \\
175 BDD & Binary Decision Diagram \\
176 BLIF & Berkeley Logic Interchange Format \\
177 EDA & Electronic Design Automation \\
178 EDIF & Electronic Design Interchange Format \\
179 ER Diagram & Entity-Relationship Diagram \\
180 FOSS & Free and Open-Source Software \\
181 FPGA & Field-Programmable Gate Array \\
182 FSM & Finite-state machine \\
183 HDL & Hardware Description Language \\
184 LPM & Library of Parameterized Modules \\
185 RTLIL & RTL Intermediate Language \\
186 RTL & Register Transfer Level \\
187 SAT & Satisfiability Problem \\
188 % SSA & Static Single Assignment Form \\
189 VHDL & VHSIC Hardware Description Language \\
190 VHSIC & Very-High-Speed Integrated Circuit \\
191 YOSYS & Yosys Open SYnthesis Suite \\
192 \end{tabular}
193
194 \tableofcontents
195
196 \include{CHAPTER_Intro}
197 \include{CHAPTER_Basics}
198 \include{CHAPTER_Approach}
199 \include{CHAPTER_Overview}
200 \include{CHAPTER_CellLib}
201 \include{CHAPTER_Prog}
202
203 \include{CHAPTER_Verilog}
204 \include{CHAPTER_Optimize}
205 \include{CHAPTER_Techmap}
206 % \include{CHAPTER_Eval}
207
208 \appendix
209
210 \include{CHAPTER_Auxlibs}
211 \include{CHAPTER_Auxprogs}
212
213 \chapter{Command Reference Manual}
214 \label{commandref}
215 \input{command-reference-manual}
216
217 \include{CHAPTER_Appnotes}
218 % \include{CHAPTER_StateOfTheArt}
219
220 \bibliography{literature}
221 \bibliographystyle{alphadin}
222
223 \bibliographyweblink{weblinks}
224 \bibliographystyleweblink{abbrv}
225
226 \end{document}