params.py (13558:2a8d8f64d900) params.py (13594:441bb7a7b2a8)
1# Copyright (c) 2012-2014, 2017, 2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

1878 (self.name, self.simobj.path()))
1879 raise
1880 self.connect(realPeer)
1881
1882 # Call C++ to create corresponding port connection between C++ objects
1883 def ccConnect(self):
1884 from _m5.pyobject import connectPorts
1885
1# Copyright (c) 2012-2014, 2017, 2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

1878 (self.name, self.simobj.path()))
1879 raise
1880 self.connect(realPeer)
1881
1882 # Call C++ to create corresponding port connection between C++ objects
1883 def ccConnect(self):
1884 from _m5.pyobject import connectPorts
1885
1886 if self.role == 'SLAVE':
1887 # do nothing and let the master take care of it
1888 return
1889
1890 if self.ccConnected: # already done this
1891 return
1886 if self.ccConnected: # already done this
1887 return
1888
1892 peer = self.peer
1893 if not self.peer: # nothing to connect to
1894 return
1895
1896 # check that we connect a master to a slave
1897 if self.role == peer.role:
1898 raise TypeError, \
1899 "cannot connect '%s' and '%s' due to identical role '%s'" \
1900 % (peer, self, self.role)
1901
1889 peer = self.peer
1890 if not self.peer: # nothing to connect to
1891 return
1892
1893 # check that we connect a master to a slave
1894 if self.role == peer.role:
1895 raise TypeError, \
1896 "cannot connect '%s' and '%s' due to identical role '%s'" \
1897 % (peer, self, self.role)
1898
1899 if self.role == 'SLAVE':
1900 # do nothing and let the master take care of it
1901 return
1902
1902 try:
1903 # self is always the master and peer the slave
1904 connectPorts(self.simobj.getCCObject(), self.name, self.index,
1905 peer.simobj.getCCObject(), peer.name, peer.index)
1906 except:
1907 print("Error connecting port %s.%s to %s.%s" %
1908 (self.simobj.path(), self.name,
1909 peer.simobj.path(), peer.name))

--- 197 unchanged lines hidden ---
1903 try:
1904 # self is always the master and peer the slave
1905 connectPorts(self.simobj.getCCObject(), self.name, self.index,
1906 peer.simobj.getCCObject(), peer.name, peer.index)
1907 except:
1908 print("Error connecting port %s.%s to %s.%s" %
1909 (self.simobj.path(), self.name,
1910 peer.simobj.path(), peer.name))

--- 197 unchanged lines hidden ---