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