params.py (12193:ae90e2b82531) params.py (12194:742ec08ee956)
1# Copyright (c) 2012-2014, 2017 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

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

265 if len(self) == 1:
266 self[0].set_parent(parent, name)
267 else:
268 width = int(math.ceil(math.log(len(self))/math.log(10)))
269 for i,v in enumerate(self):
270 v.set_parent(parent, "%s%0*d" % (name, width, i))
271
272 def has_parent(self):
1# Copyright (c) 2012-2014, 2017 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

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

265 if len(self) == 1:
266 self[0].set_parent(parent, name)
267 else:
268 width = int(math.ceil(math.log(len(self))/math.log(10)))
269 for i,v in enumerate(self):
270 v.set_parent(parent, "%s%0*d" % (name, width, i))
271
272 def has_parent(self):
273 elements = [e for e in self if not isNullPointer(e)]
274 return reduce(lambda x,y: x and y, [v.has_parent() for v in elements])
273 return any([e.has_parent() for e in self if not isNullPointer(e)])
275
276 # return 'cpu0 cpu1' etc. for print_ini()
277 def get_name(self):
278 return ' '.join([v._name for v in self])
279
280 # By iterating through the constituent members of the vector here
281 # we can nicely handle iterating over all a SimObject's children
282 # without having to provide lots of special functions on

--- 1799 unchanged lines hidden ---
274
275 # return 'cpu0 cpu1' etc. for print_ini()
276 def get_name(self):
277 return ' '.join([v._name for v in self])
278
279 # By iterating through the constituent members of the vector here
280 # we can nicely handle iterating over all a SimObject's children
281 # without having to provide lots of special functions on

--- 1799 unchanged lines hidden ---