From 9b215a1e2212766c28ff378526554f3e2fc285d0 Mon Sep 17 00:00:00 2001 From: Alex Mykyta Date: Mon, 24 Jan 2022 22:40:41 -0800 Subject: [PATCH] Update some docs --- docs/known_issues.rst | 16 --------------- docs/properties.rst | 48 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/docs/known_issues.rst b/docs/known_issues.rst index 52fa17e..fe5fc46 100644 --- a/docs/known_issues.rst +++ b/docs/known_issues.rst @@ -5,22 +5,6 @@ Known Issues & Limitations This page lists anything from the SystemRDL 2.0 spec that the ``systemrdl-compiler`` does not support yet. -Limitations are listed roughly in order of priority, where the first items are -likely to be fixed the soonest. - - -Semantic Checking is Incomplete -------------------------------- - -The SystemRDL spec implies hundreds of rules & semantics that need to be -enforced. Many of them are implicitly enforced by the language's syntax. -However, most others require additional post-compile checking in order to -validate. - -Adding these semantic checks is an ongoing effort. I am keeping track of which -checks are implemented here: -:download:`semantic_checks.ods` - Constraints diff --git a/docs/properties.rst b/docs/properties.rst index f13ac37..910eee8 100644 --- a/docs/properties.rst +++ b/docs/properties.rst @@ -14,11 +14,57 @@ value will be returned. When using the ``get_property()`` interface, any instance references are converted to their representative :class:`~systemrdl.node.Node` objects. + +Implied Property Values +----------------------- +The SystemRDL language describes numerous properties. Many of them are very +closely interrelated. Even if not explicitly assigned, some of these may inherit +an implied value based on other properties. + +For example: + +.. code-block:: systemrdl + + field my_field { + sw=rw; + rclr; + }; + +The above example describes a field that is cleared when software reads it. +Although not explicitly set, if you were to do the following query: +``my_field.get_property('onread')``, it would return the value +:attr:`~systemrdl.rdltypes.OnReadType.rclr`, as if the user assigned it as follows: + +.. code-block:: systemrdl + + field my_field { + sw=rw; + onread = rclr; + }; + +Other properties that may infer a value: (This is not an exhaustive list!) + +* If not explicitly set, ``resetsignal`` may return a signal marked with + ``field_reset`` in the enclosing hierarchy. +* ``rclr`` and ``rset`` can be implied from ``onread`` and vice-versa. +* ``woclr`` ``woset`` can be implied from ``onwrite`` and vice-versa. +* ``incrvalue`` and ``decrvalue`` may infer a value of 1 for counters that do + not specify otherwise. +* ``stickybit`` is true for interrupt fields unless specified otherwise. +* ``accesswidth`` defaults to the width of the register. +* Boolean property pairs that imply the opposites of each-other: + + * ``sync`` and ``async`` + * ``bigendian`` and ``littleendian`` + * ``msb0`` and ``lsb0`` + + + Derived Properties ------------------ The ``systemrdl-compiler`` provides additional derived properties that intend -to simplify interpretation of the compiled register model. These derived +to further simplify interpretation of the compiled register model. These derived properties may query multiple characteristics to determine their value. Some examples: