From 49ca9ef6e4a5bcbba6f6c79a15478a49ef7996fd Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 6 Apr 2019 10:51:10 +0100 Subject: [PATCH] pass in argument into delay class --- src/add/test_buf_pipe.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/add/test_buf_pipe.py b/src/add/test_buf_pipe.py index c728a01f..83880cdb 100644 --- a/src/add/test_buf_pipe.py +++ b/src/add/test_buf_pipe.py @@ -591,8 +591,9 @@ class ExampleStageDelayCls(StageCls): fashion """ - def __init__(self): + def __init__(self, valid_trigger=2): self.count = Signal(2) + self.valid_trigger = valid_trigger def ispec(self): return Signal(16, name="example_input_signal") @@ -607,7 +608,7 @@ class ExampleStageDelayCls(StageCls): @property def d_valid(self): - return self.count == 3 + return self.count == self.valid_trigger return Const(1) def process(self, i): @@ -695,11 +696,11 @@ class ExampleBufAdd1Pipe(BufferedPipeline): BufferedPipeline.__init__(self, stage) -class ExampleUnBufAdd1Pipe(UnbufferedPipeline2): +class ExampleUnBufAdd1Pipe(UnbufferedPipeline): def __init__(self): stage = ExampleStageCls() - UnbufferedPipeline2.__init__(self, stage) + UnbufferedPipeline.__init__(self, stage) class ExampleBufUnBufPipe(ControlBase): -- 2.30.2