bus/asmibus: add get_slots, fix get_fragment
This commit is contained in:
parent
945d655d45
commit
ef436a1ec9
|
@ -134,7 +134,10 @@ class Hub:
|
||||||
port.finalize(tagbits, base)
|
port.finalize(tagbits, base)
|
||||||
base += len(port.slots)
|
base += len(port.slots)
|
||||||
|
|
||||||
|
def get_slots(self):
|
||||||
|
return sum([port.slots for port in self.ports], [])
|
||||||
|
|
||||||
def get_fragment(self):
|
def get_fragment(self):
|
||||||
if not self.finalized:
|
if not self.finalized:
|
||||||
raise FinalizeError
|
raise FinalizeError
|
||||||
return sum([port.get_fragment() for port in self.ports])
|
return sum([port.get_fragment() for port in self.ports], Fragment())
|
||||||
|
|
Loading…
Reference in New Issue