From 6565c33445601c0c4bfd7ddfc46a563699bca629 Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 25 Jun 2021 11:46:18 +0200 Subject: [PATCH] Resolve Python Lint warnings (e.g., unnecessary list comprehensions) --- srdl2sv/components/addrmap.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srdl2sv/components/addrmap.py b/srdl2sv/components/addrmap.py index 1d59f45..73fbf07 100644 --- a/srdl2sv/components/addrmap.py +++ b/srdl2sv/components/addrmap.py @@ -1,10 +1,9 @@ import re import importlib.resources as pkg_resources -from sys import exit +import sys import yaml from systemrdl import node -from systemrdl.node import FieldNode # Local packages from components.component import Component @@ -69,7 +68,8 @@ class AddrMap(Component): self.logger.info("Done generating all child-regfiles/registers") - # Create RTL of all registers + # Create RTL of all registers. Registers in regfiles are + # already built. [x.create_rtl() for x in self.registers.values()] # Add bus widget ports @@ -82,12 +82,12 @@ class AddrMap(Component): reset_ports_rtl = [ AddrMap.templ_dict['reset_port']['rtl'].format( name = name) - for name in [x for x in self.get_resets()] + for name in self.get_resets() ] # Prefetch dictionaries in local array - input_dict_list = [(key, value) for (key, value) in self.get_ports('input').items()] - output_dict_list = [(key, value) for (key, value) in self.get_ports('output').items()] + input_dict_list = self.get_ports('input').items() + output_dict_list = self.get_ports('output').items() input_signal_width = min( max([len(value[0]) for (_, value) in input_dict_list]), 40) @@ -318,7 +318,7 @@ class AddrMap(Component): enum_members[var[0]], "::".join([self.name, key]))) - exit(1) + sys.exit(1) variable_list.append( AddrMap.templ_dict['enum_var_list_item']['rtl'].format(