1# -*- coding: utf-8 -*- 2# Copyright (c) 2015 Jason Power 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32See Part 1, Chapter 2: Creating a simple configuration script in the 33learning_gem5 book for more information about this script. 34 35IMPORTANT: If you modify this file, it's likely that the Learning gem5 book 36 also needs to be updated. For now, email Jason <power.jg@gmail.com> 37 38""" 39 |
40from __future__ import print_function 41 |
42# import the m5 (gem5) library created when gem5 is built 43import m5 44# import all of the SimObjects 45from m5.objects import * 46 47# create the system we are going to simulate 48system = System() 49 --- 49 unchanged lines hidden (view full) --- 99system.cpu.workload = process 100system.cpu.createThreads() 101 102# set up the root SimObject and start the simulation 103root = Root(full_system = False, system = system) 104# instantiate all of the objects we've created above 105m5.instantiate() 106 |
107print("Beginning simulation!") |
108exit_event = m5.simulate() |
109print('Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause())) |