Skip to content

Commit ca3ccd2

Browse files
Merge krys/help_docs and krys/better_rtds_action
2 parents ecff434 + b9b91ec commit ca3ccd2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3297
-2398
lines changed

Makefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,8 +967,20 @@ endif
967967

968968
# also others, but so long as it doesn't fail this is enough to know we tried
969969
docs/source/cmd/abc.rst: $(TARGETS) $(EXTRA_TARGETS)
970-
mkdir -p docs/source/cmd
971-
./$(PROGRAM_PREFIX)yosys -p 'help -write-rst-command-reference-manual'
970+
$(Q) mkdir -p docs/source/cmd
971+
$(Q) mkdir -p temp/docs/source/cmd
972+
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-command-reference-manual'
973+
$(Q) rsync -rc temp/docs/source/cmd docs/source
974+
$(Q) rm -rf temp
975+
docs/source/cell/word_add.rst: $(TARGETS) $(EXTRA_TARGETS)
976+
$(Q) mkdir -p docs/source/cell
977+
$(Q) mkdir -p temp/docs/source/cell
978+
$(Q) cd temp && ./../$(PROGRAM_PREFIX)yosys -p 'help -write-rst-cells-manual'
979+
$(Q) rsync -rc temp/docs/source/cell docs/source
980+
$(Q) rm -rf temp
981+
982+
docs/source/generated/cells.json: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
983+
$(Q) ./$(PROGRAM_PREFIX)yosys -p 'help -dump-cells-json $@'
972984

973985
PHONY: docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
974986
docs/gen_examples:
@@ -1010,7 +1022,7 @@ docs/reqs:
10101022
$(Q) $(MAKE) -C docs reqs
10111023

10121024
DOC_TARGET ?= html
1013-
docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage
1025+
docs: docs/source/cmd/abc.rst docs/source/generated/cells.json docs/gen_examples docs/gen_images docs/guidelines docs/usage
10141026
$(Q) $(MAKE) -C docs $(DOC_TARGET)
10151027

10161028
clean:

docs/source/_static/favico.png

-32.7 KB
Binary file not shown.

docs/source/_static/yosyshq.css

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/source/_templates/page.html

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/source/appendix.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/source/appendix/auxlibs.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@ ezSAT
2929

3030
The files in ``libs/ezsat`` provide a library for simplifying generating CNF
3131
formulas for SAT solvers. It also contains bindings of MiniSAT. The ezSAT
32-
library is written by C. Wolf. It is used by the :cmd:ref:`sat` pass (see
32+
library is written by C. Wolf. It is used by the `sat` pass (see
3333
:doc:`/cmd/sat`).
3434

3535
fst
3636
---
3737

3838
``libfst`` files from `gtkwave`_ are included in ``libs/fst`` to support
3939
reading/writing signal traces from/to the GTKWave developed FST format. This is
40-
primarily used in the :cmd:ref:`sim` command.
40+
primarily used in the `sim` command.
4141

4242
.. _gtkwave: https://github.com/gtkwave/gtkwave
4343

4444
json11
4545
------
4646

47-
For reading/writing designs from/to JSON, :cmd:ref:`read_json` and
48-
:cmd:ref:`write_json` should be used. For everything else there is the `json11
47+
For reading/writing designs from/to JSON, `read_json` and
48+
`write_json` should be used. For everything else there is the `json11
4949
library`_:
5050

5151
json11 is a tiny JSON library for C++11, providing JSON parsing and
5252
serialization.
5353

54-
This library is used for outputting machine-readable statistics (:cmd:ref:`stat`
55-
with ``-json`` flag), using the RPC frontend (:cmd:ref:`connect_rpc`), and the
54+
This library is used for outputting machine-readable statistics (`stat`
55+
with ``-json`` flag), using the RPC frontend (`connect_rpc`), and the
5656
yosys-witness ``yw`` format.
5757

5858
.. _json11 library: https://github.com/dropbox/json11
@@ -61,7 +61,7 @@ MiniSAT
6161
-------
6262

6363
The files in ``libs/minisat`` provide a high-performance SAT solver, used by the
64-
:cmd:ref:`sat` command.
64+
`sat` command.
6565

6666
SHA1
6767
----

docs/source/appendix/env_vars.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Yosys environment variables
33

44
``HOME``
55
Yosys command history is stored in :file:`$HOME/.yosys_history`. Graphics
6-
(from :cmd:ref:`show` and :cmd:ref:`viz` commands) will output to this
6+
(from `show` and `viz` commands) will output to this
77
directory by default. This environment variable is also used in some cases
88
for resolving filenames with :file:`~`.
99

docs/source/yosys_internals/formats/rtlil_text.rst renamed to docs/source/appendix/rtlil_text.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ Cells
223223
Declares a cell, with zero or more attributes, with the given identifier and
224224
type in the enclosing module.
225225

226-
Cells perform functions on input signals. See
227-
:doc:`/yosys_internals/formats/cell_library` for a detailed list of cell types.
226+
Cells perform functions on input signals. See :doc:`/cell_gate` and
227+
:doc:`/cell_word` for a detailed list of cell types.
228228

229229
.. code:: BNF
230230

docs/source/cell/gate_other.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. autocellgroup:: gate_other
2+
:caption: Other gate-level cells
3+
:members:
4+
:source:
5+
:linenos:

docs/source/cell/word_arith.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Coarse arithmetics
2+
------------------
3+
4+
.. todo:: Add information about `$alu`, `$fa`, and `$lcu` cells.
5+
6+
The `$macc` cell type represents a generalized multiply and accumulate
7+
operation. The cell is purely combinational. It outputs the result of summing up
8+
a sequence of products and other injected summands.
9+
10+
.. code-block::
11+
12+
Y = 0 +- a0factor1 * a0factor2 +- a1factor1 * a1factor2 +- ...
13+
+ B[0] + B[1] + ...
14+
15+
The A port consists of concatenated pairs of multiplier inputs ("factors"). A
16+
zero length factor2 acts as a constant 1, turning factor1 into a simple summand.
17+
18+
In this pseudocode, ``u(foo)`` means an unsigned int that's foo bits long.
19+
20+
.. code-block::
21+
22+
struct A {
23+
u(CONFIG.mul_info[0].factor1_len) a0factor1;
24+
u(CONFIG.mul_info[0].factor2_len) a0factor2;
25+
u(CONFIG.mul_info[1].factor1_len) a1factor1;
26+
u(CONFIG.mul_info[1].factor2_len) a1factor2;
27+
...
28+
};
29+
30+
The cell's ``CONFIG`` parameter determines the layout of cell port ``A``. The
31+
CONFIG parameter carries the following information:
32+
33+
.. code-block::
34+
35+
struct CONFIG {
36+
u4 num_bits;
37+
struct mul_info {
38+
bool is_signed;
39+
bool is_subtract;
40+
u(num_bits) factor1_len;
41+
u(num_bits) factor2_len;
42+
}[num_ports];
43+
};
44+
45+
B is an array of concatenated 1-bit-wide unsigned integers to also be summed up.
46+
47+
.. autocellgroup:: arith
48+
:members:
49+
:source:
50+
:linenos:

0 commit comments

Comments
 (0)