From: Sebastien Bourdeauducq Date: Fri, 10 Feb 2012 16:49:06 +0000 (+0100) Subject: bus/asmibus: add get_slots, fix get_fragment X-Git-Tag: 24jan2021_ls180~2099^2~1034 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef436a1ec9dbc37b5cfa0ec64627238f9a5f59fd;p=litex.git bus/asmibus: add get_slots, fix get_fragment --- diff --git a/migen/bus/asmibus.py b/migen/bus/asmibus.py index e52a9a20..712e7f86 100644 --- a/migen/bus/asmibus.py +++ b/migen/bus/asmibus.py @@ -134,7 +134,10 @@ class Hub: port.finalize(tagbits, base) base += len(port.slots) + def get_slots(self): + return sum([port.slots for port in self.ports], []) + def get_fragment(self): if not self.finalized: raise FinalizeError - return sum([port.get_fragment() for port in self.ports]) + return sum([port.get_fragment() for port in self.ports], Fragment())