diff --git a/requirements.txt b/requirements.txt index e69de29..d7ae1b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +systemrdl-compiler==1.19.0 diff --git a/srdl2sv/components/addrmap.py b/srdl2sv/components/addrmap.py index 35b7ae8..a645cd5 100644 --- a/srdl2sv/components/addrmap.py +++ b/srdl2sv/components/addrmap.py @@ -25,9 +25,6 @@ class AddrMap(Component): # Check if global resets are defined 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 self.total_dimensions = 0 self.total_array_dimensions = [] @@ -249,44 +246,6 @@ class AddrMap(Component): 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(): names = set() diff --git a/srdl2sv/components/field.py b/srdl2sv/components/field.py index 1ec9088..042878a 100644 --- a/srdl2sv/components/field.py +++ b/srdl2sv/components/field.py @@ -980,15 +980,8 @@ class Field(Component): # Determine resets. This includes checking for async/sync resets, # the reset value, and whether the field actually has a reset - self.rst = dict() - - 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.rst = Field.process_reset_signal( + obj.get_property("resetsignal")) self.resets.add(self.rst['name'])