From 42c10463233d839acad7938e1dd1ea004c4a6e61 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 28 Feb 2024 13:04:48 +0100 Subject: [PATCH] soc/interconnect/packet: Add **kwargs to Arbiter/Dispatcher to allow specifying keep/omit parameters for connection. --- litex/soc/interconnect/packet.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/litex/soc/interconnect/packet.py b/litex/soc/interconnect/packet.py index 4d7f7b12a..d57c78aac 100644 --- a/litex/soc/interconnect/packet.py +++ b/litex/soc/interconnect/packet.py @@ -1,7 +1,7 @@ # # This file is part of LiteX. # -# Copyright (c) 2015-2019 Florent Kermarrec +# Copyright (c) 2015-2024 Florent Kermarrec # Copyright (c) 2019 Vamsi K Vytla # SPDX-License-Identifier: BSD-2-Clause @@ -37,12 +37,12 @@ class Status(LiteXModule): # Arbiter ------------------------------------------------------------------------------------------ class Arbiter(LiteXModule): - def __init__(self, masters, slave): + def __init__(self, masters, slave, **kwargs): if len(masters) == 0: pass elif len(masters) == 1: self.grant = Signal() - self.comb += masters.pop().connect(slave) + self.comb += masters.pop().connect(slave, **kwargs) else: self.rr = RoundRobin(len(masters)) self.grant = self.rr.grant @@ -57,11 +57,11 @@ class Arbiter(LiteXModule): # Dispatcher --------------------------------------------------------------------------------------- class Dispatcher(LiteXModule): - def __init__(self, master, slaves, one_hot=False): + def __init__(self, master, slaves, one_hot=False, **kwargs): if len(slaves) == 0: self.sel = Signal() elif len(slaves) == 1 and not one_hot: - self.comb += master.connect(slaves.pop()) + self.comb += master.connect(slaves.pop(), **kwargs) self.sel = Signal() else: if one_hot: