Deleted Added
sdiff udiff text old ( 3624:aaba7e06ece4 ) new ( 4081:80f1e833d118 )
full compact
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

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

648 for child in child_names:
649 self._children[child].unproxy_all()
650
651 def print_ini(self):
652 print '[' + self.path() + ']' # .ini section header
653
654 instanceDict[self.path()] = self
655
656 if hasattr(self, 'type'):
657 print 'type=%s' % self.type
658
659 child_names = self._children.keys()
660 child_names.sort()
661 if len(child_names):
662 print 'children=%s' % ' '.join(child_names)
663
664 param_names = self._params.keys()
665 param_names.sort()
666 for param in param_names:
667 value = self._values.get(param)
668 if value != None:
669 print '%s=%s' % (param, self._values[param].ini_str())
670

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

704 def connectPorts(self):
705 for portRef in self._port_refs.itervalues():
706 portRef.ccConnect()
707 for child in self._children.itervalues():
708 child.connectPorts()
709
710 def startDrain(self, drain_event, recursive):
711 count = 0
712 if isinstance(self, SimObject):
713 count += self._ccObject.drain(drain_event)
714 if recursive:
715 for child in self._children.itervalues():
716 count += child.startDrain(drain_event, True)
717 return count
718
719 def resume(self):
720 if isinstance(self, SimObject):
721 self._ccObject.resume()
722 for child in self._children.itervalues():
723 child.resume()
724
725 def changeTiming(self, mode):
726 if isinstance(self, m5.objects.System):
727 # i don't know if there's a better way to do this - calling
728 # setMemoryMode directly from self._ccObject results in calling

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

774 tailport="w"))
775 label += '}'
776 dot.add_node(pydot.Node(self.path,shape="Mrecord",label=label))
777
778 # recursively dump out children
779 for c in self.children:
780 c.outputDot(dot)
781
782# Function to provide to C++ so it can look up instances based on paths
783def resolveSimObject(name):
784 obj = instanceDict[name]
785 return obj.getCCObject()
786
787# __all__ defines the list of symbols that get exported when
788# 'from config import *' is invoked. Try to keep this reasonably
789# short to avoid polluting other namespaces.
790__all__ = ['SimObject']
791
792# see comment on imports at end of __init__.py.
793import proxy
794import internal
795import m5