Post on 20-Dec-2015
UNIVERSITA’ POLITECNICA DELLE MARCHE, ANCONA (ITALY)
Massimo Conti, Giovanni Vece
TRANSACTION LEVEL POWER ANALYSIS
WITHIN SYSTEMC/TLM APPLICATIONS
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
INTRODUCTORY OVERVIEW
• PKtool (Power Kernel tool) is a power analysis tool developed by Università Politecnica delle Marche.
• Mainly dedicated to power estimations for systems modelled in SystemC/C++ language.
• Entirely realized in SystemC/C++, as a language extension for power analysis.
• Recently refined for transaction level power estimations in application with the SystemC TLM 2.0 framework.
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
MAIN MOTIVATIONS
Power dissipation represents a primary design issue, making it
worthwhile to explore possible SystemC extensions for power
analysis.
Providing an istrument for direct power analysis within
a SystemC-based design, Promoting the diffusion and use of the SystemC language.
basic language
verification library
AMS extension
TLM framework
customized user extensions
SystemC power analysis extension
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
APPLICATION MODALITIES
• PKtool can be applied on the single sc_modules constituting a SystemC
description.
• The simulation results are given by the power/energy estimations of each monitored sc_module, reported in apposite text files.
sc_module #1
sc_module #4
sc_module #3
sc_module #2
SYSTEMC DESCRIPTION
SIMULATION RESULTS
PKTOOL SIMULATOR
POWER ESTIMATION
#1
POWER ESTIMATION
#2
POWER ESTIMATION
#3
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
INSTANCE OF POWER_MODULES
sc_module #1
sc_module #4
sc_module #3
sc_module #2
ORIGINAL SYSTEMC DESCRIPTION
SYSTEMC DESCRIPTION WITH POWER_MODULES
power_module
#1
power_module #4
power_module #3
power_module
#2
POWER_MODULE
INSTANCE
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
• Instance example :
master m1, m2; POWER_MODULE(master) m1,m2;
POWER MODELS IN PKTOOL ENVIRONMENT
• Formal representations of the power dissipated by a digital system (usually an approximation of the real dissipation).
• PKtool handles power models through a behavioural interface of general validity.
• PKtool makes available several power models included inside a default model library.
signal-based power models
table-based power models
operator-based power models
transaction level power models
PKtool model library
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
SYSTEMC DESCRIPTION WITH POWER_MODULES
power_module
#1
power_module #4
power_module #3
power_module
#2
POWER MODEL SELECTION
• Each power_module is associated to power models of the PKtool model library.
• The association task is carried out via an interactive procedure, at the beginning of a simulation.
PKTOOL MODEL LIBRARY
power model
#1
power model
#2
power model
#4
power model
#3
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
PKTOOL SIMULATION FLOW
• A PKtool simulation takes place during an ordinary SystemC simulation of the system.
• The power estimations are referred to the system evolution reproduced in the SystemC simulation.
powerestimation
Start of SystemCsimulation
End of SystemCsimulation
time
PKtool simulation
SystemC simulationmodeldata
powermodel
modeldata
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
EXTENSION FOR TRANSACTION LEVEL POWER ANALYSIS (PKTOOL/TLM)
• The latest PKtool evolution has led to an extension for transaction level power estimations.
• Applicable on system models realized through the TLM 2.0 framework of SystemC language (SystemC/TLM) .
• Conceptually derived from research studies on estimation methodologies at transaction level.
• Analysis modalities fitting the simulation modalities in SystemC/TLM.
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
IMPLEMENTATION APPROACH
• BENEFITS: unified design context, no need of ad hoc execution tools,, . wide chances for interoperability and user enhancements,
C++ language standard
SystemC basic language
SystemC/TLM
Basic PKtool
PKtool/TLM framework
PKtool/TLM is implemented according to a typical SystemC modeling paradigm:
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
MODULE INTERACTIONS IN SYSTEMC/TLM
• Communications based on interface function calls.
• Logical roles: initiator, target, interconnect unit.
• Functional roles: caller, callee.
Initiator TargetInterconnectcomponent
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
TRANSPORT INTERFACES IN SYSTEMC/TLM
Transport Interfaces Functions
tlm_blocking_transport_if b_transport(.)
tlm_fw_nonblocking_transport_if nb_transport_fw(.)
tlm_fw_nonblocking_transport_if nb_transport_bw(.)
tlm_fw_direct_mem_if get_direct_mem_ptr(.)
tlm_fw_direct_mem_if
invalidate_direct_mem_ptr(.)
tlm_transport_dbg_if transport_dbg(.)
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
ESTIMATION APPROACH AT MODULE LEVEL
• An interface function call implies an energy dissipation for the caller and callee
modules.
• The overall energy dissipation of a module can be estimated as the sum of the
energy costs of the related function calls.
CALLERMODULE
CALLEEMODULE
Interface function . call
energy dissipation
energy dissipation
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
ASSOCIATION BETWEEN INTERFACE FUNCTIONS AND
POWER MODELS
b_transport( )
nb_transport_fw( )
nb_transport_bw( )
…
…
SYSTEMC/TLMMODULE
power model
power model
power model
INTERFACE FUNCTIONS
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
POWER MODELS IN PKTOOL/TLM
• PKtool/TLM provides some transaction level power models directly applicable in power estimations.
• Targeted to estimate the energy dissipation of an interface function call.
• Conceptually derived from estimation methodologies at transaction level.
• Application modalities fitting with the simulation dynamics in SystemC/TLM.
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
FORMULAS APPLIED FOR POWER ESTIMATIONS
The overall energy estimation of a monitored module is achieved through the following formulas:
1) basic: Emod =
2) more complete: Emod = +
N = function calls Ei = energy dissipations per function call
Pst = static power dissipation M = idle periods Tj = idle times
ΣN
i =1
Ei
Σi =1
Ei
Σj =1
Pst Tj
M
idle idleactivephase
activephase simulation
time
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
N
CONFIGURATION STEPS FOR PKTOOL/TLM ANALYSIS
• A system module can be configured for PKtool/TLM analysis through the following main steps:
a) definition and istance of a related power_module.
b) selection of the interface functions to be monitored.
c) specification of a power model for each selected functions.
• The steps a) and c) are carried out with the same modalities of a basic PKtool analysis.
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
SELECTION OF INTERFACE FUNCTIONS /1
The selection of an interface function distinguish two possible cases:
1) Functions concerning the module as callee.
POWER_MODULE_CLASS(example_mod) { ... ...
PK_NB_TRANSPORT_FW_2
PK_GET_DIRECT_MEM_PTR_2
}
Select the functions nb_transport_fw(.) and get_direct_mem_ptr(.)
implemented by the module
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
SELECTION OF INTERFACE FUNCTIONS /2
2) Functions concerning the module as caller.
SC_MODULE(example_mod) { ... tlm::tlm_initiator_socket<> init_sock; } POWER_MODULE_CLASS(example_mod) { ... ... PK_NB_TRANSPORT_FW_1(target_sock) }
Select the functions nb_transport_fw(.) called via init_sock
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
ANALYSIS RESULTS /1
• At the end of a PKtool/TLM simulation, the analysis results are reported in distinct text files.
• Each result file is associated to a specific power_module.
• Example:
overall simulation period: [0 - 184467 ps]
POWER/ENERGY DISSIPATION OF IMPLEMENTED TLM FUNCTIONS
function: nb_transport_bw
function calls = 128
energy estimation = 1.53e-005 J
average power estimation = 8.32e-013 W
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
ANALYSIS RESULTS /2 POWER/ENERGY DISSIPATION OF SOCKET TLM FUNCTIONS
SOCKET: initiator_socket
function: b_transport
function calls = 133
energy estimation = 3.43e-005 J
average power estimation = 1.86e-012 W
function: nb_transport_fw
function calls = 128
energy estimation = 2.56e-005 J
average power estimation = 1.38778e-012 W
STATIC DISSIPATION
energy estimation: 1.844e-005J
OVERALL ENERGY ESTIMATION: 9.36e-005J
PKTOOL REFERENCES ON THE WEB
22. European SystemC User’s Group Meeting, September 14th, 2010, Southampton
• PKtool/TLM will be soon distributed as free of charge open source releases
• Downloadable from:
http://www.deit.univpm.it/PKtool
• Included in the release PKtool 2.2 beta-8