1# -*- coding: utf-8 -*- 2# Copyright (c) 2017 Jason Lowe-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; --- 19 unchanged lines hidden (view full) --- 28# Authors: Jason Lowe-Power 29 30""" This file creates a barebones system and executes 'hello', a simple Hello 31World application. Adds a simple cache between the CPU and the membus. 32 33This config file assumes that the x86 ISA was built. 34""" 35 |
36from __future__ import print_function 37 |
38# import the m5 (gem5) library created when gem5 is built 39import m5 40# import all of the SimObjects 41from m5.objects import * 42 43# create the system we are going to simulate 44system = System() 45 --- 47 unchanged lines hidden (view full) --- 93system.cpu.workload = process 94system.cpu.createThreads() 95 96# set up the root SimObject and start the simulation 97root = Root(full_system = False, system = system) 98# instantiate all of the objects we've created above 99m5.instantiate() 100 |
101print("Beginning simulation!") |
102exit_event = m5.simulate() |
103print('Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause())) |