2013-07-20 08:19:12 -05:00
\chapter { Programming Yosys Extensions}
\label { chapter:prog}
2014-12-31 07:26:54 -06:00
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 Yosys Subreddit.
2013-07-20 08:19:12 -05:00
2014-12-31 07:26:54 -06:00
\section { The ``CodingReadme'' File}
The following is an excerpt of the { \tt CodingReadme} file from the Yosys source tree.
\lstinputlisting [title=CodingReadme,rangeprefix=--,rangesuffix=--,includerangemarker=false,linerange=snip-snap,numbers=left,frame=single] { ../CodingReadme}
\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} .
2013-07-20 08:19:12 -05:00
2013-08-06 19:19:35 -05:00
2014-01-27 23:55:47 -06:00
\lstinputlisting [title=stubnets.cc,numbers=left,frame=single,language=C++] { CHAPTER_ Prog/stubnets.cc}
2013-08-06 19:19:35 -05:00
2014-01-27 23:55:47 -06:00
\lstinputlisting [title=Makefile,numbers=left,frame=single,language=make] { CHAPTER_ Prog/Makefile}
2013-08-06 19:19:35 -05:00
2014-01-27 23:55:47 -06:00
\lstinputlisting [title=test.v,numbers=left,frame=single,language=Verilog] { CHAPTER_ Prog/test.v}
2013-08-06 19:19:35 -05:00