config.py (2665:a124942bacb8) | config.py (2667:fe64b8353b1c) |
---|---|
1# Copyright (c) 2004-2005 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 --- 714 unchanged lines hidden (view full) --- 723 raise TypeError, 'extra unknown kwargs %s' % kwargs 724 725 if not hasattr(self, 'desc'): 726 raise TypeError, 'desc attribute missing' 727 728 def __getattr__(self, attr): 729 if attr == 'ptype': 730 try: | 1# Copyright (c) 2004-2005 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 --- 714 unchanged lines hidden (view full) --- 723 raise TypeError, 'extra unknown kwargs %s' % kwargs 724 725 if not hasattr(self, 'desc'): 726 raise TypeError, 'desc attribute missing' 727 728 def __getattr__(self, attr): 729 if attr == 'ptype': 730 try: |
731 ptype = eval(self.ptype_str, m5.__dict__) | 731 ptype = eval(self.ptype_str, m5.objects.__dict__) |
732 if not isinstance(ptype, type): 733 panic("Param qualifier is not a type: %s" % self.ptype) 734 self.ptype = ptype 735 return ptype 736 except NameError: 737 pass 738 raise AttributeError, "'%s' object has no attribute '%s'" % \ 739 (type(self).__name__, attr) --- 545 unchanged lines hidden (view full) --- 1285 1286# Some memory range specifications use this as a default upper bound. 1287MaxAddr = Addr.max 1288MaxTick = Tick.max 1289AllMemory = AddrRange(0, MaxAddr) 1290 1291##################################################################### 1292 | 732 if not isinstance(ptype, type): 733 panic("Param qualifier is not a type: %s" % self.ptype) 734 self.ptype = ptype 735 return ptype 736 except NameError: 737 pass 738 raise AttributeError, "'%s' object has no attribute '%s'" % \ 739 (type(self).__name__, attr) --- 545 unchanged lines hidden (view full) --- 1285 1286# Some memory range specifications use this as a default upper bound. 1287MaxAddr = Addr.max 1288MaxTick = Tick.max 1289AllMemory = AddrRange(0, MaxAddr) 1290 1291##################################################################### 1292 |
1293# The final hook to generate .ini files. Called from configuration 1294# script once config is built. 1295def instantiate(root): 1296 global ticks_per_sec 1297 ticks_per_sec = float(root.clock.frequency) 1298 root.print_ini() 1299 noDot = True # temporary until we fix dot 1300 if not noDot: 1301 dot = pydot.Dot() 1302 instance.outputDot(dot) 1303 dot.orientation = "portrait" 1304 dot.size = "8.5,11" 1305 dot.ranksep="equally" 1306 dot.rank="samerank" 1307 dot.write("config.dot") 1308 dot.write_ps("config.ps") 1309 | |
1310# __all__ defines the list of symbols that get exported when 1311# 'from config import *' is invoked. Try to keep this reasonably 1312# short to avoid polluting other namespaces. 1313__all__ = ['SimObject', 'ParamContext', 'Param', 'VectorParam', 1314 'Parent', 'Self', 1315 'Enum', 'Bool', 'String', 'Float', 1316 'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16', 1317 'Int32', 'UInt32', 'Int64', 'UInt64', 1318 'Counter', 'Addr', 'Tick', 'Percent', 1319 'TcpPort', 'UdpPort', 'EthernetAddr', 1320 'MemorySize', 'MemorySize32', 1321 'Latency', 'Frequency', 'RootClock', 'Clock', 1322 'NetworkBandwidth', 'MemoryBandwidth', 1323 'Range', 'AddrRange', 'MaxAddr', 'MaxTick', 'AllMemory', 1324 'Null', 'NULL', | 1293# __all__ defines the list of symbols that get exported when 1294# 'from config import *' is invoked. Try to keep this reasonably 1295# short to avoid polluting other namespaces. 1296__all__ = ['SimObject', 'ParamContext', 'Param', 'VectorParam', 1297 'Parent', 'Self', 1298 'Enum', 'Bool', 'String', 'Float', 1299 'Int', 'Unsigned', 'Int8', 'UInt8', 'Int16', 'UInt16', 1300 'Int32', 'UInt32', 'Int64', 'UInt64', 1301 'Counter', 'Addr', 'Tick', 'Percent', 1302 'TcpPort', 'UdpPort', 'EthernetAddr', 1303 'MemorySize', 'MemorySize32', 1304 'Latency', 'Frequency', 'RootClock', 'Clock', 1305 'NetworkBandwidth', 'MemoryBandwidth', 1306 'Range', 'AddrRange', 'MaxAddr', 'MaxTick', 'AllMemory', 1307 'Null', 'NULL', |
1325 'NextEthernetAddr', 'instantiate'] | 1308 'NextEthernetAddr'] |
1326 | 1309 |