add some arbitrary math into example
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Nov 2018 03:56:49 +0000 (03:56 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Nov 2018 03:56:49 +0000 (03:56 +0000)
pipestage.py

index 91087a0ae54e9eae0a80739aa8a41be2edbe176d..4ec0da059d159ae8aac29f4505098de5990d02b7 100644 (file)
@@ -66,16 +66,16 @@ class SimplePipelineExample(SimplePipeline):
         self.n = ~self._loopback
 
     def stage1(self):
-        self.n = self.n
+        self.n = self.n + 1
 
     def stage2(self):
-        self.n = self.n
+        self.n = self.n << 1
 
     def stage3(self):
-        self.n = self.n
+        self.n = ~self.n
 
     def stage4(self):
-        self._pipe.sync += self._loopback.eq(self.n)
+        self._pipe.sync += self._loopback.eq(self.n + 3)
 
 class PipeModule(Module):
     def __init__(self):