|
|
@ -31,14 +31,14 @@ The axis convention is as follows: |
|
|
|
|
|
|
|
|
|
|
|
* The **last** axis goes along patterns/vectors. I.e. ``values[...,0]`` is pattern 0, ``values[...,1]`` is pattern 1, etc. |
|
|
|
* The **last** axis goes along patterns/vectors. I.e. ``values[...,0]`` is pattern 0, ``values[...,1]`` is pattern 1, etc. |
|
|
|
* The **second-to-last** axis goes along the I/O and flip-flops of circuits. For a circuit ``c``, this axis is usually |
|
|
|
* The **second-to-last** axis goes along the I/O and flip-flops of circuits. For a circuit ``c``, this axis is usually |
|
|
|
``len(c.s_nodes)`` long. The values of all inputs, outputs and flip-flops are stored within the same array and the location |
|
|
|
``len(c.s_nodes)`` long. The values of all inputs, outputs and flip-flops are stored within the same array and the location |
|
|
|
along the second-to-last axis is determined by the order in ``c.s_nodes``. |
|
|
|
along the second-to-last axis is determined by the order in ``c.s_nodes``. |
|
|
|
|
|
|
|
|
|
|
|
Two storage formats are used in KyuPy: |
|
|
|
Two storage formats are used in KyuPy: |
|
|
|
|
|
|
|
|
|
|
|
* ``mv...`` (for "multi-valued"): Each logic value is stored in the least significant 3 bits of ``np.uint8``. |
|
|
|
* ``mv...`` (for "multi-valued"): Each logic value is stored in the least significant 3 bits of ``np.uint8``. |
|
|
|
* ``bp...`` (for "bit-parallel"): Groups of 8 logic values are stored as three ``np.uint8``. This format is used |
|
|
|
* ``bp...`` (for "bit-parallel"): Groups of 8 logic values are stored as three ``np.uint8``. This format is used |
|
|
|
for bit-parallel logic simulations. It is also more memory-efficient. |
|
|
|
for bit-parallel logic simulations. It is also more memory-efficient. |
|
|
|
|
|
|
|
|
|
|
|
The functions in this module use the ``mv...`` and ``bp...`` prefixes to signify the storage format they operate on. |
|
|
|
The functions in this module use the ``mv...`` and ``bp...`` prefixes to signify the storage format they operate on. |
|
|
|
|
|
|
|
|
|
|
|