simple_cache.py (12339:1141f798a210) simple_cache.py (12564:2778478ca882)
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
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
36# import the m5 (gem5) library created when gem5 is built
37import m5
38# import all of the SimObjects
39from m5.objects import *
40
41# create the system we are going to simulate
42system = System()
43

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

91system.cpu.workload = process
92system.cpu.createThreads()
93
94# set up the root SimObject and start the simulation
95root = Root(full_system = False, system = system)
96# instantiate all of the objects we've created above
97m5.instantiate()
98
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
99print "Beginning simulation!"
101print("Beginning simulation!")
100exit_event = m5.simulate()
102exit_event = m5.simulate()
101print 'Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause())
103print('Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause()))