SConscript revision 12266
112468Sglenn.bergmans@arm.com# -*- mode:python -*- 212468Sglenn.bergmans@arm.com 312468Sglenn.bergmans@arm.com# Copyright (c) 2014 ARM Limited 412468Sglenn.bergmans@arm.com# All rights reserved. 512468Sglenn.bergmans@arm.com# 612468Sglenn.bergmans@arm.com# The license below extends only to copyright in the software and shall 712468Sglenn.bergmans@arm.com# not be construed as granting a license to any other intellectual 812468Sglenn.bergmans@arm.com# property including but not limited to intellectual property relating 912468Sglenn.bergmans@arm.com# to a hardware implementation of the functionality of the software 1012468Sglenn.bergmans@arm.com# licensed hereunder. You may use the software subject to the license 1112468Sglenn.bergmans@arm.com# terms below provided that you ensure that this notice is replicated 1212468Sglenn.bergmans@arm.com# unmodified and in its entirety in all distributions of the software, 1312468Sglenn.bergmans@arm.com# modified or unmodified, in source code or in binary form. 1412468Sglenn.bergmans@arm.com# 1512468Sglenn.bergmans@arm.com# Redistribution and use in source and binary forms, with or without 1612468Sglenn.bergmans@arm.com# modification, are permitted provided that the following conditions are 1712468Sglenn.bergmans@arm.com# met: redistributions of source code must retain the above copyright 1812468Sglenn.bergmans@arm.com# notice, this list of conditions and the following disclaimer; 1912468Sglenn.bergmans@arm.com# redistributions in binary form must reproduce the above copyright 2012468Sglenn.bergmans@arm.com# notice, this list of conditions and the following disclaimer in the 2112468Sglenn.bergmans@arm.com# documentation and/or other materials provided with the distribution; 2212468Sglenn.bergmans@arm.com# neither the name of the copyright holders nor the names of its 2312468Sglenn.bergmans@arm.com# contributors may be used to endorse or promote products derived from 2412468Sglenn.bergmans@arm.com# this software without specific prior written permission. 2512468Sglenn.bergmans@arm.com# 2612468Sglenn.bergmans@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2712468Sglenn.bergmans@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2812468Sglenn.bergmans@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2912468Sglenn.bergmans@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3012468Sglenn.bergmans@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3112468Sglenn.bergmans@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3212468Sglenn.bergmans@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3312468Sglenn.bergmans@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3412468Sglenn.bergmans@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3512468Sglenn.bergmans@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3612468Sglenn.bergmans@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3712468Sglenn.bergmans@arm.com# 3812468Sglenn.bergmans@arm.com# Authors: Andreas Hansson 3912468Sglenn.bergmans@arm.com 4012468Sglenn.bergmans@arm.comimport os 4112468Sglenn.bergmans@arm.com 4212468Sglenn.bergmans@arm.comImport('main') 4312468Sglenn.bergmans@arm.com 4412468Sglenn.bergmans@arm.commain.Prepend(CPPPATH=Dir('./src')) 4512468Sglenn.bergmans@arm.com 4612468Sglenn.bergmans@arm.com# Add the appropriate files for the library 4712468Sglenn.bergmans@arm.comdrampower_files = [] 4812468Sglenn.bergmans@arm.com 4912468Sglenn.bergmans@arm.comdef DRAMPowerFile(filename): 5012468Sglenn.bergmans@arm.com drampower_files.append(File('./src/' + filename)) 5112468Sglenn.bergmans@arm.com 5212468Sglenn.bergmans@arm.comDRAMPowerFile('CommandAnalysis.cc') 5312468Sglenn.bergmans@arm.comDRAMPowerFile('MemArchitectureSpec.cc') 5412468Sglenn.bergmans@arm.comDRAMPowerFile('MemCommand.cc') 5512468Sglenn.bergmans@arm.comDRAMPowerFile('MemPowerSpec.cc') 5612468Sglenn.bergmans@arm.comDRAMPowerFile('MemTimingSpec.cc') 5712468Sglenn.bergmans@arm.comDRAMPowerFile('MemoryPowerModel.cc') 5812468Sglenn.bergmans@arm.comDRAMPowerFile('MemorySpecification.cc') 5912468Sglenn.bergmans@arm.comDRAMPowerFile('Parameter.cc') 6012468Sglenn.bergmans@arm.comDRAMPowerFile('Parametrisable.cc') 6112468Sglenn.bergmans@arm.comDRAMPowerFile('libdrampower/LibDRAMPower.cc') 6212468Sglenn.bergmans@arm.comDRAMPowerFile('CAHelpers.cc') 6312468Sglenn.bergmans@arm.comDRAMPowerFile('CmdHandlers.cc') 6412468Sglenn.bergmans@arm.comDRAMPowerFile('MemBankWiseParams.cc') 6512468Sglenn.bergmans@arm.com 6612468Sglenn.bergmans@arm.commain.Library('drampower', [main.SharedObject(f) for f in drampower_files]) 6712468Sglenn.bergmans@arm.com 6812468Sglenn.bergmans@arm.commain.Append(LIBS=['drampower']) 6912468Sglenn.bergmans@arm.commain.Prepend(LIBPATH=[Dir('.')]) 7012468Sglenn.bergmans@arm.com