Root.py (9983:2cce74fe359e) | Root.py (11320:42ecb523c64a) |
---|---|
1# Copyright (c) 2005-2007 The Regents of The University of Michigan 2# Copyright (c) 2010-2013 Advanced Micro Devices, Inc. 3# Copyright (c) 2013 Mark D. Hill and David A. Wood 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 36 unchanged lines hidden (view full) --- 45 # first call: allocate the unique instance 46 # 47 # If SimObject ever implements __new__, we may want to pass 48 # kwargs here, but for now this goes straight to 49 # object.__new__ which prints an ugly warning if you pass it 50 # args. Seems like a bad design but that's the way it is. 51 Root._the_instance = SimObject.__new__(cls) 52 return Root._the_instance | 1# Copyright (c) 2005-2007 The Regents of The University of Michigan 2# Copyright (c) 2010-2013 Advanced Micro Devices, Inc. 3# Copyright (c) 2013 Mark D. Hill and David A. Wood 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 36 unchanged lines hidden (view full) --- 45 # first call: allocate the unique instance 46 # 47 # If SimObject ever implements __new__, we may want to pass 48 # kwargs here, but for now this goes straight to 49 # object.__new__ which prints an ugly warning if you pass it 50 # args. Seems like a bad design but that's the way it is. 51 Root._the_instance = SimObject.__new__(cls) 52 return Root._the_instance |
53 | 53 |
54 @classmethod 55 def getInstance(cls): 56 return Root._the_instance 57 58 def path(self): 59 return 'root' 60 61 type = 'Root' --- 17 unchanged lines hidden --- | 54 @classmethod 55 def getInstance(cls): 56 return Root._the_instance 57 58 def path(self): 59 return 'root' 60 61 type = 'Root' --- 17 unchanged lines hidden --- |