Merge pull request #3310 from robinsonb5-PRs/master
[yosys.git] / manual / CHAPTER_Prog.tex
1
2 \chapter{Programming Yosys Extensions}
3 \label{chapter:prog}
4
5 This chapter contains some bits and pieces of information about programming
6 yosys extensions. Also consult the section on programming in the ``Yosys
7 Presentation'' (can be downloaded from the Yosys website as PDF) and don't
8 be afraid to ask questions on the YosysHQ Slack.
9
10 \section{Guidelines}
11
12 The {\tt guidelines} directory contains notes on various aspects of Yosys development. The files {\tt GettingStarted} and {\tt CodingStyle} may be of particular interest, and are reproduced here.
13
14 \lstinputlisting[title=GettingStarted,numbers=left,frame=single]{../guidelines/GettingStarted}
15
16 \lstinputlisting[title=CodingStyle,numbers=left,frame=single]{../guidelines/CodingStyle}
17
18 \section{The ``stubsnets'' Example Module}
19
20 The following is the complete code of the ``stubsnets'' example module. It is included in the Yosys source distribution as {\tt manual/CHAPTER\_Prog/stubnets.cc}.
21
22
23 \lstinputlisting[title=stubnets.cc,numbers=left,frame=single,language=C++]{CHAPTER_Prog/stubnets.cc}
24
25 \lstinputlisting[title=Makefile,numbers=left,frame=single,language=make]{CHAPTER_Prog/Makefile}
26
27 \lstinputlisting[title=test.v,numbers=left,frame=single,language=Verilog]{CHAPTER_Prog/test.v}