two_level.py (11837:17b37f38944a) | two_level.py (11851:824055fe6b30) |
---|---|
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; --- 119 unchanged lines hidden (view full) --- 128system.system_port = system.membus.slave 129 130# Create a DDR3 memory controller 131system.mem_ctrl = DDR3_1600_8x8() 132system.mem_ctrl.range = system.mem_ranges[0] 133system.mem_ctrl.port = system.membus.master 134 135# Create a process for a simple "Hello World" application | 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; --- 119 unchanged lines hidden (view full) --- 128system.system_port = system.membus.slave 129 130# Create a DDR3 memory controller 131system.mem_ctrl = DDR3_1600_8x8() 132system.mem_ctrl.range = system.mem_ranges[0] 133system.mem_ctrl.port = system.membus.master 134 135# Create a process for a simple "Hello World" application |
136process = LiveProcess() | 136process = Process() |
137# Set the command 138# cmd is a list which begins with the executable (like argv) 139process.cmd = [binary] 140# Set the cpu to use the process as its workload and create thread contexts 141system.cpu.workload = process 142system.cpu.createThreads() 143 144# set up the root SimObject and start the simulation 145root = Root(full_system = False, system = system) 146# instantiate all of the objects we've created above 147m5.instantiate() 148 149print "Beginning simulation!" 150exit_event = m5.simulate() 151print 'Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause()) | 137# Set the command 138# cmd is a list which begins with the executable (like argv) 139process.cmd = [binary] 140# Set the cpu to use the process as its workload and create thread contexts 141system.cpu.workload = process 142system.cpu.createThreads() 143 144# set up the root SimObject and start the simulation 145root = Root(full_system = False, system = system) 146# instantiate all of the objects we've created above 147m5.instantiate() 148 149print "Beginning simulation!" 150exit_event = m5.simulate() 151print 'Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause()) |