Revise implementation of 'next' property

This commit is contained in:
Alex Mykyta
2021-12-20 12:21:51 -08:00
parent 769907404a
commit 8ed45ed632
8 changed files with 85 additions and 40 deletions

View File

@@ -30,9 +30,10 @@ class InputStructGenerator_Hier(RDLFlatStructGenerator):
type_name = self.get_typdef_name(node)
self.push_struct(type_name, node.inst_name)
# Provide input to field's value if it is writable by hw
if node.is_hw_writable:
self.add_member("value", node.width)
# Provide input to field's next value if it is writable by hw, and it
# was not overridden by the 'next' property
if node.is_hw_writable and node.get_property('next') is None:
self.add_member("next", node.width)
# Generate implied inputs
for prop_name in ["we", "wel", "swwe", "swwel", "hwclr", "hwset"]: