Deleted Added
sdiff udiff text old ( 13774:a1be2a0c55f2 ) new ( 13839:a32423451596 )
full compact
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;

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

84system.mem_ctrl.port = system.membus.master
85
86# Connect the system up to the membus
87system.system_port = system.membus.slave
88
89# get ISA for the binary to run.
90isa = str(m5.defines.buildEnv['TARGET_ISA']).lower()
91
92# Default to running 'hello', use the compiled ISA to find the binary
93# grab the specific path to the binary
94thispath = os.path.dirname(os.path.realpath(__file__))
95binary = os.path.join(thispath, '../../../',
96 'tests/test-progs/hello/bin/', isa, 'linux/hello')
97
98# Create a process for a simple "Hello World" application
99process = Process()
100# Set the command
101# cmd is a list which begins with the executable (like argv)
102process.cmd = [binary]
103# Set the cpu to use the process as its workload and create thread contexts
104system.cpu.workload = process
105system.cpu.createThreads()
106
107# set up the root SimObject and start the simulation
108root = Root(full_system = False, system = system)
109# instantiate all of the objects we've created above
110m5.instantiate()
111
112print("Beginning simulation!")
113exit_event = m5.simulate()
114print('Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause()))