3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 10:05:33 +00:00

Docs: tidying

- Use `:file:` role for file names, as well as `:makevar:` and `:program:`.
- Remove deprecated `linux-arm` and `linux-riscv64` oss-cad-suite targets.
- Add link to ABC.
- More (and better) links to code examples.  Formatted `:file:` text with link
  to source on github.
- Includes a few extra todos (mostly picking up inline code blocks and a couple
  intro reminders).
- Fixing a few missing `:yoscrypt:` and `:cmd:ref:` tags.
- Reflowing some paragraphs for spacing/width.
This commit is contained in:
Krystine Sherwin 2024-01-30 13:31:00 +13:00
parent a7e1c6e530
commit 9878e69d6c
No known key found for this signature in database
18 changed files with 348 additions and 255 deletions

View file

@ -5,13 +5,13 @@ On the previous page we went through a synthesis script, running each command in
the interactive Yosys shell. On this page, we will be introducing the script
file format and how you can make your own synthesis scripts.
Yosys script files typically use the ``.ys`` extension and contain a set of
Yosys script files typically use the :file:`.ys` extension and contain a set of
commands for Yosys to run sequentially. These commands are the same ones we
were using on the previous page like :cmd:ref:`read_verilog` and
:cmd:ref:`hierarchy`. As with the interactive shell, each command consists of
the command name, and an optional whitespace separated list of arguments.
Commands are terminated with the newline character, or by a semicolon (;).
Empty lines, and lines starting with the hash sign (#), are ignored.
Commands are terminated with the newline character, or by a semicolon (;). Empty
lines, and lines starting with the hash sign (#), are ignored.
The synthesis starter script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -21,7 +21,7 @@ The synthesis starter script
All of the images and console output used in
:doc:`/getting_started/example_synth` were generated by Yosys, using Yosys
script files found in ``docs/source/code_examples/fifo``. If you haven't
script files found in :file:`docs/source/code_examples/fifo`. If you haven't
already, let's take a look at some of those script files now.
.. literalinclude:: /code_examples/fifo/fifo.ys
@ -29,7 +29,7 @@ already, let's take a look at some of those script files now.
:lineno-match:
:start-at: echo on
:end-before: design -reset
:caption: A section of ``fifo.ys``, generating the images used for :ref:`addr_gen_example`
:caption: A section of :file:`fifo.ys`, generating the images used for :ref:`addr_gen_example`
:name: fifo-ys
The first command there, :yoscrypt:`echo on`, uses :cmd:ref:`echo` to enable
@ -121,9 +121,9 @@ what the different symbols represent, see :ref:`interactive_show` and the
.. _GraphViz: http://www.graphviz.org/
.. _xdot: https://github.com/jrfonseca/xdot.py
This is the first :yoscrypt:`show` command we called in ``fifo.ys``, :ref:`as we
saw above <fifo-ys>`. If we look at the log output for this image we see the
following:
This is the first :yoscrypt:`show` command we called in :file:`fifo.ys`,
:ref:`as we saw above <fifo-ys>`. If we look at the log output for this image
we see the following:
.. literalinclude:: /code_examples/fifo/fifo.out
:language: doscon
@ -131,14 +131,14 @@ following:
:end-before: yosys> show
Calling :cmd:ref:`show` with :yoscrypt:`-format dot` tells it we want to output
a ``.dot`` file rather than opening it for display. The :yoscrypt:`-prefix
addr_gen_show` option indicates we want the file to be called `addr_gen_show.*`.
Remember, we do this in ``fifo.ys`` because we need to store the image for
displaying in the documentation you're reading. But if you just want to display
the images locally you can skip these two options. The ``-format`` option
internally calls the ``dot`` command line program from GraphViz to convert to
formats other than ``.dot``. Check `GraphViz output docs`_ for more on
available formats.
a :file:`.dot` file rather than opening it for display. The :yoscrypt:`-prefix
addr_gen_show` option indicates we want the file to be called
:file:`addr_gen_show.{*}`. Remember, we do this in :file:`fifo.ys` because we
need to store the image for displaying in the documentation you're reading. But
if you just want to display the images locally you can skip these two options.
The ``-format`` option internally calls the ``dot`` command line program from
GraphViz to convert to formats other than :file:`.dot`. Check `GraphViz output
docs`_ for more on available formats.
.. _GraphViz output docs: https://graphviz.org/docs/outputs/