bus/asmibus: add get_slots, fix get_fragment
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 10 Feb 2012 16:49:06 +0000 (17:49 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 10 Feb 2012 16:49:06 +0000 (17:49 +0100)
migen/bus/asmibus.py

index e52a9a20bf0e9267f07bcd2151b3c689e51e21c1..712e7f86926dab9e2e6caaa10192fa8f51a76acd 100644 (file)
@@ -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())