@@ -213,16 +213,31 @@ in the right direction:
213213 Try running the unminimized script and search the log for the names of the
214214objects in your minimized design. In the case of cells you can also search for
215215the type of the cell. Remember that calling `stat ` will list all the types of
216- cells currently used in the design, and `select -list =* ` will list the names of
217- of all the current objects. You can add these commands to your script, or use
218- an interactive terminal to run each command individually. Adding them to the
219- script can be more repeatable, but if it takes a long time to run to the point
220- you're interested in then an interactive shell session can give you more
216+ cells currently used in the design, and `` select -list =* `` will list the names
217+ of of all the current objects. You can add these commands to your script, or
218+ use an interactive terminal to run each command individually. Adding them to
219+ the script can be more repeatable, but if it takes a long time to run to the
220+ point you're interested in then an interactive shell session can give you more
221221flexibility once you reach that point. You can also add a call to the `shell `
222222command at any point in a script to start an interactive session at a given
223223point; allowing you to script any preparation steps, then come back once it's
224224done.
225225
226+ The ``--dump-design `` option
227+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
228+
229+ Yosys provides the ``--dump-design `` option (or ``-P `` for short) for dumping
230+ the design at specific steps of the script based on the log header. If the last
231+ step before an error is ``7.2. Executing MEMORY_MAP pass (converting memories to
232+ logic and flip-flops) ``, then calling Yosys with ``--dump-design 7.2:bad.il ``
233+ will save the design *before * this command runs, in the file ``bad.il ``.
234+
235+ It is also possible to use this option multiple times, e.g. ``-P2:hierarchy.il
236+ -P7 -P7.2:bad.il ``, to get multiple dumps in the same run. This can make it
237+ easier to follow the design through each step to find where certain cells or
238+ connections are coming from. ``--dump-design ALL `` is also allowed, writing out
239+ the design at each log header.
240+
226241A worked example
227242~~~~~~~~~~~~~~~~
228243
0 commit comments