fs.py (3005:ceb86e85d62d) fs.py (3022:b3b379cb97ef)
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

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

97 root.system.cpu = cpu
98 cpu.connectMemPorts(root.system.membus)
99else:
100 print "Error I don't know how to create more than 2 systems."
101 sys.exit(1)
102
103m5.instantiate(root)
104
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

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

97 root.system.cpu = cpu
98 cpu.connectMemPorts(root.system.membus)
99else:
100 print "Error I don't know how to create more than 2 systems."
101 sys.exit(1)
102
103m5.instantiate(root)
104
105#exit_event = m5.simulate(2600000000000)
106#if exit_event.getCause() != "user interrupt received":
107# m5.checkpoint(root, 'cpt')
108# exit_event = m5.simulate(300000000000)
109# if exit_event.getCause() != "user interrupt received":
110# m5.checkpoint(root, 'cptA')
111
112
113if options.maxtick:
105if options.maxtick:
114 exit_event = m5.simulate(options.maxtick)
106 arg = options.maxtick
115elif options.maxtime:
116 simtime = int(options.maxtime * root.clock.value)
117 print "simulating for: ", simtime
107elif options.maxtime:
108 simtime = int(options.maxtime * root.clock.value)
109 print "simulating for: ", simtime
118 exit_event = m5.simulate(simtime)
110 arg = simtime
119else:
111else:
120 exit_event = m5.simulate()
112 arg = -1
121
113
114exit_event = m5.simulate(arg)
115
116while exit_event.getCause() == "checkpoint":
117 m5.checkpoint(root, "cpt.%d")
118 exit_event = m5.simulate(arg)
119
122print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause()
120print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause()