From 847d64f3ed501c03652098d2ace0a8a4e1291c62 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Aug 2019 10:28:37 +0100 Subject: [PATCH] concatenate mask bits on fan-in, split on fan-out --- src/nmutil/iocontrol.py | 20 +++++-- src/nmutil/multipipe.py | 54 +++++++++++-------- src/nmutil/singlepipe.py | 5 +- .../test/test_inout_unary_mux_cancel_pipe.py | 24 ++++----- 4 files changed, 61 insertions(+), 42 deletions(-) diff --git a/src/nmutil/iocontrol.py b/src/nmutil/iocontrol.py index 8254795e..04e41238 100644 --- a/src/nmutil/iocontrol.py +++ b/src/nmutil/iocontrol.py @@ -171,11 +171,12 @@ class PrevControl(Elaboratable): * data_i : an input - MUST be added by the USER of this class """ - def __init__(self, i_width=1, stage_ctl=False, maskwid=0): + def __init__(self, i_width=1, stage_ctl=False, maskwid=0, offs=0): self.stage_ctl = stage_ctl self.maskwid = maskwid if maskwid: self.mask_i = Signal(maskwid) # prev >>in self + self.stop_i = Signal(maskwid) # prev >>in self self.valid_i = Signal(i_width, name="p_valid_i") # prev >>in self self._ready_o = Signal(name="p_ready_o") # prev <> next + self.stop_o = Signal(maskwid) # self out>> next self.valid_o = Signal(name="n_valid_o") # self out>> next self.ready_i = Signal(name="n_ready_i") # self <