config.py (2740:1c2058745499) | config.py (2763:c3741c707d53) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Steve Reinhardt 28# Nathan Binkert 29 30import os, re, sys, types, inspect, copy 31 32import m5 | 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 --- 16 unchanged lines hidden (view full) --- 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Steve Reinhardt 28# Nathan Binkert 29 30import os, re, sys, types, inspect, copy 31 32import m5 |
33from m5 import panic | 33from m5 import panic, cc_main |
34from convert import * 35from multidict import multidict 36 37noDot = False 38try: 39 import pydot 40except: 41 noDot = True --- 482 unchanged lines hidden (view full) --- 524 child.createCCObject() 525 526 # Get C++ object corresponding to this object, calling C++ if 527 # necessary to construct it. Does *not* recursively create 528 # children. 529 def getCCObject(self): 530 if not self._ccObject: 531 self._ccObject = -1 # flag to catch cycles in recursion | 34from convert import * 35from multidict import multidict 36 37noDot = False 38try: 39 import pydot 40except: 41 noDot = True --- 482 unchanged lines hidden (view full) --- 524 child.createCCObject() 525 526 # Get C++ object corresponding to this object, calling C++ if 527 # necessary to construct it. Does *not* recursively create 528 # children. 529 def getCCObject(self): 530 if not self._ccObject: 531 self._ccObject = -1 # flag to catch cycles in recursion |
532 self._ccObject = m5.main.createSimObject(self.path()) | 532 self._ccObject = cc_main.createSimObject(self.path()) |
533 elif self._ccObject == -1: 534 raise RuntimeError, "%s: recursive call to getCCObject()" \ 535 % self.path() 536 return self._ccObject 537 538 # Create C++ port connections corresponding to the connections in 539 # _port_map (& recursively for all children) 540 def connectPorts(self): --- 897 unchanged lines hidden (view full) --- 1438 newRef.peer = -1 # mark as waiting for handshake 1439 return newRef 1440 1441 # Call C++ to create corresponding port connection between C++ objects 1442 def ccConnect(self): 1443 if self.ccConnected: # already done this 1444 return 1445 peer = self.peer | 533 elif self._ccObject == -1: 534 raise RuntimeError, "%s: recursive call to getCCObject()" \ 535 % self.path() 536 return self._ccObject 537 538 # Create C++ port connections corresponding to the connections in 539 # _port_map (& recursively for all children) 540 def connectPorts(self): --- 897 unchanged lines hidden (view full) --- 1438 newRef.peer = -1 # mark as waiting for handshake 1439 return newRef 1440 1441 # Call C++ to create corresponding port connection between C++ objects 1442 def ccConnect(self): 1443 if self.ccConnected: # already done this 1444 return 1445 peer = self.peer |
1446 m5.main.connectPorts(self.simobj.getCCObject(), self.name, self.index, | 1446 cc_main.connectPorts(self.simobj.getCCObject(), self.name, self.index, |
1447 peer.simobj.getCCObject(), peer.name, peer.index) 1448 self.ccConnected = True 1449 peer.ccConnected = True 1450 1451# Port description object. Like a ParamDesc object, this represents a 1452# logical port in the SimObject class, not a particular port on a 1453# SimObject instance. The latter are represented by PortRef objects. 1454class Port(object): --- 46 unchanged lines hidden --- | 1447 peer.simobj.getCCObject(), peer.name, peer.index) 1448 self.ccConnected = True 1449 peer.ccConnected = True 1450 1451# Port description object. Like a ParamDesc object, this represents a 1452# logical port in the SimObject class, not a particular port on a 1453# SimObject instance. The latter are represented by PortRef objects. 1454class Port(object): --- 46 unchanged lines hidden --- |