SimObject.py (3102:225b76c8ac68) SimObject.py (3103:330ec058b026)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 590 unchanged lines hidden (view full) ---

599 except:
600 print >> sys.stderr, \
601 "Error in unproxying param '%s' of %s" % \
602 (param, self.path())
603 raise
604 setattr(self, param, value)
605 print '%s=%s' % (param, self._values[param].ini_str())
606
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 590 unchanged lines hidden (view full) ---

599 except:
600 print >> sys.stderr, \
601 "Error in unproxying param '%s' of %s" % \
602 (param, self.path())
603 raise
604 setattr(self, param, value)
605 print '%s=%s' % (param, self._values[param].ini_str())
606
607 port_names = self._ports.keys()
608 port_names.sort()
609 for port_name in port_names:
610 port = self._port_map.get(port_name, None)
611 if port == None:
612 default = getattr(self._ports[port_name], 'default', None)
613 if default == None:
614 # port is unbound... that's OK, go to next port
615 continue
616 else:
617 print port_name, default
618 port = m5.makeList(port) # make list even if it's a scalar port
619 print '%s=%s' % (port_name, ' '.join([str(p) for p in port]))
620
607 print # blank line between objects
608
609 for child in child_names:
610 self._children[child].print_ini()
611
612 # Call C++ to create C++ object corresponding to this object and
613 # (recursively) all its children
614 def createCCObject(self):

--- 102 unchanged lines hidden (view full) ---

717# 'from config import *' is invoked. Try to keep this reasonably
718# short to avoid polluting other namespaces.
719__all__ = ['SimObject', 'ParamContext']
720
721
722# see comment on imports at end of __init__.py.
723import proxy
724import cc_main
621 print # blank line between objects
622
623 for child in child_names:
624 self._children[child].print_ini()
625
626 # Call C++ to create C++ object corresponding to this object and
627 # (recursively) all its children
628 def createCCObject(self):

--- 102 unchanged lines hidden (view full) ---

731# 'from config import *' is invoked. Try to keep this reasonably
732# short to avoid polluting other namespaces.
733__all__ = ['SimObject', 'ParamContext']
734
735
736# see comment on imports at end of __init__.py.
737import proxy
738import cc_main
739import m5