2 \chapter{Programming Yosys Extensions
}
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 Yosys Subreddit.
10 \section{The ``CodingReadme'' File
}
12 The following is an excerpt of the
{\tt CodingReadme
} file from the Yosys source tree.
14 \lstinputlisting[title=CodingReadme,rangeprefix=--,rangesuffix=--,includerangemarker=false,linerange=snip-snap,numbers=left,frame=single
]{../CodingReadme
}
16 \section{The ``stubsnets'' Example Module
}
18 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 \lstinputlisting[title=stubnets.cc,numbers=left,frame=single,language=C++
]{CHAPTER_Prog/stubnets.cc
}
23 \lstinputlisting[title=Makefile,numbers=left,frame=single,language=make
]{CHAPTER_Prog/Makefile
}
25 \lstinputlisting[title=test.v,numbers=left,frame=single,language=Verilog
]{CHAPTER_Prog/test.v
}