3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-28 11:25:53 +00:00

docs: more tidying

Fix 010 pdf link.
Swap yosys script code blocks for literal includes.
Fix broken example code.
This commit is contained in:
Krystine Sherwin 2023-11-16 09:46:47 +13:00
parent bb7ebec38c
commit 0fb511905a
No known key found for this signature in database
4 changed files with 50 additions and 62 deletions

View file

@ -41,15 +41,23 @@ The extract pass
.. todo:: add/expand supporting text
.. literalinclude:: /code_examples/macc/macc_simple_test.ys
:language: yoscrypt
:lines: 1-2
.. figure:: /_images/code_examples/macc/macc_simple_test_00a.*
:class: width-helper
before `extract`
before :cmd:ref:`extract`
.. literalinclude:: /code_examples/macc/macc_simple_test.ys
:language: yoscrypt
:lines: 6
.. figure:: /_images/code_examples/macc/macc_simple_test_00b.*
:class: width-helper
after `extract`
after :cmd:ref:`extract`
.. literalinclude:: /code_examples/macc/macc_simple_test.v
:language: verilog
@ -59,13 +67,6 @@ The extract pass
:language: verilog
:caption: ``docs/source/code_examples/macc/macc_simple_xmap.v``
.. code:: yoscrypt
read_verilog macc_simple_test.v
hierarchy -check -top test
extract -map macc_simple_xmap.v;;
.. literalinclude:: /code_examples/macc/macc_simple_test_01.v
:language: verilog
:caption: ``docs/source/code_examples/macc/macc_simple_test_01.v``
@ -191,14 +192,10 @@ Wrapping in ``test1``:
.. figure:: /_images/code_examples/macc/macc_xilinx_test1b.*
:class: width-helper
.. code:: yoscrypt
techmap -map macc_xilinx_wrap_map.v
connwrappers -unsigned $__mul_wrapper \
Y Y_WIDTH \
-unsigned $__add_wrapper \
Y Y_WIDTH ;;
.. literalinclude:: /code_examples/macc/macc_xilinx_test.ys
:language: yoscrypt
:start-after: part c
:end-before: end part c
.. figure:: /_images/code_examples/macc/macc_xilinx_test1c.*
:class: width-helper
@ -208,57 +205,37 @@ Wrapping in ``test2``:
.. figure:: /_images/code_examples/macc/macc_xilinx_test2b.*
:class: width-helper
.. code:: yoscrypt
techmap -map macc_xilinx_wrap_map.v
connwrappers -unsigned $__mul_wrapper \
Y Y_WIDTH \
-unsigned $__add_wrapper \
Y Y_WIDTH ;;
.. literalinclude:: /code_examples/macc/macc_xilinx_test.ys
:language: yoscrypt
:start-after: part c
:end-before: end part c
.. figure:: /_images/code_examples/macc/macc_xilinx_test2c.*
:class: width-helper
Extract in ``test1``:
.. code:: yoscrypt
design -push
read_verilog macc_xilinx_xmap.v
techmap -map macc_xilinx_swap_map.v
techmap -map macc_xilinx_wrap_map.v;;
design -save __macc_xilinx_xmap
design -pop
extract -constports -ignore_parameters \
-map %__macc_xilinx_xmap \
-swap $__add_wrapper A,B ;;
.. figure:: /_images/code_examples/macc/macc_xilinx_test1c.*
:class: width-helper
.. literalinclude:: /code_examples/macc/macc_xilinx_test.ys
:language: yoscrypt
:start-after: part d
:end-before: end part d
.. figure:: /_images/code_examples/macc/macc_xilinx_test1d.*
:class: width-helper
Extract in ``test2``:
.. code:: yoscrypt
design -push
read_verilog macc_xilinx_xmap.v
techmap -map macc_xilinx_swap_map.v
techmap -map macc_xilinx_wrap_map.v;;
design -save __macc_xilinx_xmap
design -pop
extract -constports -ignore_parameters \
-map %__macc_xilinx_xmap \
-swap $__add_wrapper A,B ;;
.. figure:: /_images/code_examples/macc/macc_xilinx_test2c.*
:class: width-helper
.. literalinclude:: /code_examples/macc/macc_xilinx_test.ys
:language: yoscrypt
:start-after: part d
:end-before: end part d
.. figure:: /_images/code_examples/macc/macc_xilinx_test2d.*
:class: width-helper
@ -267,13 +244,14 @@ Unwrap in ``test2``:
.. figure:: /_images/code_examples/macc/macc_xilinx_test2d.*
:class: width-helper
.. literalinclude:: /code_examples/macc/macc_xilinx_test.ys
:language: yoscrypt
:start-after: part e
:end-before: end part e
.. figure:: /_images/code_examples/macc/macc_xilinx_test2e.*
:class: width-helper
.. code:: yoscrypt
techmap -map macc_xilinx_unwrap_map.v ;;
Symbolic model checking
-----------------------