aboutsummaryrefslogtreecommitdiffstats
path: root/manual/CHAPTER_Prog.tex
blob: 49432f73b64008014c50d137d00a913135ccbaab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
\chapter{Programming Yosys Extensions}
\label{chapter:prog}

This chapter contains some bits and pieces of information about programming
yosys extensions. Also consult the section on programming in the ``Yosys
Presentation'' (can be downloaded from the Yosys website as PDF) and don't
be afraid to ask questions on the YosysHQ Slack.

\section{Guidelines}

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.

\lstinputlisting[title=GettingStarted,numbers=left,frame=single]{../guidelines/GettingStarted}

\lstinputlisting[title=CodingStyle,numbers=left,frame=single]{../guidelines/CodingStyle}

\section{The ``stubsnets'' Example Module}

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}.


\lstinputlisting[title=stubnets.cc,numbers=left,frame=single,language=C++]{CHAPTER_Prog/stubnets.cc}

\lstinputlisting[title=Makefile,numbers=left,frame=single,language=make]{CHAPTER_Prog/Makefile}

\lstinputlisting[title=test.v,numbers=left,frame=single,language=Verilog]{CHAPTER_Prog/test.v}