ticks.py (4762:c94e103c83ad) ticks.py (6654:4c84e771cca7)
1# Copyright (c) 2007 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

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

36 import internal
37 global tps, tps_fixed
38 if not tps_fixed:
39 tps_fixed = True
40 internal.core.setClockFrequency(int(tps))
41 print "Global frequency set at %d ticks per second" % int(tps)
42
43def setGlobalFrequency(ticksPerSecond):
1# Copyright (c) 2007 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

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

36 import internal
37 global tps, tps_fixed
38 if not tps_fixed:
39 tps_fixed = True
40 internal.core.setClockFrequency(int(tps))
41 print "Global frequency set at %d ticks per second" % int(tps)
42
43def setGlobalFrequency(ticksPerSecond):
44 import convert
44 from m5.util import convert
45
46 global tps, tps_fixed
47
48 if tps_fixed:
49 raise AttributeError, \
50 "Global frequency already fixed at %f ticks/s." % tps
51
52 if isinstance(ticksPerSecond, (int, long)):

--- 37 unchanged lines hidden ---
45
46 global tps, tps_fixed
47
48 if tps_fixed:
49 raise AttributeError, \
50 "Global frequency already fixed at %f ticks/s." % tps
51
52 if isinstance(ticksPerSecond, (int, long)):

--- 37 unchanged lines hidden ---