2013-07-20 15:19:12 +02:00
\chapter { Programming Yosys Extensions}
\label { chapter:prog}
2014-12-31 14:26:54 +01: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
2021-03-22 19:16:25 +01:00
be afraid to ask questions on the YosysHQ Slack.
2013-07-20 15:19:12 +02:00
2021-03-22 19:16:25 +01:00
\section { Guidelines}
2014-12-31 14:26:54 +01:00
2021-03-22 19:16:25 +01:00
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.
2014-12-31 14:26:54 +01:00
2021-03-22 19:16:25 +01:00
\lstinputlisting [title=GettingStarted,numbers=left,frame=single] { ../guidelines/GettingStarted}
\lstinputlisting [title=CodingStyle,numbers=left,frame=single] { ../guidelines/CodingStyle}
2014-12-31 14:26:54 +01:00
\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 15:19:12 +02:00
2013-08-07 02:19:35 +02:00
2014-01-28 06:55:47 +01:00
\lstinputlisting [title=stubnets.cc,numbers=left,frame=single,language=C++] { CHAPTER_ Prog/stubnets.cc}
2013-08-07 02:19:35 +02:00
2014-01-28 06:55:47 +01:00
\lstinputlisting [title=Makefile,numbers=left,frame=single,language=make] { CHAPTER_ Prog/Makefile}
2013-08-07 02:19:35 +02:00
2014-01-28 06:55:47 +01:00
\lstinputlisting [title=test.v,numbers=left,frame=single,language=Verilog] { CHAPTER_ Prog/test.v}