can`t stand list incomprehension
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Nov 2018 03:45:44 +0000 (03:45 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Nov 2018 03:45:44 +0000 (03:45 +0000)
pipestage.py

index dfa2a3ef42eeb7744db5b6a3aaa7c8256543ffdf..60741ea66c025bcafd916f244dec3e2444960147 100644 (file)
@@ -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] = {}