generic_platform: fix request
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 11 Feb 2013 16:54:01 +0000 (17:54 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 11 Feb 2013 16:54:01 +0000 (17:54 +0100)
mibuild/generic_platform.py

index 2f8fd4aea331d838c00a06d875be596f3bf084a6..cf2300944a1b091d33526015cafcf138c5c157e8 100644 (file)
@@ -35,7 +35,7 @@ def _lookup(description, name, number):
        for resource in description:
                if resource[0] == name and (number is None or resource[1] == number):
                        return resource
-       raise ConstraintError("Resource not found")
+       raise ConstraintError("Resource not found: " + name + "." + str(number))
                
 def _resource_type(resource, name_map):
        t = None
@@ -107,8 +107,8 @@ class ConstraintManager:
                        if isinstance(t, int):
                                assert(isinstance(obj, Signal) and obj.nbits == t)
                        else:
-                               for name, nbits in t:
-                                       sig = getattr(obj, name)
+                               for attr, nbits in t:
+                                       sig = getattr(obj, attr)
                                        assert(isinstance(sig, Signal) and sig.nbits == nbits)
 
                # Register the request