System.py revision 7897
14486Sbinkertn@umich.edu# Copyright (c) 2005-2007 The Regents of The University of Michigan 27897Shestness@cs.utexas.edu# Copyright (c) 2011 Regents of the University of California 34486Sbinkertn@umich.edu# All rights reserved. 44486Sbinkertn@umich.edu# 54486Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 64486Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 74486Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 84486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 94486Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 104486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 114486Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 124486Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 134486Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 144486Sbinkertn@umich.edu# this software without specific prior written permission. 154486Sbinkertn@umich.edu# 164486Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 174486Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 184486Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 194486Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 204486Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 214486Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 224486Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 234486Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 244486Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 254486Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 264486Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274486Sbinkertn@umich.edu# 284486Sbinkertn@umich.edu# Authors: Nathan Binkert 297897Shestness@cs.utexas.edu# Rick Strong 304486Sbinkertn@umich.edu 313102SN/Afrom m5.SimObject import SimObject 326654Snate@binkert.orgfrom m5.defines import buildEnv 333102SN/Afrom m5.params import * 343102SN/Afrom m5.proxy import * 356654Snate@binkert.org 363584SN/Afrom PhysicalMemory import * 372212SN/A 382902SN/Aclass MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing'] 392902SN/A 401711SN/Aclass System(SimObject): 411783SN/A type = 'System' 427673Snate@binkert.org 437673Snate@binkert.org @classmethod 447673Snate@binkert.org def swig_objdecls(cls, code): 457673Snate@binkert.org code('%include "python/swig/system.i"') 464859Snate@binkert.org 475820Snate@binkert.org physmem = Param.PhysicalMemory(Parent.any, "physical memory") 482902SN/A mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in") 497897Shestness@cs.utexas.edu 506654Snate@binkert.org if buildEnv['FULL_SYSTEM']: 514597Sbinkertn@umich.edu abstract = True 522424SN/A boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency, 532424SN/A "boot processor frequency") 542424SN/A init_param = Param.UInt64(0, "numerical value to pass into simulator") 552570SN/A boot_osflags = Param.String("a", "boot flags to pass to the kernel") 563812SN/A kernel = Param.String("", "file that contains the kernel code") 572424SN/A readfile = Param.String("", "file to read startup script from") 583125SN/A symbolfile = Param.String("", "file to get the symbols from") 597580SAli.Saidi@arm.com load_addr_mask = Param.UInt64(0xffffffffff, 607580SAli.Saidi@arm.com "Address to mask loading binaries with"); 61