From f4d875f7e5cc532dd424a8ba5853902ea456e730 Mon Sep 17 00:00:00 2001 From: Stefan Holst Date: Wed, 12 Jul 2023 11:34:45 +0900 Subject: [PATCH] docs --- docs/circuit.rst | 13 +++++++++++++ docs/datastructures.rst | 29 ----------------------------- docs/index.rst | 5 +++-- docs/logic.rst | 7 +++++++ src/kyupy/circuit.py | 7 ++++++- src/kyupy/logic.py | 2 +- src/kyupy/sdf.py | 2 +- 7 files changed, 31 insertions(+), 34 deletions(-) create mode 100644 docs/circuit.rst delete mode 100644 docs/datastructures.rst create mode 100644 docs/logic.rst diff --git a/docs/circuit.rst b/docs/circuit.rst new file mode 100644 index 0000000..1d1ff31 --- /dev/null +++ b/docs/circuit.rst @@ -0,0 +1,13 @@ +Circuit Graph - :mod:`kyupy.circuit` +==================================== + +.. automodule:: kyupy.circuit + +.. autoclass:: kyupy.circuit.Node + :members: + +.. autoclass:: kyupy.circuit.Line + :members: + +.. autoclass:: kyupy.circuit.Circuit + :members: \ No newline at end of file diff --git a/docs/datastructures.rst b/docs/datastructures.rst deleted file mode 100644 index 026ded9..0000000 --- a/docs/datastructures.rst +++ /dev/null @@ -1,29 +0,0 @@ -Data Structures -=============== - -KyuPy provides two types of core data structures, one for gate-level circuits, and a few others for representing and storing logic data and signal values. -The data structures are designed to work together nicely with numpy arrays. -For example, all the nodes and connections in the circuit graph have consecutive integer indices that can be used to access ndarrays with associated data. -Circuit graphs also define an ordering of inputs, outputs and other nodes to easily process test vector data and alike. - -Circuit Graph - :mod:`kyupy.circuit` ------------------------------------- - -.. automodule:: kyupy.circuit - -.. autoclass:: kyupy.circuit.Node - :members: - -.. autoclass:: kyupy.circuit.Line - :members: - -.. autoclass:: kyupy.circuit.Circuit - :members: - -Multi-Valued Logic - :mod:`kyupy.logic` ---------------------------------------- - -.. automodule:: kyupy.logic - :members: - - diff --git a/docs/index.rst b/docs/index.rst index 3fc74e8..c1e3889 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,9 +4,10 @@ API Reference ------------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 - datastructures + circuit + logic parsers simulators miscellaneous diff --git a/docs/logic.rst b/docs/logic.rst new file mode 100644 index 0000000..4f9fac3 --- /dev/null +++ b/docs/logic.rst @@ -0,0 +1,7 @@ +Multi-Valued Logic - :mod:`kyupy.logic` +======================================= + +.. automodule:: kyupy.logic + :members: + + diff --git a/src/kyupy/circuit.py b/src/kyupy/circuit.py index a09f475..76d4738 100644 --- a/src/kyupy/circuit.py +++ b/src/kyupy/circuit.py @@ -1,8 +1,13 @@ -"""Data structures for representing non-hierarchical gate-level circuits. +"""Core module for handling non-hierarchical gate-level circuits. The class :class:`Circuit` is a container of nodes connected by lines. A node is an instance of class :class:`Node`, and a line is an instance of class :class:`Line`. + +The data structures are designed to work together nicely with numpy arrays. +For example, all the nodes and connections in the circuit graph have consecutive integer indices that can be used to access ndarrays with associated data. +Circuit graphs also define an ordering of inputs, outputs and other nodes to easily process test vector data and alike. + """ from collections import deque, defaultdict diff --git a/src/kyupy/logic.py b/src/kyupy/logic.py index 368d1b7..7fa3bc5 100644 --- a/src/kyupy/logic.py +++ b/src/kyupy/logic.py @@ -1,4 +1,4 @@ -"""This module contains definitions and tools for 2-, 4-, and 8-valued logic operations. +"""Core module for handling 2-, 4-, and 8-valued logic data and signal values. Logic values are stored in numpy arrays with data type ``np.uint8``. There are no explicit data structures in KyuPy for holding patterns, pattern sets or vectors. diff --git a/src/kyupy/sdf.py b/src/kyupy/sdf.py index 77a7274..8eb093f 100644 --- a/src/kyupy/sdf.py +++ b/src/kyupy/sdf.py @@ -42,7 +42,7 @@ class DelayFile: Limited support of SDF spec: * ABSOLUTE delay values only * two delvals per delval_list. First is rising/posedge, second is falling/negedge - transition at the output of the IOPATH (SDF spec, pp. 3-17). + transition at the output of the IOPATH (SDF spec, pp. 3-17). * PATHPULSE declarations are ignored. * Axis 0: dataset (usually 3 datasets per SDF-file)