1# Copyright (c) 2016-2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

35#
36# Authors: Gabor Dozsa
37# Andreas Sandberg
38
39# This is an example configuration script for full system simulation of
40# a generic ARM bigLITTLE system.
41
42
43from __future__ import print_function
44
45import argparse
46import os
47import sys
48import m5
49import m5.util
50from m5.objects import *
51
52m5.util.addToPath("../../")

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

308
309
310def run(checkpoint_dir=m5.options.outdir):
311 # start simulation (and drop checkpoints when requested)
312 while True:
313 event = m5.simulate()
314 exit_msg = event.getCause()
315 if exit_msg == "checkpoint":
314 print "Dropping checkpoint at tick %d" % m5.curTick()
316 print("Dropping checkpoint at tick %d" % m5.curTick())
317 cpt_dir = os.path.join(checkpoint_dir, "cpt.%d" % m5.curTick())
318 m5.checkpoint(cpt_dir)
317 print "Checkpoint done."
319 print("Checkpoint done.")
320 else:
319 print exit_msg, " @ ", m5.curTick()
321 print(exit_msg, " @ ", m5.curTick())
322 break
323
324 sys.exit(event.getCode())
325
326
327def main():
328 parser = argparse.ArgumentParser(
329 description="Generic ARM big.LITTLE configuration")
330 addOptions(parser)
331 options = parser.parse_args()
332 root = build(options)
333 instantiate(options)
334 run()
335
336
337if __name__ == "__m5_main__":
338 main()