mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-11-14 11:03:36 +00:00
Update systemrdl-compiler to v1.19.0
The main difference in this release (https://github.com/SystemRDL/systemrdl-compiler/releases/tag/v1.19.0) is that FieldNode.get_property('resetsignal') will now default to finding the nearest in-scope field reset signal if not explicitly set. The same is true for the cpuif-signal. Before this commit, the addmap-class searched for resetsignal and cpuif signals and saved it for the fields to be picked up later. This code is now not required anymore
This commit is contained in:
parent
1d50b2b457
commit
fd75e4c84c
@ -0,0 +1 @@
|
|||||||
|
systemrdl-compiler==1.19.0
|
@ -25,9 +25,6 @@ class AddrMap(Component):
|
|||||||
# Check if global resets are defined
|
# Check if global resets are defined
|
||||||
glbl_settings = dict()
|
glbl_settings = dict()
|
||||||
|
|
||||||
(glbl_settings['field_reset'], glbl_settings['cpuif_reset']) = \
|
|
||||||
self.__process_global_resets()
|
|
||||||
|
|
||||||
# Set defaults so that some of the common component methods work
|
# Set defaults so that some of the common component methods work
|
||||||
self.total_dimensions = 0
|
self.total_dimensions = 0
|
||||||
self.total_array_dimensions = []
|
self.total_array_dimensions = []
|
||||||
@ -249,44 +246,6 @@ class AddrMap(Component):
|
|||||||
|
|
||||||
self.rtl_header.append(genvars)
|
self.rtl_header.append(genvars)
|
||||||
|
|
||||||
def __process_global_resets(self):
|
|
||||||
field_reset_list = \
|
|
||||||
[x for x in self.obj.signals() if x.get_property('field_reset')]
|
|
||||||
cpuif_reset_list = \
|
|
||||||
[x for x in self.obj.signals() if x.get_property('cpuif_reset')]
|
|
||||||
|
|
||||||
if field_reset_list:
|
|
||||||
rst_name = field_reset_list[0].inst_name
|
|
||||||
self.logger.info("Found field_reset signal '{}'".format(rst_name))
|
|
||||||
|
|
||||||
# Save to set to generate input
|
|
||||||
self.resets.add(rst_name)
|
|
||||||
|
|
||||||
# Save position 0 of list
|
|
||||||
field_reset_item = field_reset_list[0]
|
|
||||||
else:
|
|
||||||
field_reset_item = None
|
|
||||||
|
|
||||||
if cpuif_reset_list:
|
|
||||||
rst_name = cpuif_reset_list[0].inst_name
|
|
||||||
self.logger.info("Found cpuif_reset signal '{}'".format(rst_name))
|
|
||||||
|
|
||||||
# Save to set to generate input
|
|
||||||
self.resets.add(rst_name)
|
|
||||||
|
|
||||||
# Save position 0 of list
|
|
||||||
cpuif_reset_item = cpuif_reset_list[0]
|
|
||||||
else:
|
|
||||||
cpuif_reset_item = None
|
|
||||||
|
|
||||||
# Method is only called once on a global level. Otherwise, process_reset_signal
|
|
||||||
# is called several times to calculate the dictionary, although it will always
|
|
||||||
# return the same result.
|
|
||||||
field_reset = AddrMap.process_reset_signal(field_reset_item)
|
|
||||||
cpuif_reset = AddrMap.process_reset_signal(cpuif_reset_item)
|
|
||||||
|
|
||||||
return (field_reset, cpuif_reset)
|
|
||||||
|
|
||||||
def get_package_names(self) -> set():
|
def get_package_names(self) -> set():
|
||||||
names = set()
|
names = set()
|
||||||
|
|
||||||
|
@ -980,15 +980,8 @@ class Field(Component):
|
|||||||
|
|
||||||
# Determine resets. This includes checking for async/sync resets,
|
# Determine resets. This includes checking for async/sync resets,
|
||||||
# the reset value, and whether the field actually has a reset
|
# the reset value, and whether the field actually has a reset
|
||||||
self.rst = dict()
|
self.rst = Field.process_reset_signal(
|
||||||
|
obj.get_property("resetsignal"))
|
||||||
reset_signal = obj.get_property("resetsignal")
|
|
||||||
|
|
||||||
if reset_signal:
|
|
||||||
self.rst = Field.process_reset_signal(reset_signal)
|
|
||||||
else:
|
|
||||||
# Only use global reset (if present) if no local reset is set
|
|
||||||
self.rst = glbl_settings['field_reset']
|
|
||||||
|
|
||||||
self.resets.add(self.rst['name'])
|
self.resets.add(self.rst['name'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user