From 38c77b5704b508eabb55b97f3f749705c77dcf2c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 23 Nov 2018 03:45:44 +0000 Subject: [PATCH] can`t stand list incomprehension --- pipestage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipestage.py b/pipestage.py index dfa2a3e..60741ea 100644 --- a/pipestage.py +++ b/pipestage.py @@ -21,7 +21,10 @@ class SimplePipeline(object): self._current_stage_num = 0 def _setup(self): - stage_list = [method for method in dir(self) if method.startswith('stage')] + stage_list = [] + for method in dir(self): + if method.startswith('stage'): + stage_list.append(method) for stage in sorted(stage_list): stage_method = getattr(self, stage) stage_method() @@ -43,7 +46,6 @@ class SimplePipeline(object): next_stage = self._current_stage_num + 1 pipereg_id = str(self._current_stage_num) + 'to' + str(next_stage) rname = 'pipereg_' + pipereg_id + '_' + name - #new_pipereg = pyrtl.Register(bitwidth=len(value), name=rname) new_pipereg = Signal(len(value), name_override=rname) if next_stage not in self._pipeline_register_map: self._pipeline_register_map[next_stage] = {} -- 2.30.2