The following tests were failing:
- test_swacc_properties.test_rclr_rset
- test_swacc_properties.test_rclr_rset_hw_precedence
The reason for this failure was incorrect usage of the assignment
expression. Due to the lack of parentheses, the onread/onwrite variable
would mostly evaluate to False.
For almost all variables, the addrmap is stripped of the name. However,
when a memory/regfile/register/field had the same name as the addrmap,
a part of that name would also be stripped.
Two categories Lint warnings occured:
- Width mismatches, since integers are 32-bit wide according to the
SV LRM.
- Constant saturate values, because values could get larger than
32-bit and smaller than 0.
The software now detects whether a field shall be implemented with
flops, with wires, or as a constant. Everything should now follow Table
12 and Section 9.5.1 of the SystemRDL 2.0 LRM.
Every time an addrmap is detected within another addrmap, a new context
will be opened and a separate RTL file will be created.
All addrmaps will have the same bus-wdiget, but it might be possible
that different addrmaps have different maximum regwidths. For that
reason, it was necessary to change the non-generic srd2sv_if_pkg to a
parametrizable interface.
Almost all changes to the templates in this commit are due to name
changes from 'b2r' and 'r2b' to 'widget_if'.
This happened in AddrMap and RegFile because a the width of a new
variable 'new_child' is performed. However, SignalNodes will not create
such a child.
If this option is defined, there will be a direct interface to the b2r
and r2b interface. The structs will be flattened out to wires for legacy
reasons.
This closes#3.
For example, most methods relating to dimensions or genvars were moved
to the Components class.
Furthermore, some more care was taken of _ or __ prefixes for methods:
- No method-prefix: Public variable that is will be called by
non-related functions and methods.
- _ method-prefix: Method will be called by class or class that
inerhits class
- __ method-prefix: Method will be called by class itself only
In dc37c879, some properties got saved in self.properties of a
Component. In that commit, self.properties['sw_rd'] never got set.
For that reason, external registers with a read-interface were broken.
When a regfile did use enumerations from multiple scopes this messed up
the eventual packages because every regfile only assumed 1 scope. This
is fixed now.
TODO: Check what happens if enums are defined in the register scope.
The software is now able to create most interrupt combinations of
Section 9.9 of the SystemRDL 2.0 LRM. It supports
stickybit/non-stickybit interrupts, it support posedge, negedge,
bothedge, and level interrupts, and it is able to generate all
surrounding logic.
This commit also fixes a reset-bug that caused registers that were reset
to 0 to be not reset (because 'if not reset_value' will return True if
the 'reset_value' is 0).