@@ -105,19 +105,21 @@ Actual Behaviour
105105Describe what you actually see when you follow the reproduction steps.
106106
107107This can include:
108- - any error messages
109- - any details relevant to the crash that were found with ``--trace `` or
108+
109+ * any error messages
110+ * any details relevant to the crash that were found with ``--trace `` or
110111 ``--debug `` flags
111- - the part of the source code that triggers the bug
112- + if possible, use a permalink to the source on GitHub
113- + you can browse the source repository for a certain commit with the failure
112+ * the part of the source code that triggers the bug
113+
114+ * if possible, use a permalink to the source on GitHub
115+ * you can browse the source repository for a certain commit with the failure
114116 and open the source file, select the relevant lines (click on the line
115117 number for the first relevant line, then while holding shift click on the
116118 line number for the last relevant line), click on the ``... `` that appears
117119 and select "Copy permalink"
118- + should look something like
120+ * should look something like
119121 ``https://github.com/YosysHQ/yosys/blob/<commit_hash>/path/to/file#L139-L147 ``
120- + clicking on "Preview" should reveal a code block containing the lines of
122+ * clicking on "Preview" should reveal a code block containing the lines of
121123 source specified, with a link to the source file at the given commit
122124
123125
@@ -184,43 +186,46 @@ New additions are expected to be a lot cleaner.
184186
185187Your change should contain exactly what it needs. This means:
186188
187- - nothing more than that - no dead code etc
188- - nothing missing
189+ * nothing more than that - no dead code etc
190+ * nothing missing
189191
190192Here are some software engineering approaches that help:
191193
192- - Use abstraction to model the problem and hide details
193- - Maximize the usage of types (structs over loose variables),
194+ * Use abstraction to model the problem and hide details
195+
196+ * Maximize the usage of types (structs over loose variables),
194197 not necessarily in an object-oriented way
195- - Use functions, scopes, type aliases
196- - In new passes, make sure the logic behind how and why it works is actually provided
198+ * Use functions, scopes, type aliases
199+
200+ * In new passes, make sure the logic behind how and why it works is actually provided
197201 in coherent comments, and that variable and type naming is consistent with the terms
198202 you use in the description.
199- - The logic of the implementation should be described in mathematical
203+ * The logic of the implementation should be described in mathematical
200204 or algorithm theory terms. Why would a non-trivial loop be guaranteed to terminate?
201205 Is there some variant? Are you re-implementing a classic data structure from logic
202206 synthesis?
203- - There's various ways of traversing the design with use-def indices (for getting
207+ * There's various ways of traversing the design with use-def indices (for getting
204208 drivers and driven signals) available in Yosys. They have advantages and sometimes
205209 disadvantages. Prefer not re-implementing these
206- - Prefer references over pointers, and smart pointers over raw pointers
207- - Aggressively deduplicate code. Within functions, within passes,
210+ * Prefer references over pointers, and smart pointers over raw pointers
211+ * Aggressively deduplicate code. Within functions, within passes,
208212 across passes, even against existing code
209- - Refactor and document existing code if you touch it,
213+ * Refactor and document existing code if you touch it,
210214 but in separate commits from your functional changes
211- - Prefer smaller commits organized by good chunks. Git has a lot of features
215+ * Prefer smaller commits organized by good chunks. Git has a lot of features
212216 like fixup commits, interactive rebase with autosquash
213- - Prefer declaring things ``const ``
214- - Prefer range-based for loops over C-style
217+ * Prefer declaring things ``const ``
218+ * Prefer range-based for loops over C-style
215219
216220Common mistakes
217221~~~~~~~~~~~~~~~
218222
219223.. - Pointer invalidation when erasing design objects on a module while iterating
220224.. TODO figure out how it works again and describe it
221- - Iterating over an entire design and checking if things are selected is more
222- inefficient than using the ``selected_* `` methods
223- - Remember to call ``fixup_ports `` at the end if you're modifying module interfaces
225+
226+ * Iterating over an entire design and checking if things are selected is more
227+ inefficient than using the ``selected_* `` methods
228+ * Remember to call ``fixup_ports `` at the end if you're modifying module interfaces
224229
225230Testing your change
226231~~~~~~~~~~~~~~~~~~~
@@ -244,7 +249,7 @@ See :doc:`/yosys_internals/extending_yosys/test_suites` for more information
244249about how our test suite is structured.
245250The basic test writing approach is checking
246251for the presence of some kind of object or pattern with ``-assert-count `` in
247- :doc: `docs/source/ using_yosys/more_scripting/selections.rst `.
252+ :doc: `/ using_yosys/more_scripting/selections `.
248253
249254It's often best to use equivalence checking with ``equiv_opt -assert ``
250255or similar to prove that the changes done to the design by a modified pass
0 commit comments