Skip to content

Commit a44a066

Browse files
Docs: Update example_synth
We can now fake the `yosys> flatten;;` line, so we no longer need to explain the split flatten/clean.
1 parent 47fa75b commit a44a066

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

docs/source/code_examples/fifo/fifo.out

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,15 @@ yosys> show -color maroon3 c:fifo_reader -color cornflowerblue @new_cells -notit
306306
Writing dot description to `rdata_proc.dot'.
307307
Dumping selected parts of module fifo to page 1.
308308

309-
yosys> flatten
309+
yosys> echo off
310+
echo off
311+
yosys> flatten;;
310312

311313
15. Executing FLATTEN pass (flatten design).
312314
Deleting now unused module $paramod\addr_gen\MAX_DATA=s32'00000000000000000000000100000000.
313315
<suppressed ~2 debug messages>
314-
315-
yosys> clean
316316
Removed 3 unused cells and 25 unused wires.
317+
echo on
317318

318319
yosys> select -set rdata_path o:rdata %ci*
319320

docs/source/code_examples/fifo/fifo.ys

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ show -color maroon3 c:fifo_reader -color cornflowerblue @new_cells -notitle -for
3939

4040
# ========================================================
4141

42+
echo off
43+
log "yosys> flatten;;"
4244
flatten;;
45+
echo on
4346
select -set rdata_path o:rdata %ci*
4447
select -set new_cells @rdata_path o:rdata %ci3 %d i:* %d
4548
show -color maroon3 @new_cells -notitle -format dot -prefix rdata_flat @rdata_path

docs/source/getting_started/example_synth.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ optimizations between modules which would otherwise be missed. Let's run
292292

293293
.. literalinclude:: /code_examples/fifo/fifo.out
294294
:language: doscon
295-
:start-at: yosys> flatten
296-
:end-before: yosys> select
295+
:start-at: yosys> flatten;;
296+
:end-before: echo on
297297
:name: flat_clean
298298
:caption: output of :yoscrypt:`flatten;;`
299299

@@ -313,13 +313,6 @@ and merged with the ``raddr`` wire feeding into the ``$memrd`` cell. This wire
313313
merging happened during the call to :cmd:ref:`clean` which we can see in the
314314
:ref:`flat_clean`.
315315

316-
.. note::
317-
318-
:cmd:ref:`flatten` and :cmd:ref:`clean` would normally be combined into a
319-
single :yoterm:`yosys> flatten;;` output, but they appear separately here as
320-
a side effect of using :cmd:ref:`echo` for generating the terminal style
321-
output.
322-
323316
Depending on the target architecture, this stage of synthesis might also see
324317
commands such as :cmd:ref:`tribuf` with the ``-logic`` option and
325318
:cmd:ref:`deminout`. These remove tristate and inout constructs respectively,

0 commit comments

Comments
 (0)