bus: list signals
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 15 Jan 2012 14:48:51 +0000 (15:48 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 15 Jan 2012 14:48:51 +0000 (15:48 +0100)
migen/bus/simple.py

index 07214679c3731f84041262a99de8760fa73a9bc5..e7dcc52be20f0fadb8121eac52a517bd46e04db4 100644 (file)
@@ -20,3 +20,8 @@ class Simple():
                                busname += "_" + name
                        signame = get_sig_name(signal, slave)
                        setattr(self, signame, Signal(BV(signal[2]), busname + "_" + signame))
+       
+       def signals(self):
+               return [self.__dict__[k]
+                       for k in self.__dict__
+                       if isinstance(self.__dict__[k], Signal)]