SConscript revision 7202
110448Snilay@cs.wisc.edu# -*- mode:python -*-
210448Snilay@cs.wisc.edu
310448Snilay@cs.wisc.edu# Copyright (c) 2009 ARM Limited
410448Snilay@cs.wisc.edu# All rights reserved.
510448Snilay@cs.wisc.edu#
610448Snilay@cs.wisc.edu# The license below extends only to copyright in the software and shall
710448Snilay@cs.wisc.edu# not be construed as granting a license to any other intellectual
810448Snilay@cs.wisc.edu# property including but not limited to intellectual property relating
910448Snilay@cs.wisc.edu# to a hardware implementation of the functionality of the software
1010448Snilay@cs.wisc.edu# licensed hereunder.  You may use the software subject to the license
1110448Snilay@cs.wisc.edu# terms below provided that you ensure that this notice is replicated
1210448Snilay@cs.wisc.edu# unmodified and in its entirety in all distributions of the software,
1310448Snilay@cs.wisc.edu# modified or unmodified, in source code or in binary form.
1410448Snilay@cs.wisc.edu#
1510448Snilay@cs.wisc.edu# Copyright (c) 2007-2008 The Florida State University
1610448Snilay@cs.wisc.edu# All rights reserved.
1710448Snilay@cs.wisc.edu#
1810448Snilay@cs.wisc.edu# Redistribution and use in source and binary forms, with or without
1910448Snilay@cs.wisc.edu# modification, are permitted provided that the following conditions are
2010448Snilay@cs.wisc.edu# met: redistributions of source code must retain the above copyright
2110448Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer;
2210447Snilay@cs.wisc.edu# redistributions in binary form must reproduce the above copyright
2310447Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer in the
2410447Snilay@cs.wisc.edu# documentation and/or other materials provided with the distribution;
2510447Snilay@cs.wisc.edu# neither the name of the copyright holders nor the names of its
2610447Snilay@cs.wisc.edu# contributors may be used to endorse or promote products derived from
2710447Snilay@cs.wisc.edu# this software without specific prior written permission.
2810447Snilay@cs.wisc.edu#
2910447Snilay@cs.wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3010447Snilay@cs.wisc.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3110447Snilay@cs.wisc.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3210447Snilay@cs.wisc.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3310447Snilay@cs.wisc.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3410447Snilay@cs.wisc.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3510447Snilay@cs.wisc.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3610447Snilay@cs.wisc.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3710447Snilay@cs.wisc.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3810447Snilay@cs.wisc.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3910447Snilay@cs.wisc.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4010447Snilay@cs.wisc.edu#
4110447Snilay@cs.wisc.edu# Authors: Stephen Hines
4210447Snilay@cs.wisc.edu#          Ali Saidi
43
44Import('*')
45
46if env['TARGET_ISA'] == 'arm':
47# Workaround for bug in SCons version > 0.97d20071212
48# Scons bug id: 2006 M5 Bug id: 308 
49    Dir('isa/formats')
50    Source('faults.cc')
51    Source('insts/branch.cc')
52    Source('insts/macromem.cc')
53    Source('insts/mem.cc')
54    Source('insts/misc.cc')
55    Source('insts/pred_inst.cc')
56    Source('insts/static_inst.cc')
57    Source('nativetrace.cc')
58    Source('pagetable.cc')
59    Source('tlb.cc')
60    Source('vtophys.cc')
61    Source('utility.cc')
62
63    SimObject('ArmNativeTrace.py')
64    SimObject('ArmTLB.py')
65
66    TraceFlag('Arm')
67    TraceFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
68    TraceFlag('Predecoder', "Instructions returned by the predecoder")
69    if env['FULL_SYSTEM']:
70        Source('interrupts.cc')
71        Source('stacktrace.cc')
72        Source('system.cc')
73        
74        SimObject('ArmInterrupts.py')
75        SimObject('ArmSystem.py')
76    else:
77        Source('process.cc')
78        Source('linux/linux.cc')
79        Source('linux/process.cc')
80
81    # Add in files generated by the ISA description.
82    isa_desc_files = env.ISADesc('isa/main.isa')
83    # Only non-header files need to be compiled.
84    for f in isa_desc_files:
85        if not f.path.endswith('.hh'):
86            Source(f)
87
88