bus/asmibus/hub: require finalization before get_slots
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 14 Mar 2012 15:19:29 +0000 (16:19 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 14 Mar 2012 15:19:29 +0000 (16:19 +0100)
migen/bus/asmibus.py

index 77723b674234c9a4580371f7b5d3bb5b2f1221dd..3d4ed415f16345649c3b82f45856aaaade7035e4 100644 (file)
@@ -146,6 +146,8 @@ class Hub:
                self.tag_call = Signal(BV(tagbits))
        
        def get_slots(self):
+               if not self.finalized:
+                       raise FinalizeError
                return sum([port.slots for port in self.ports], [])
        
        def get_fragment(self):