@@ -3,9 +3,6 @@ Coarse arithmetics
33
44.. todo :: Add information about `$alu`, `$fa`, and `$lcu` cells.
55
6- Multiply-accumulate
7- ~~~~~~~~~~~~~~~~~~~
8-
96The `$macc ` cell type represents a generalized multiply and accumulate
107operation. The cell is purely combinational. It outputs the result of summing up
118a sequence of products and other injected summands.
@@ -47,48 +44,6 @@ CONFIG parameter carries the following information:
4744
4845 B is an array of concatenated 1-bit-wide unsigned integers to also be summed up.
4946
50- Arbitrary logic functions
51- ~~~~~~~~~~~~~~~~~~~~~~~~~
52-
53- The `$lut ` cell type implements a single-output LUT (lookup table). It
54- implements an arbitrary logic function with its ``\LUT `` parameter to map input
55- port ``\A `` to values of ``\Y `` output port values. In psuedocode: ``Y =
56- \LUT[A] ``. ``\A `` has width set by parameter ``\WIDTH `` and ``\Y `` has a width
57- of 1. Every logic function with a single bit output has a unique `$lut `
58- representation.
59-
60- The `$sop ` cell type implements a sum-of-products expression, also known as
61- disjunctive normal form (DNF). It implements an arbitrary logic function. Its
62- structure mimics a programmable logic array (PLA). Output port ``\Y `` is the sum
63- of products of the bits of the input port ``\A `` as defined by parameter
64- ``\TABLE ``. ``\A `` is ``\WIDTH `` bits wide. The number of products in the sum is
65- set by parameter ``\DEPTH ``, and each product has two bits for each input bit -
66- for the presence of the unnegated and negated version of said input bit in the
67- product. Therefore the ``\TABLE `` parameter holds ``2 * \WIDTH * \DEPTH `` bits.
68-
69- For example:
70-
71- Let ``\WIDTH `` be 3. We would like to represent ``\Y =~\A[0] + \A[1]~\A[2] ``.
72- There are 2 products to be summed, so ``\DEPTH `` shall be 2.
73-
74- .. code-block ::
75-
76- ~A[2]-----+
77- A[2]----+|
78- ~A[1]---+||
79- A[1]--+|||
80- ~A[0]-+||||
81- A[0]+|||||
82- |||||| product formula
83- 010000 ~\A[0]
84- 001001 \A[1]~\A[2]
85-
86- So the value of ``\TABLE `` will become ``010000001001 ``.
87-
88- Any logic function with a single bit output can be represented with ``$sop `` but
89- may have variously minimized or ordered summands represented in the ``\TABLE ``
90- values.
91-
9247.. autocellgroup :: arith
9348 :members:
9449 :source:
0 commit comments