110428Sandreas.hansson@arm.com# -*- mode:python -*- 210428Sandreas.hansson@arm.com 310428Sandreas.hansson@arm.com# Copyright (c) 2014 ARM Limited 410428Sandreas.hansson@arm.com# All rights reserved. 510428Sandreas.hansson@arm.com# 610428Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 710428Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 810428Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 910428Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 1010428Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 1110428Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 1210428Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 1310428Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 1410428Sandreas.hansson@arm.com# 1510428Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 1610428Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 1710428Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright 1810428Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer; 1910428Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright 2010428Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the 2110428Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution; 2210428Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its 2310428Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from 2410428Sandreas.hansson@arm.com# this software without specific prior written permission. 2510428Sandreas.hansson@arm.com# 2610428Sandreas.hansson@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2710428Sandreas.hansson@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2810428Sandreas.hansson@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2910428Sandreas.hansson@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3010428Sandreas.hansson@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3110428Sandreas.hansson@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3210428Sandreas.hansson@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3310428Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3410428Sandreas.hansson@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3510428Sandreas.hansson@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3610428Sandreas.hansson@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3710428Sandreas.hansson@arm.com# 3810428Sandreas.hansson@arm.com# Authors: Andreas Hansson 3910428Sandreas.hansson@arm.com 4010428Sandreas.hansson@arm.comimport os 4110428Sandreas.hansson@arm.com 4210428Sandreas.hansson@arm.comImport('main') 4310428Sandreas.hansson@arm.com 4410428Sandreas.hansson@arm.commain.Prepend(CPPPATH=Dir('./src')) 4510428Sandreas.hansson@arm.com 4610428Sandreas.hansson@arm.com# Add the appropriate files for the library 4710428Sandreas.hansson@arm.comdrampower_files = [] 4810428Sandreas.hansson@arm.com 4910428Sandreas.hansson@arm.comdef DRAMPowerFile(filename): 5010428Sandreas.hansson@arm.com drampower_files.append(File('./src/' + filename)) 5110428Sandreas.hansson@arm.com 5210428Sandreas.hansson@arm.comDRAMPowerFile('CommandAnalysis.cc') 5310428Sandreas.hansson@arm.comDRAMPowerFile('MemArchitectureSpec.cc') 5410428Sandreas.hansson@arm.comDRAMPowerFile('MemCommand.cc') 5510428Sandreas.hansson@arm.comDRAMPowerFile('MemPowerSpec.cc') 5610428Sandreas.hansson@arm.comDRAMPowerFile('MemTimingSpec.cc') 5710428Sandreas.hansson@arm.comDRAMPowerFile('MemoryPowerModel.cc') 5810428Sandreas.hansson@arm.comDRAMPowerFile('MemorySpecification.cc') 5910428Sandreas.hansson@arm.comDRAMPowerFile('Parameter.cc') 6010428Sandreas.hansson@arm.comDRAMPowerFile('Parametrisable.cc') 6110428Sandreas.hansson@arm.comDRAMPowerFile('libdrampower/LibDRAMPower.cc') 6212266Sradhika.jagtap@arm.comDRAMPowerFile('CAHelpers.cc') 6312266Sradhika.jagtap@arm.comDRAMPowerFile('CmdHandlers.cc') 6412266Sradhika.jagtap@arm.comDRAMPowerFile('MemBankWiseParams.cc') 6510428Sandreas.hansson@arm.com 6610428Sandreas.hansson@arm.commain.Library('drampower', [main.SharedObject(f) for f in drampower_files]) 6710428Sandreas.hansson@arm.com 6810428Sandreas.hansson@arm.commain.Append(LIBS=['drampower']) 6910428Sandreas.hansson@arm.commain.Prepend(LIBPATH=[Dir('.')]) 70