More testcases & documentation

This commit is contained in:
Alex Mykyta
2021-12-04 17:24:19 -08:00
parent f70bdf774c
commit 3adf7e1328
44 changed files with 827 additions and 63 deletions

26
doc/architecture.rst Normal file
View File

@@ -0,0 +1,26 @@
Register Block Architecture
===========================
TODO: Add full block diagram
CPU Interface
-------------
TODO: describe boundary signals. Timing diagrams
Address Decode
--------------
TODO: describe boundary signals. Timing diagrams
Field Logic
-----------
TODO: describe boundary signals. Timing diagrams
Readback
--------
TODO: describe boundary signals. Timing diagrams
Retiming options

7
doc/cpuif/advanced.rst Normal file
View File

@@ -0,0 +1,7 @@
Advanced Topics
===============
TODO:
* How to override an interface's name, modport, signal names, whatever
* Creating your own custom CPU interface definition

11
doc/cpuif/apb3.rst Normal file
View File

@@ -0,0 +1,11 @@
AMBA APB3
=========
TODO: Describe the following
* List of interface signals
* interface name & modports (link to advanced topics in case user wants to override)
* flattened equivalents
* Download link to SV interface definition

8
doc/hwif.rst Normal file
View File

@@ -0,0 +1,8 @@
Hardware Interface
------------------
TODO: Describe the following
* hwif_in / hwif_out structs and their contents
* shorthand notation used in this reference: ``hwif_in..xyz``
* Example of how to peel back a sub-hierarchy struct

View File

@@ -1,6 +1,51 @@
PeakRDL-regblock
================
Welcome to PeakRDL-regblock's documentation!
============================================
.. important::
This project has no official releases yet and is still under active development!
TODO: Intro text
Installing
----------
Install from `PyPi`_ using pip
.. code-block:: bash
python3 -m pip install peakrdl-regblock
.. _PyPi: https://pypi.org/project/peakrdl-regblock
Links
-----
- `Source repository <https://github.com/SystemRDL/PeakRDL-regblock>`_
- `Release Notes <https://github.com/SystemRDL/PeakRDL-regblock/releases>`_
- `Issue tracker <https://github.com/SystemRDL/PeakRDL-regblock/issues>`_
- `PyPi <https://pypi.org/project/peakrdl-regblock>`_
- `SystemRDL Specification <http://accellera.org/downloads/standards/systemrdl>`_
.. toctree::
:hidden:
self
architecture
hwif
limitations
.. toctree::
:hidden:
:caption: CPU Interfaces
cpuif/apb3
cpuif/advanced
.. toctree::
:hidden:
@@ -11,4 +56,3 @@ Welcome to PeakRDL-regblock's documentation!
props/addrmap
props/signal
props/rhs_props
limitations

View File

@@ -2,7 +2,7 @@ Known Issues & Limitations
==========================
Not all SystemRDL features are supported by this exporter. For a listing of
supported properties, see the appropriate property listing page in the previous
supported properties, see the appropriate property listing page in the following
sections.

View File

@@ -1,8 +1,8 @@
Addrmap/Regfile Properties
==========================
.. note:: Any properties not explicitly listed here are either implicitly supported,
or are not relevant to the regblock exporter and are ignored.
.. note:: Any properties not explicitly listed here are either implicitly
supported, or are not relevant to the regblock exporter and are ignored.
errextbus
@@ -14,6 +14,7 @@ sharedextbus
|NO|
--------------------------------------------------------------------------------
Addrmap Properties
==================

View File

@@ -1,15 +1,15 @@
Field Properties
================
.. note:: Any properties not explicitly listed here are either implicitly supported,
or are not relevant to the regblock exporter and are ignored.
.. note:: Any properties not explicitly listed here are either implicitly
supported, or are not relevant to the regblock exporter and are ignored.
Software Access Properties
--------------------------
onread/onwrite
^^^^^^^^^^^^^^
|EX|
|OK|
rclr/rset
^^^^^^^^^
@@ -25,9 +25,11 @@ sw
swacc
^^^^^
|EX|
|OK|
If true, infers an output signal ``swacc`` that is asserted as the field is sampled for a software read operation.
If true, infers an output signal ``hwif_out..swacc`` that is asserted on the
same clock cycle that the field is being sampled during a software read
operation.
.. wavedrom::
@@ -40,9 +42,10 @@ If true, infers an output signal ``swacc`` that is asserted as the field is samp
swmod
^^^^^
|EX|
|OK|
If true, infers an output signal ``swmod`` that is asserted as the field is being modified by software.
If true, infers an output signal ``hwif_out..swmod`` that is asserted as the
field is being modified by software.
.. wavedrom::
@@ -56,28 +59,34 @@ If true, infers an output signal ``swmod`` that is asserted as the field is bein
swwe/swwel
^^^^^^^^^^
TODO: Describe result
Provides a mechanism that allows hardware to override whether the field is
writable by software.
boolean
|NO|
|OK|
bit
|NO|
If True, infers an input signal ``hwif_in..swwe`` or ``hwif_in..swwel``.
reference
|NO|
|OK|
woclr/woset
^^^^^^^^^^^
See ``onwrite``
--------------------------------------------------------------------------------
Hardware Access Properties
--------------------------
anded/ored/xored
^^^^^^^^^^^^^^^^
|EX|
|OK|
If true, infers the existence of output signal: ``hwif_out..anded``,
``hwif_out..ored``, ``hwif_out..xored``
hw
@@ -86,19 +95,27 @@ hw
hwclr/hwset
^^^^^^^^^^^
If both ``hwclr`` and ``hwset`` properties are used, and both are asserted at
the same clock cycle, then ``hwset`` will take precedence.
boolean
|EX|
|OK|
If true, infers the existence of input signal: ``hwif_in..hwclr``, ``hwif_in..hwset``
reference
|EX|
|OK|
hwenable/hwmask
^^^^^^^^^^^^^^^
|EX|
|OK|
we/wel
^^^^^^
Write-enable control from hardware interface
Write-enable control from hardware interface.
If true, infers the existence of input signal: ``hwif_in..we``, ``hwif_in..wel``
.. wavedrom::
@@ -113,12 +130,14 @@ Write-enable control from hardware interface
boolean
|OK|
if set, infers the existence of input signal ``hwif_in..we`` or ``hwif_in..wel``
If true, infers the existence of input signal ``hwif_in..we`` or ``hwif_in..wel``
reference
|EX|
|OK|
--------------------------------------------------------------------------------
Counter Properties
------------------
@@ -212,6 +231,8 @@ underflow
|NO|
--------------------------------------------------------------------------------
Interrupt Properties
--------------------
@@ -244,6 +265,8 @@ stickybit
|NO|
--------------------------------------------------------------------------------
Misc
----

View File

@@ -1,8 +1,8 @@
Register Properties
===================
.. note:: Any properties not explicitly listed here are either implicitly supported,
or are not relevant to the regblock exporter and are ignored.
.. note:: Any properties not explicitly listed here are either implicitly
supported, or are not relevant to the regblock exporter and are ignored.
accesswidth
-----------

View File

@@ -1,6 +1,20 @@
RHS Property References
=======================
SystemRDL allows some properties to be referenced in the righthand-side of
property assignment expressions:
.. code-block:: systemrdl
some_property = my_reg.my_field->some_property;
The official SystemRDL spec refers to these as "Ref targets" in Table G1, but
unfortunately does not describe their semantics in much detail.
The text below describes the interpretations used for this exporter.
--------------------------------------------------------------------------------
Field
-----
@@ -8,30 +22,68 @@ swacc
^^^^^
|EX|
Single-cycle strobe that indicates the field is being sampled during a software
read operation.
swmod
^^^^^
|EX|
Single-cycle strobe that indicates the field is being modified during a software
access operation.
swwe/swwel
^^^^^^^^^^
|EX|
|OK|
Represents the signal that controls the owning field's swwe/swwel behavior.
anded/ored/xored
^^^^^^^^^^^^^^^^
|EX|
Represents the current and/or/xor reduction of the owning field's value.
hwclr/hwset
^^^^^^^^^^^
|EX|
Represents the signal that controls the owning field's hwclr/hwset behavior.
hwenable/hwmask
^^^^^^^^^^^^^^^
|EX|
Represents the signal that controls the owning field's hwenable/hwmask behavior.
we/wel
^^^^^^
|EX|
next
^^^^
|EX|
reset
^^^^^
|EX|
resetsignal
^^^^^^^^^^^
|EX|
--------------------------------------------------------------------------------
Field Counter Properties
------------------------
Represents the signal that controls the owning field's we/wel behavior.
decr
^^^^
|NO|
@@ -72,6 +124,11 @@ underflow
^^^^^^^^^
|NO|
--------------------------------------------------------------------------------
Field Interrupt Properties
--------------------------
enable
^^^^^^
|EX|
@@ -88,19 +145,8 @@ mask
^^^^
|EX|
next
^^^^
|EX|
reset
^^^^^
|EX|
resetsignal
^^^^^^^^^^^
|EX|
--------------------------------------------------------------------------------
Register
--------

View File

@@ -1,8 +1,8 @@
Signal Properties
=================
.. note:: Any properties not explicitly listed here are either implicitly supported,
or are not relevant to the regblock exporter and are ignored.
.. note:: Any properties not explicitly listed here are either implicitly
supported, or are not relevant to the regblock exporter and are ignored.
activehigh/activelow