From 8e6c2ffa200d6ca56f70fe7375222351874b8a91 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Aug 2019 01:32:42 +0100 Subject: [PATCH] add mask to PrevControl --- src/nmutil/iocontrol.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/nmutil/iocontrol.py b/src/nmutil/iocontrol.py index af46d25a..66289fd7 100644 --- a/src/nmutil/iocontrol.py +++ b/src/nmutil/iocontrol.py @@ -171,8 +171,11 @@ 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): + def __init__(self, i_width=1, stage_ctl=False, maskwid=0): self.stage_ctl = stage_ctl + self.maskwid = maskwid + if maskwid: + self.mask_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 <