move data_valid to local variable
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 Mar 2019 14:27:06 +0000 (14:27 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 Mar 2019 14:27:06 +0000 (14:27 +0000)
src/add/singlepipe.py

index 9851739e3000a87620cf49d1b84f65e280296cf2..206f815ff6bac777f81c3a2e737bc92a2ee7466b 100644 (file)
@@ -596,11 +596,11 @@ class UnbufferedPipeline(ControlBase):
     def elaborate(self, platform):
         m = Module()
 
+        data_valid = Signal() # is data valid or not
         r_data = self.stage.ispec() # input type
         if hasattr(self.stage, "setup"):
             self.stage.setup(m, r_data)
 
-        data_valid = Signal()
         p_i_valid = Signal(reset_less=True)
         m.d.comb += p_i_valid.eq(self.p.i_valid_logic())
         m.d.comb += self.n.o_valid.eq(data_valid)