setattr(self, param, value)
print '%s=%s' % (param, self._values[param].ini_str())
+ port_names = self._ports.keys()
+ port_names.sort()
+ for port_name in port_names:
+ port = self._port_map.get(port_name, None)
+ if port == None:
+ default = getattr(self._ports[port_name], 'default', None)
+ if default == None:
+ # port is unbound... that's OK, go to next port
+ continue
+ else:
+ print port_name, default
+ port = m5.makeList(port) # make list even if it's a scalar port
+ print '%s=%s' % (port_name, ' '.join([str(p) for p in port]))
+
print # blank line between objects
for child in child_names:
# see comment on imports at end of __init__.py.
import proxy
import cc_main
+import m5
self.peer = None # not associated with another port yet
self.ccConnected = False # C++ port connection done?
+ def __str__(self):
+ ext = ''
+ if self.isVec:
+ ext = '[%d]' % self.index
+ return '%s.%s%s' % (self.simobj.path(), self.name, ext)
+
# Set peer port reference. Called via __setattr__ as a result of
# a port assignment, e.g., "obj1.port1 = obj2.port2".
def setPeer(self, other):