From 0d4ef281e8c57b0917406fe82f7402ea4c78983d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Aug 2019 01:38:09 +0100 Subject: [PATCH] add mask to NextControl --- src/nmutil/iocontrol.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/nmutil/iocontrol.py b/src/nmutil/iocontrol.py index 66289fd7..8254795e 100644 --- a/src/nmutil/iocontrol.py +++ b/src/nmutil/iocontrol.py @@ -258,8 +258,11 @@ class NextControl(Elaboratable): * ready_i: input from next stage indicating that it can accept data * data_o : an output - MUST be added by the USER of this class """ - def __init__(self, stage_ctl=False): + def __init__(self, stage_ctl=False, maskwid=0): self.stage_ctl = stage_ctl + self.maskwid = maskwid + if maskwid: + self.mask_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 <