add in_multi and stage_ctl args to FIFOControl
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 17 Apr 2019 06:57:23 +0000 (07:57 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 17 Apr 2019 06:57:23 +0000 (07:57 +0100)
src/add/singlepipe.py
src/add/test_buf_pipe.py

index fd6e9eab614180419ae5d78a2418ae9bc5a7671f..96fb86f3e91a46f0f8f52d57458d3f2e9cbb3b2c 100644 (file)
@@ -1100,7 +1100,8 @@ class FIFOControl(ControlBase):
         i_data -> fifo.din -> FIFO -> fifo.dout -> o_data
     """
 
-    def __init__(self, depth, stage, fwft=True, buffered=False):
+    def __init__(self, depth, stage, in_multi=None, stage_ctl=False,
+                                     fwft=True, buffered=False):
         """ FIFO Control
 
             * depth: number of entries in the FIFO
@@ -1130,7 +1131,7 @@ class FIFOControl(ControlBase):
         self.fwft = fwft
         self.buffered = buffered
         self.fdepth = depth
-        ControlBase.__init__(self, stage=stage)
+        ControlBase.__init__(self, stage, in_multi, stage_ctl)
 
     def elaborate(self, platform):
         self.m = m = ControlBase._elaborate(self, platform)
@@ -1169,3 +1170,10 @@ class FIFOControl(ControlBase):
         m.d.comb += o_data
 
         return m
+
+"""
+class BufferedHandshake(FIFOControl):
+    def __init__(self, stage, in_multi=None, stage_ctl=False):
+        FIFOControl.__init__(self, 2, stage, in_multi, stage_ctl,
+                                   fwft=True, buffered=False)
+"""
index 27fb9b0b32a110c98dc74b360e6bc936bd576e55..794fd9d523ec7c54eb00be52d9a6a3d9c1da9ebd 100644 (file)
@@ -48,7 +48,7 @@ def check_o_n_valid2(dut, val):
 def tbench(dut):
     #yield dut.i_p_rst.eq(1)
     yield dut.n.i_ready.eq(0)
-    yield dut.p.o_ready.eq(0)
+    #yield dut.p.o_ready.eq(0)
     yield
     yield
     #yield dut.i_p_rst.eq(0)