config.py (2901:f9a45473ab55) config.py (2922:654ef3d30b61)
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

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

542 applyOrMap(portRef, 'ccConnect')
543 for child in self._children.itervalues():
544 child.connectPorts()
545
546 def startDrain(self, drain_event, recursive):
547 count = 0
548 # ParamContexts don't serialize
549 if isinstance(self, SimObject) and not isinstance(self, ParamContext):
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

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

542 applyOrMap(portRef, 'ccConnect')
543 for child in self._children.itervalues():
544 child.connectPorts()
545
546 def startDrain(self, drain_event, recursive):
547 count = 0
548 # ParamContexts don't serialize
549 if isinstance(self, SimObject) and not isinstance(self, ParamContext):
550 count += self._ccObject.drain(drain_event)
550 if not self._ccObject.drain(drain_event):
551 count = 1
551 if recursive:
552 for child in self._children.itervalues():
553 count += child.startDrain(drain_event, True)
554 return count
555
556 def resume(self):
557 if isinstance(self, SimObject) and not isinstance(self, ParamContext):
558 self._ccObject.resume()
559 for child in self._children.itervalues():
560 child.resume()
561
562 def changeTiming(self, mode):
552 if recursive:
553 for child in self._children.itervalues():
554 count += child.startDrain(drain_event, True)
555 return count
556
557 def resume(self):
558 if isinstance(self, SimObject) and not isinstance(self, ParamContext):
559 self._ccObject.resume()
560 for child in self._children.itervalues():
561 child.resume()
562
563 def changeTiming(self, mode):
563 if isinstance(self, System):
564 if isinstance(self, SimObject) and not isinstance(self, ParamContext):
564 self._ccObject.setMemoryMode(mode)
565 for child in self._children.itervalues():
566 child.changeTiming(mode)
567
568 def takeOverFrom(self, old_cpu):
569 cpu_ptr = cc_main.convertToBaseCPUPtr(old_cpu._ccObject)
570 self._ccObject.takeOverFrom(cpu_ptr)
571

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

660 if self._search_up:
661 while not done:
662 obj = obj._parent
663 if not obj:
664 break
665 result, done = self.find(obj)
666
667 if not done:
565 self._ccObject.setMemoryMode(mode)
566 for child in self._children.itervalues():
567 child.changeTiming(mode)
568
569 def takeOverFrom(self, old_cpu):
570 cpu_ptr = cc_main.convertToBaseCPUPtr(old_cpu._ccObject)
571 self._ccObject.takeOverFrom(cpu_ptr)
572

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

661 if self._search_up:
662 while not done:
663 obj = obj._parent
664 if not obj:
665 break
666 result, done = self.find(obj)
667
668 if not done:
668 raise AttributeError, "Can't resolve proxy '%s' from '%s'" % \
669 raise AttributeError, \
670 "Can't resolve proxy '%s' from '%s'" % \
669 (self.path(), base.path())
670
671 if isinstance(result, BaseProxy):
672 if result == self:
673 raise RuntimeError, "Cycle in unproxy"
674 result = result.unproxy(obj)
675
676 return self._mulcheck(result)

--- 850 unchanged lines hidden ---
671 (self.path(), base.path())
672
673 if isinstance(result, BaseProxy):
674 if result == self:
675 raise RuntimeError, "Cycle in unproxy"
676 result = result.unproxy(obj)
677
678 return self._mulcheck(result)

--- 850 unchanged lines hidden ---