Skip to content

Commit

Permalink
Updated docs (build pages)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikosDelijohn committed Oct 23, 2024
1 parent e60111c commit 27f1423
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 38 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode']

templates_path = ['_templates']
Expand Down
44 changes: 7 additions & 37 deletions docs/source/zoix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,55 +22,25 @@ leave it to the user to specify compilation and simulation isntructions to be ex
:undoc-members:
:show-inheritance:

-------------
Fault Reports
-------------
We provide two classes for managing fault reports depending on their type.

~~~~~~~~~~~~~~
--------------
TxtFaultReport
~~~~~~~~~~~~~~
This class provides a simple parsing utility based on bracket-counting to extract sections from the textual
fault report of Z01X (rpt file).

.. autoclass:: zoix.TxtFaultReport
:members:
:undoc-members:
:show-inheritance:
--------------

~~~~~~~~~~~~~~
CSVFaultReport
~~~~~~~~~~~~~~
This class manages the results of the fault simulation which are expected to be in a **CSV** format. Namelly,
the fault summary and the fault list which are generated when the fcm (fault campaign manager) script contains
the ``report -csv`` instruction. For instance, if this command is specified ``report -csv -report fsim_out`` then
after the fault simulation, in the run directory a folder named ``fsim_out_csv_files`` will be generated which will
include two .csv files. The first file is called ``DEFAULT_summary.csv`` and the second ``DEFAULT_faultlist.csv``.
These correspond to the two constructor arguments of the ``CSVFaultReport`` object.
It provides a parsing utility based on bracket-counting to extract sections from the textual
fault report of Z01X (rpt file). Furthermore, it utilizes the supported grammars to extract and transform
sections of the fault report to manageable objects and data structures. Also, it computes coverage formulas.

.. autoclass:: zoix.CSVFaultReport
.. autoclass:: zoix.TxtFaultReport
:members:
:undoc-members:
:show-inheritance:
:exclude-members: fault_report_path, fault_report, fault_list, status_groups, coverage

-----
Fault
-----
This class is used to represent a **prime** fault. Once again, in order to abstract as musch as possible, all
attributes of the ``Fault`` class are passed as keyword arguments. Hence, they can be arbitrarily set.
For instance, assuming that we generate a fault list based on the the CSV fault report of VC-Z01X which contains
entries of faults faults like:

.. csv-table::
:header: "FID", "Test Name", "Prime", "Status", "Model", "Timing", "Cycle Injection", "Cycle End", "Class", "Location"

1, "test1", "yes", "ON", "0", "", "", "", "PORT", "top.unit.cell.portA"
2, "test1", 1, "ON", "0", "", "", "", "PORT", "top.unit.cell.portB"
3, "test1", "yes", "ON", "1", "", "", "", "PORT", "top.unit.cell.portC"

The header row of this CSV snippet represents the attributes of the ``Fault`` objects, with all spaces
substituted with underscores (_) (e.g., ``"Test Name" -> "Test_Name"``) and each subsequent row contains
the corresponding values to those attributes.

With that said, each fault has two default, static attributes set by the constructor. These two attributes are
the ``equivalent_to`` which expects another ``Fault`` type and by default is set to ``None`` and ``equivalent_faults``
Expand Down
2 changes: 1 addition & 1 deletion src/testcrush/zoix.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def compute_coverage(self, requested_formula: str = None, precision: int = 4) ->
their corresponding evaluated coverage values as floats. If a formula name is specified, returns only
the evaluated value for that formula.
Todo:
.. todo::
* Implement default Test/Fault coverage computation per-Z01X if no ``Coverage{}`` section exists.
"""
log.info(f"Computing coverage {requested_formula}.")
Expand Down

0 comments on commit 27f1423

Please sign in to comment.