mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
Some tidy up
This commit is contained in:
parent
685da6a2e5
commit
e2c0f8fc50
|
@ -78,10 +78,10 @@ A simple circuit
|
||||||
|
|
||||||
:numref:`example_src` shows a simple synthesis script and a Verilog file that
|
:numref:`example_src` shows a simple synthesis script and a Verilog file that
|
||||||
demonstrate the usage of show in a simple setting. Note that :cmd:ref:`show` is
|
demonstrate the usage of show in a simple setting. Note that :cmd:ref:`show` is
|
||||||
called with the :cmd:ref:`-pause` option, that halts execution of the Yosys
|
called with the ``-pause`` option, that halts execution of the Yosys script
|
||||||
script until the user presses the Enter key. The ``show -pause`` command also
|
until the user presses the Enter key. The ``show -pause`` command also allows
|
||||||
allows the user to enter an interactive shell to further investigate the circuit
|
the user to enter an interactive shell to further investigate the circuit before
|
||||||
before continuing synthesis.
|
continuing synthesis.
|
||||||
|
|
||||||
So this script, when executed, will show the design after each of the three
|
So this script, when executed, will show the design after each of the three
|
||||||
synthesis commands. The generated circuit diagrams are shown in
|
synthesis commands. The generated circuit diagrams are shown in
|
||||||
|
|
|
@ -2,6 +2,7 @@ Getting started with Yosys
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
installation
|
installation
|
||||||
scripting_intro
|
scripting_intro
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
More scripting
|
More scripting
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
opt_passes
|
opt_passes
|
||||||
selections
|
selections
|
||||||
|
|
|
@ -63,7 +63,7 @@ can also optimize cells with some constant inputs.
|
||||||
1 :math:`b` :math:`b`
|
1 :math:`b` :math:`b`
|
||||||
========= ========= ===========
|
========= ========= ===========
|
||||||
|
|
||||||
.. How to format table?
|
.. todo:: How to format table?
|
||||||
|
|
||||||
:numref:`Table %s <tab:opt_expr_and>` shows the replacement rules used for
|
:numref:`Table %s <tab:opt_expr_and>` shows the replacement rules used for
|
||||||
optimizing an ``$_AND_`` gate. The first three rules implement the obvious const
|
optimizing an ``$_AND_`` gate. The first three rules implement the obvious const
|
||||||
|
@ -96,9 +96,11 @@ This pass optimizes trees of multiplexer cells by analyzing the select inputs.
|
||||||
Consider the following simple example:
|
Consider the following simple example:
|
||||||
|
|
||||||
.. code:: verilog
|
.. code:: verilog
|
||||||
:number-lines:
|
|
||||||
|
|
||||||
module uut(a, y); input a; output [1:0] y = a ? (a ? 1 : 2) : 3; endmodule
|
module uut(a, y);
|
||||||
|
input a;
|
||||||
|
output [1:0] y = a ? (a ? 1 : 2) : 3;
|
||||||
|
endmodule
|
||||||
|
|
||||||
The output can never be 2, as this would require ``a`` to be 1 for the outer
|
The output can never be 2, as this would require ``a`` to be 1 for the outer
|
||||||
multiplexer and 0 for the inner multiplexer. The :cmd:ref:`opt_muxtree` pass
|
multiplexer and 0 for the inner multiplexer. The :cmd:ref:`opt_muxtree` pass
|
||||||
|
@ -123,8 +125,10 @@ Lastly this pass consolidates trees of ``$reduce_and`` cells and trees of
|
||||||
These three simple optimizations are performed in a loop until a stable result
|
These three simple optimizations are performed in a loop until a stable result
|
||||||
is produced.
|
is produced.
|
||||||
|
|
||||||
The :cmd:ref:`opt_rmdff` pass
|
The ``opt_rmdff`` pass
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. todo:: The ``opt_rmdff`` pass doesn't exist anymore?
|
||||||
|
|
||||||
This pass identifies single-bit d-type flip-flops (``$_DFF_``, ``$dff``, and
|
This pass identifies single-bit d-type flip-flops (``$_DFF_``, ``$dff``, and
|
||||||
``$adff`` cells) with a constant data input and replaces them with a constant
|
``$adff`` cells) with a constant data input and replaces them with a constant
|
||||||
|
|
|
@ -12,7 +12,7 @@ This scripts contain three types of commands:
|
||||||
available: Verilog, BLIF, EDIF, SPICE, BTOR, . . .).
|
available: Verilog, BLIF, EDIF, SPICE, BTOR, . . .).
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 3
|
||||||
|
|
||||||
overview
|
overview
|
||||||
control_and_data
|
control_and_data
|
||||||
|
|
|
@ -409,7 +409,9 @@ multiplexers.
|
||||||
In more complex examples (e.g. asynchronous resets) the part of the
|
In more complex examples (e.g. asynchronous resets) the part of the
|
||||||
``RTLIL::CaseRule``/``RTLIL::SwitchRule`` tree that describes the asynchronous
|
``RTLIL::CaseRule``/``RTLIL::SwitchRule`` tree that describes the asynchronous
|
||||||
reset must first be transformed to the correct ``RTLIL::SyncRule`` objects. This
|
reset must first be transformed to the correct ``RTLIL::SyncRule`` objects. This
|
||||||
is done by the :cmd:ref:`proc_adff` pass.
|
is done by the ``proc_adff`` pass.
|
||||||
|
|
||||||
|
.. todo:: The ``proc_adff`` pass doesn't exist anymore?
|
||||||
|
|
||||||
The ProcessGenerator algorithm
|
The ProcessGenerator algorithm
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -2,7 +2,7 @@ Internal formats
|
||||||
================
|
================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 3
|
||||||
|
|
||||||
overview
|
overview
|
||||||
rtlil_rep
|
rtlil_rep
|
||||||
|
|
|
@ -78,9 +78,9 @@ This has three advantages:
|
||||||
|
|
||||||
- Second, the information about which identifiers were originally provided by
|
- Second, the information about which identifiers were originally provided by
|
||||||
the user is always available which can help guide some optimizations. For
|
the user is always available which can help guide some optimizations. For
|
||||||
example the :cmd:ref:`opt_rmunused` tries to preserve signals with a
|
example the ``opt_rmunused`` tries to preserve signals with a user-provided
|
||||||
user-provided name but doesn't hesitate to delete signals that have
|
name but doesn't hesitate to delete signals that have auto-generated names
|
||||||
auto-generated names when they just duplicate other signals.
|
when they just duplicate other signals.
|
||||||
|
|
||||||
- Third, the delicate job of finding suitable auto-generated public visible
|
- Third, the delicate job of finding suitable auto-generated public visible
|
||||||
names is deferred to one central location. Internally auto-generated names
|
names is deferred to one central location. Internally auto-generated names
|
||||||
|
|
|
@ -23,7 +23,7 @@ wide range of real-world designs, including the `OpenRISC 1200 CPU`_, the
|
||||||
|
|
||||||
.. _k68 CPU: http://opencores.org/projects/k68
|
.. _k68 CPU: http://opencores.org/projects/k68
|
||||||
|
|
||||||
As of this writing a Yosys VHDL frontend is in development.
|
As of this writing, a Yosys VHDL frontend is in development.
|
||||||
|
|
||||||
Yosys is written in C++ (using some features from the new C++11 standard). This
|
Yosys is written in C++ (using some features from the new C++11 standard). This
|
||||||
chapter describes some of the fundamental Yosys data structures. For the sake of
|
chapter describes some of the fundamental Yosys data structures. For the sake of
|
||||||
|
@ -31,11 +31,10 @@ simplicity the C++ type names used in the Yosys implementation are used in this
|
||||||
chapter, even though the chapter only explains the conceptual idea behind it and
|
chapter, even though the chapter only explains the conceptual idea behind it and
|
||||||
can be used as reference to implement a similar system in any language.
|
can be used as reference to implement a similar system in any language.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
flow/index
|
flow/index
|
||||||
formats/index
|
formats/index
|
||||||
techmap
|
techmap
|
||||||
extensions
|
extensions
|
||||||
|
|
||||||
.. todo:: copypaste
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ class CommandDomain(Domain):
|
||||||
return make_refnode(builder,fromdocname,todocname,
|
return make_refnode(builder,fromdocname,todocname,
|
||||||
targ, contnode, title)
|
targ, contnode, title)
|
||||||
else:
|
else:
|
||||||
print("Awww, found nothing")
|
print(f"Missing ref for {target} in {fromdocname} ")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
|
|
Loading…
Reference in a new issue