fs.py (3025:00fe36086a14) | fs.py (3046:fc3297be3869) |
---|---|
1# Copyright (c) 2006 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 --- 92 unchanged lines hidden (view full) --- 101 cpu.connectMemPorts(root.system.membus) 102else: 103 print "Error I don't know how to create more than 2 systems." 104 sys.exit(1) 105 106m5.instantiate(root) 107 108if options.maxtick: | 1# Copyright (c) 2006 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 --- 92 unchanged lines hidden (view full) --- 101 cpu.connectMemPorts(root.system.membus) 102else: 103 print "Error I don't know how to create more than 2 systems." 104 sys.exit(1) 105 106m5.instantiate(root) 107 108if options.maxtick: |
109 arg = options.maxtick | 109 maxtick = options.maxtick |
110elif options.maxtime: 111 simtime = int(options.maxtime * root.clock.value) 112 print "simulating for: ", simtime | 110elif options.maxtime: 111 simtime = int(options.maxtime * root.clock.value) 112 print "simulating for: ", simtime |
113 arg = simtime | 113 maxtick = simtime |
114else: | 114else: |
115 arg = -1 | 115 maxtick = -1 |
116 | 116 |
117exit_event = m5.simulate(arg) | 117exit_event = m5.simulate(maxtick) |
118 119while exit_event.getCause() == "checkpoint": | 118 119while exit_event.getCause() == "checkpoint": |
120 m5.checkpoint(root, "cpt.%d") 121 exit_event = m5.simulate(arg) | 120 m5.checkpoint(root, "cpt.%d") 121 exit_event = m5.simulate(maxtick - m5.curTick()) |
122 123print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause() | 122 123print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause() |