Writing Efficient TLM 2.

0 Models with GreenSocs
GreenSocs Tutorial 2008
Event Sponsors:

1
May 6, 05

Enabling the Open SystemC User Community

Agenda
1.GreenSocs overview 2.GSPM 3.GreenBus 4.GreenControl 5.GreenConfig Techno Zone 6.GreenAV 7.GreenScript 8.VPP/Eclipse 9.Component library 10.Meta Description 11.Eco-System - mission and future. 12.GreenInterfaces
Enabling the Open SystemC User Community

Slides will be Available from GreenSocs.com

2
May 6, 05

What is ESL anyway?
• ESL is a design flow to allowing Software development to start earlier in the design cycle.
• Possibly even putting the horse back in front of the cart - and allowing hardware to be tuned for software needs!

SystemC is the standard language to use to exchange models that enable early S/W development. Infrastructure is the common code which in itself is not core to any company that every company can use to increase their productivity and help them benefit from a common eco-system. TLM 2.0 is a standard infrastructure extension to SystemC specifically aimed at memory mapped bus interfaces, but with re-usable technology for other interfaces. (If you thought we were going to talk about strangely coloured clothing accessories - time to leave now!)
Enabling the Open SystemC User Community


3
May 6, 05

GreenSocs : Crossroads for ESL…
Non- core Infrastructure F/OSS to improve productivity. Enabling ESL interoperability

SPECIFIC IP interfaces Quick Simple Industry ready ESL package management Generic Library Components

4
May 6, 05

Enabling the Open SystemC User Community

Two faces of GreenSocs
• • GreenSocs is an open source Project It provides vendor independent infrastructure for ESL modelling.
• Specifically SystemC infrastructure, including model components.

• •

GreenSocs Ltd is a contracting company. It provides resources that can be used to Develop new infrastructure.
• GreenSocs can also help:
• Make use of GreenSocs infrastructure for proprietary projects. • Assist other organisations develop their SystemC infrastructure (based on GreenSocs infrastructure) • Provide training, support and maintenance.

There is a web site, and a community based around that project with some 500 people registered. Contributions into the project have come from both academia and industry.

5
May 6, 05

Enabling the Open SystemC User Community

Business model
• GreenSocs Ltd can be contracted as a sub-contractor to
• Construct items that will be made available through the GreenSocs project. • Assist other standards organisations construct their infrastructure (possibly based on infrastructure available from the GreenSocs Project) • Train, support and maintain SystemC infrastructure within companies. • Undertake specific preparatory SystemC modelling (outsourcing model provisioning - possibly based on infrastructure available from the GreenSocs project)

GreenSocs is “just” a SystemC contractor that bases is activity around the GreenSocs project.

6
May 6, 05

Enabling the Open SystemC User Community

Ethos : Serve the community
• • • • Providing a legal framework in which competing industrial partners can collaborate on infrastructure for the benefit of all. Developing infrastructure that can enable re-use and interoperability. Enabling academic research to be based on relevant infrastructure. providing a stream of talent.

7
May 6, 05

Enabling the Open SystemC User Community

8
May 6, 05

Enabling the Open SystemC User Community

GSPM

9
May 6, 05

Enabling the Open SystemC User Community

GSPM Features
• • • • • • “Package management” for ESL Distribute and/or handle multiple (and many versions of) IP’s and tools Very simple user interface (gs_use) Installable by USER Handle all dependencies between packages,
• • • • automatically install required dependencies Including dependencies Multiple versions may be present at the same time Different “shells” may use different version

Handle multiple versions or each package

• • • •
10
May 6, 05

Source distributions are supported Can be used in conjunction with existing tool chains. Can be used independently of GreenSocs - You may use GSPM internally (or externally) to distribute your releases.
• Run your own repository (open or closed, with strict password protection) Enabling the Open SystemC User Community

(To come - VMWare distributions)

Examples Available from the GreenSocs repository
• • Supported Architectures: i386, x86_64, (not yet stable: Cygwin, Mac OS X (ppc and i386)) Packages:
• • • • • • • • • • • • • • • • • • • • apt_0.5.28.6-gs3_i386.deb archc2.0+beta3-gcc4.0.3-systemc2.2-gs1_i386.deb cdt_3.1.0-gs3_i386.deb dpkg_1.10.28-gs1_i386.deb dust1.0-gcc4.0.3-systemc2.2_1.0-gcc4.0.3-systemc2.2-gs2_i386.deb eclipse_3.2-gs2_i386.deb gcc4.0.3_4.0.3_i386.deb jre_1.5.0-gs2_i386.deb libboost-dev_1.33.1-4_i386.deb modules_3.2.3-gs2_i386.deb pdesigner_1.0.2-gs2_i386.deb pdlibrary_1.0.1-gs1_i386.deb scv1.0p2-gcc3.3.1-systemc2.1-gs2_i386.deb scv1.0p2-gcc3.3.1-systemc2.2-gs2_i386.deb scv1.0p2-gcc4.0.3-systemc2.1-gs2_i386.deb scv1.0p2-gcc4.0.3-systemc2.2-gs2_i386.deb systemc2.1-gcc3.3.1-gs2_i386.deb systemc2.1-gcc4.0.3-gs2_i386.deb systemc2.2-gcc3.3.1-gs2_i386.deb systemc2.2-gcc4.0.3-gs2_i386.deb

11
May 6, 05

Enabling the Open SystemC User Community

Using GSPM
• • • • GSPM uses bash (no choice for now) - make sure you are running bash. Visit: http://www.greensocs.com/Downloads 3 step install. NB- sort out your proxies
export http_proxy="http://username:password@host:port/"

Then:
source gspm.bashrc # enter the world gs-use gcc/4.0 systemc/2.2 boost gsc greenbus # load packages cd $GREENBUS/examples/simple gsc example_simple.cpp -o example.x ./example.x

• •
12
May 6, 05

Visit project pages on greensocs.com to find new packages to download, For a full list: http://www.greensocs.com/Releases
Enabling the Open SystemC User Community

Green*

13
May 6, 05

Enabling the Open SystemC User Community

Green* overview
GreenScript
(Python)

Config PlugIn
Config User I/F

User IP 1

GreenControl Core

GreenBus I/F

(Parameter Config)

ESL Tools

GreenAV User I/F

GreenAV PlugIn
(Analysis & Visualization)

User IP 2
Config User I/F

GreenBus I/F

Config User I/F

Specific PlugIn

User IP 3
Specific User I/F

GreenBus I/F

SystemC
14
May 6, 05

Enabling the Open SystemC User Community

GreenBus
Gr

ock et een S

15
May 6, 05

Enabling the Open SystemC User Community

GreenBus stops at TLM 2.0!

16
May 6, 05

Enabling the Open SystemC User Community

TLM model anatomy
Protocol specific Convenience User Model of Master Socket Protocol specific OSCI TLM-2.0 Convenience Socket Interface User Model of Slave

Call nb_transport() Or B_transport Depending on your need For handling pipelining accuracy.

} {
Convenience sockets should have: Memory management, Configuration, Conversion from B to NB And be built on the OSCI Convenience sockets.

Implement Nb_transport() Or B_transport() Depending on your need to call wait(), and how much of the pipeline you model.

17
May 6, 05

Enabling the Open SystemC User Community

TLM model anatomy
•GreenSocs will provide Convenience sockets that are extensions of the OSCI socket, providing additional services (as the GreenBus socket did) •GreenSocs is currently developing protocol specific socket for OCP-IP (among others)
Call nb_transport() Or B_transport Depending on your need For handling pipelining accuracy. Implement Nb_transport() Or B_transport() Depending on your need to call wait(), and how much of the pipeline you model.

} {

GreenSocs sockets will be Consistent. They will provide full services based on other Green* components, and will make use of the Interface Repository (see later) GreenSocs is the obvious place to get a protocol convenience socket developed and published.

18
May 6, 05

Enabling the Open SystemC User Community

GreenSocket
• GreenSocket will inherit from the TLM 2.0 Convince sockets and provide the following features:
• • • • • • • • • • • Full tool independent TLM 2.0 compatibility. Security (access functions to the payload) Memory management (memory pooling, ref-counting) Simple Time management (PEQ) Local data (local "state" for each transaction) Runtime Bindability and error reporting (run time "probing" of connected compatible - sockets) Configuration and configuration sharing (GreenConfig, + distributing config options along the bus) Combinatorial time management (ensuring combinatorial paths are handled "safely") Analysis (GreenAnalysis connection direct from a GreenSocket). Multi-porting (* provided by the OSCI socket) b_ <-> nb_ bridging (* provided by the OSCI socket) • 19
May 6, 05

First release shortly after DAC…

Enabling the Open SystemC User Community

GreenSocs Three Phase Protocol
• • Based on GreenBus, Compatible with TLM-2.0 Accurately model real protocols, including their bursting mechanisms :
• AXI, PLB, PCIe, and OCP-IP (Only some configurations, and can only be made available to other OCP-IP members).
Send request Receive Acknowledge Send Data Receive Acknowledge Send Response Receive Acknowledge
Request Phase Start Request Phase End Data Phase Start Data Phase End Response Phase Start Response Phase End

time

20
May 6, 05

Enabling the Open SystemC User Community

GreenBus was, TLM 2.0 is…
• • • • • • Flexible toolkit for the implementation of any interface. Core mechanisms adopted by OSCI for TLM 2.0d2. Used for all interfaces (model model, and model tool) Inter-operability
• • • Simple API between models, Defined Data structures Automatic memory management for data structures Event semantics between models.

Safety Speed
• Data passed by Shared pointers • Only required events used • Model free to use methods (rather than wait() calls) Other features of GreenBus:
• • • • • Open Source Built for/on proposed TLM 2.0 standard Efficient (0.5 million atoms per second) Multiple abstraction levels Native support for other user API’s (OCP-IP etc)


21
May 6, 05

Generator from IPXACT available
Enabling the Open SystemC User Community

Gamma Correction Block Diagram

1 year? 1 Month? 1 Week? …?

22
May 6, 05

Enabling the Open SystemC User Community

1 hour…
#include <ImageMagick.h> // my nb_transport for the Gamma port MyGamma(tlm_generic_payload &t, sc_time &time) { image* i = reinterpret_cast<image*>(t.get_data_ptr()); i.gamma(reg.red, reg.green, reg.blue); time+=4; return TLM_COMPLETED } SC_MODULE(myImageProcessor) { GB_GenericTargetPort myGammaPort(MyGamma) GB_GenericTargetPort myOtherPorts…(…); … }

23
May 6, 05

Enabling the Open SystemC User Community

Know your users….
Data Abstraction Level “unit” of data of interest

What are they interested in? Model that! LEAVE OUT THE DETAIL…

Event Ordered (UT) Transaction Accurate (LT) Bus Accurate (AT) Cycle Accurate

Transaction Request/Response Bus phases cycles

24
May 6, 05

Enabling the Open SystemC User Community

Choose your timing….

Initiator calls Ordered or Transaction Accurate Bus Accurate or Cycle Accurate

Target returns

b_transport

TLM_COMPLETED

nb_transport

TLM_ACCEPTED

25
May 6, 05

Enabling the Open SystemC User Community

Know your technology…
Presentations about TLM 2.0 technology coming to a EDA show near you….
Blocking void b_transport(transaction &,time)

GET some training…

Non-blocking status nb_transport_fw(transaction &, Phase, time) Receive “events” (using nb_transport_bw again)

Target

Initiator

NB, the transaction itself stays the same, no matter which function call is used, the non-blocking calls just add phase.
26
May 6, 05

Enabling the Open SystemC User Community

Choice for Targets…
• • Write your model to be either more or less timing accurate Use the nb_ interface to do this as documented by TLM 2.0.

DON’T WRITE THIS Get your bus/socket provider or GreenSocs to do it!

nb_transport(…) { • If you need to “synchronise” use the return status of the call Return TLM_COMPLETED or

Your bus/socket provider may provide you with an interface more appropriate for the bus in question…

Return TLM_ACCEPTED }

27
May 6, 05

Enabling the Open SystemC User Community

Choice for Initiators…
• • Write your model to be either more or less timing accurate Use the “blocking” or “non-blocking” interface to do this as documented by TLM 2.0.
DON’T WRITE THIS get your bus/socket provider or GreenSocs to do it… make sure is supports memory management etc

b_transport(transaction) or nb_transport…

Your bus/socket provider may provide you a bus specific API…

28
May 6, 05

Enabling the Open SystemC User Community

My protocol isn’t like the BP…
ARE YOU SURE???
Overview….
BP Data
BP Timing phases

“non-Ignorable extensions? “Ignorable extensions?

Extensions Extensions Extensions Extensions Extensions

Additional Phases

MY PROTOCOL

29
May 6, 05

Enabling the Open SystemC User Community

Rolling your own Protocol?
• • Things to remember: Think about extensions - Do you need them? If so, get them right!
• Data extensions for data, Phase extensions for timing.

• • •

Use the GreenSocs sockets and add to them Use already published data and timing extensions wherever you can! Make your life as esy as possible!

30
May 6, 05

Enabling the Open SystemC User Community

Ignorable extensions and all that….
• • • An extension must be important to somebody !!! If it does not effect a block, it is “ignorable” for that block. Re-use IP when all extensions are “ignorable” for that block.
• • YOU HAVE TO DECIDE -- sorry. YOU HAVE TO DOCUMENT -- sorry.

Please make use of GreenSocs to publish your extensions, and to find extensions other people are suggesting - if the semantics match, use them.
RULE: Try to think how the semantics of your protocol match the semantics of the BP. DON’T add an extension because the name is different, or the encoding doesn’t match!

• •

Look for a semantic match Don’t re-invent the wheel
31
May 6, 05

Enabling the Open SystemC User Community

GP Timing Extensions…
• • These can be ignorable ! Phases just add timing detail to your model.
• Indicating an e.g. “split possible” phase to a standard TLM 2.0 GP model will have no functional effect. • If an arbiter knows about the split phase, it can show more of the timing effects - it can add fidelity to the model.

RULE: Always use phases when the semantic is about timing (ie speed of transmission - something like burst)

32
May 6, 05

Enabling the Open SystemC User Community

GreenControl

33
May 6, 05

Enabling the Open SystemC User Community

GreenControl Framework
• Used for
• • • Configuration Analysis Control.

Tool independent (Plug-ins available for vendor tools) Supports multiple configuration parsers, e.g. Spirit IPXACT, LUA, command line, etc. Supports:
• • • • Dynamic config parameter change Dynamic Parameter arrays Parameter change notification call-backs Etc,etc….

34
May 6, 05

Enabling the Open SystemC User Community

GreenConfig
Part of GreenControl

35
May 6, 05

Enabling the Open SystemC User Community

Using GreenControl
• Download and install:
gs_use greencontrol

User code in SystemC models:
#include "greencontrol/api/gs_param/gs_param.h". … class MyClass: public sc_module { public: (or private:) gs_param < unsigned int > my_param ; public: MyClass(sc_module_name name) : sc_module (name), port("PortName"), my_param ("my_param", 100) // gs_param with initial value { [...] } };


36
May 6, 05

Types of parameters: C (POD) and SystemC and user defined
Enabling the Open SystemC User Community

Using arrays
• Simple arrays (an array as a parameter)
Optional, 10 by default (auto-resized when set by config file)

gs_param <int *> my_int_array("my_int_array” ,3) ; … Access via my_int_array[3]…

“complex” arrays (hierarchical arrays of named parameters)
gs_param_array myTopArr ; gs_param<int> *myMemberPar = new gs_param<int> ("myMemberPar", "10", &myTopArr); gs_param_array *subArr0 = new gs_param_array ("myArray0", &myTopArr);

“iterators” for arrays
gs_param_array::iterator it; for (it = myArr.begin(); it != myArr.end(); ++it) { cout << (*it).getName() << "=" << (* it).getString() << endl; }

37
May 6, 05

Enabling the Open SystemC User Community

Finding parameters
• To find a parameter, registered with the GreenControl, from a different place in the hierarchy, use:
gs_param_base *int_par = m_configAPI.getPar("Owner.int_param");

This will allow call back registration, analysis registration etc.

38
May 6, 05

Enabling the Open SystemC User Community

gs_param callbacks
Syntax:
SC_MODULE(ObserverModule){ GC_HAS_CALLBACKS(); ~ObserverModule() { GC_UNREGISTER_CALLBACKS(); } void main_action() {// Test param gs_param<int> myparam("myparam"); // Register Callback simple GC_REGISTER_PARAM_CALLBACK(&my_param, ObserverModule, config_callback); } // Callback function with default signature. void config_callback(gs_param_base& par) {...} };

• •
39
May 6, 05

Mostly used behind the scenes for GreenAV and GreenConfig. gs_params with no call back cost 1 ‘if’ (highly predictable) for writes.
Enabling the Open SystemC User Community

Tool independent config fabric.
• • • Uses gs_params Maybe set via configuration plugins Plugins exist for SCML (CoWare), Lua, a simple config file reader, a simple config command line argument reader and a simple interactive tool during simulation. gs_params may be set during runtime, if the tool supports that. Arrays, variable sized arrays, etc are supported (to support Lua). Full user manual and tutorial available.

• •

40
May 6, 05

Enabling the Open SystemC User Community

Using Lua
• • Lua is a scripting language which is ideally suited to describing configurations. It has the full range of flow-control, and is dynamically typed.

Lua code is very simple:
TestIP = {param1 = 132,param2 = 234,}


41
May 6, 05

Visit http://www.lua.org/ for more information.
Enabling the Open SystemC User Community

Full config example
#include <systemc.h> #include "greencontrol/all.h"    // complete GreenControl package

int sc_main(int argc, char *argv[]) {  tlm::gc::GC_Core core("ControlCore");  // GreenControl Core instance  tlm::gc::config::ConfigDatabase *db = new gc::config::ConfigDatabase("ConfigDatabase");   tlm::gc::config::ConfigPlugin configPlugin("ConfigPlugin", db);   // Configuration with GreenConfig config files  tlm::gc::config::ConfigFile_Tool configTool("ConfigFileTool");   configTool.parseCommandLine(argc, argv); // parses the command line for --configfile   configTool.config("my_config.cfg");   // reads in a config file   // Configuration with Lua config files  tlm::gc::config::LuaFile_Tool luaTool("LuaFileTool");  luaTool.parseCommandLine(argc, argv); // parses the command line for --luafile  luaTool.config("my_config.lua");   // reads in a lua config file   // Instantiate and bind SystemC modules... }

42
May 6, 05

Enabling the Open SystemC User Community

GreenAV
Part of GreenControl

43
May 6, 05

Enabling the Open SystemC User Community

Green Analysis and Visualisation
• • • • Fabric for analysis and visualisation. Built on gs_params Allows all I/O to be “channelled” Basic concept is that output is always a result of changes to a parameter (even if that parameter is a string, getting a new string value). Highly flexible way of controlling what data to extract, and when (e.g. trigger conditions and calculators) Output plugins for STDOUT, File, SCV and CSV, etc etc…

44
May 6, 05

Enabling the Open SystemC User Community

Using GreenAV
• In order to register and use GreenAV output plugins:
// Parameters to output (local one or get out of hierarchy) gs_param_base *uint_par = m_configAPI.getPar("Owner.uint_param"); gs_param_base *str_par = m_configAPI.getPar("Owner.str_param"); gs_param<unsigned int> *int_par = new gs_param<int>("int_par"); // Use default output plugins m_analysisAPI.add_to_default_output(FILE_OUTPUT_PLUGIN, *int_par); m_analysisAPI.add_to_default_output(FILE_OUTPUT_PLUGIN, *str_par); m_analysisAPI.add_to_default_output(SCV_OUTPUT_PLUGIN, *int_par); // Create additional output plugins OutputPlugin_if* fileOP = m_analysisAPI.create_OutputPlugin( FILE_OUTPUT_PLUGIN, "secondFile.log"); m_analysisAPI.add_to_output(fileOP, *str_par); m_analysisAPI.add_to_output(fileOP, *int_par);

This code can be in sc_main

45
May 6, 05

Enabling the Open SystemC User Community

GreenAV Calculators and Triggers
• Process data before extracting it to output: Statistics object (StatCalc) consists of a trigger and a calculator The Calculator allows building a formula with gs_params
• Usual operators supported • User may add own operators (e.g. in sc_main)

The Trigger activates a re-calculation of the formula
• Can trigger on several activation events:
• on each calculator‘s input parameter change (default) • on an sc_event • on an repeated time sample interval (sc_time)

• Trigger can be guarded by a bool condition (gs_param<bool>)


46
May 6, 05

The result (gs_param) can be outputted by the user.
Enabling the Open SystemC User Community

GreenAV Calculators and Triggers
• Calculator
Calculator<double> c(“c"); // most flexible notation: c.calc("+", par1, c.calc("-", par2, par3)); // = par1 + (par2 - par3) // more convenient notation (available for +,-,*,/ using gs_param_bases): c(par1_base + c(par2_base - par3_base)); // = par1 + (par2 - par3)

Trigger
// sc_event trigger sc_event trigger_ev; Trigger t(trigger_ev); // trigger with condition guard gs_param<bool> condition("cond"); Trigger t(condition);

Combine to StatCalc
// Statistics Calculator with default trigger StatCalc<double> stc("StatCalc", &c); // Statistics Calculator with special trigger StatCalc<double> stc2("StatCalcTr", &t, &c);

47
May 6, 05

Enabling the Open SystemC User Community

GreenScript

48
May 6, 05

Enabling the Open SystemC User Community

GreenScript
• • • • • • “System Python”, ability to run SystemC style code from within Python. Mixed simulations of Python scripting code and SystemC models. SystemC services such as events made available to script Rapid prototyping. Rapid test bench generation Full availability of GreenControl parameters within scripting environment. Interfaces language neutral, e.g. Tcl, Perl, etc. (SWIG)

49
May 6, 05

Enabling the Open SystemC User Community

Using GreenScript: simple adder
Python import gs class adder: def doit(self):    A = gs.sc_signal("A")    B = gs.sc_signal("B")    C = gs.sc_signal("C")    while True:     gs.wait(A.write_event() | B.write_event())      C.write(A.read() + B.read()) def __init__(self):    gs.spawn(self.doit) // declare named signals, // to be used in the module sc_signal A("A"); sc_signal B("B"); sc_signal C("C"); GreenScriptModule gs_module("name"); gs_module.load("adder.py"); SystemC

NOTE: Signals facilitate the communication between script and SystemC

50
May 6, 05

Enabling the Open SystemC User Community

Eclipse VPP
An Eclipse project run by GreenSocs

51
May 6, 05

Enabling the Open SystemC User Community

Eclipse?
• • • • • A toolkit for constructing tools user interfaces. Based on Java (platform independent) Huge user community Large industrial support Widely used for ESL tools

The Eclipse logo is the trademarks of Eclipse Foundation, Inc.

52
May 6, 05

Enabling the Open SystemC User Community

Eclipse for ESL
IP Component development

Support for Model Construction i.e. with SystemC, UML… Support for Model Integration i.e. with IPXACT Support for Model Use i.e all user interactions

IP Component assembly

User “platform” Tool. User interaction

We need it all: We need the ability to plug-n-play different tools/models at different places in the flow…
53
May 6, 05

Enabling the Open SystemC User Community

Purpose of VPP
• • “What ESL needs in Eclipse” To enable the construction of virtual platform prototypes with a heterogeneous set of both models and tools Another way of putting this:

• For each interface that can support user interaction, provide an exemplar GUI component for Eclipse, and the infrastructure necessary to connect to it from the ESL world e.g. SystemC.
Nb, some of these interfaces are B2B - I.e. IPXACT, and SystemC.

• • •
54
May 6, 05

2 current focal points: Immediate prioritization and co-ordination of Eclipse bug fixes, and review of how to best support and use ESL languages inside Eclipse (I.e. IPXACT) Exemplar plugins and additions to Eclipse to support ESL languages and environments (I.e. SystemC, IPXACT, etc)
Enabling the Open SystemC User Community

VPP “Vision”
• • Complete tools made from combinations of components Interfaces between components must be agreed.
• E.g. simulation services (start stop) - etc.

Complete tool
Model UI component

Tool Component

55
May 6, 05

Enabling the Open SystemC User Community

Proposed IPXACT server
• • Focus - enabling IPXACT use within Debug. This is a proposed project, get in touch if your interested:
IPXACT editor Eclipse EDA tool EDA tool

EDA tool

IPXACT Server

TGI - Sprint standard Interface IPXACT files

56
May 6, 05

Enabling the Open SystemC User Community

Current GreenSocs Eclipse
• SystemC-specific features and extensions include:
• • • • • • • • Project management Configuration Visualization Model execution Inherited CDT functionality Syntax highlighting Module tree viewer Structural representation

57
May 6, 05

Enabling the Open SystemC User Community

Component Library

58
May 6, 05

Enabling the Open SystemC User Community

Component library - Exemplar IP
• • • • • • Not all IP is valuable. Not all IP is monolithic. GreenSocs holds a store of common parts, and sub parts. All parts make use of GreenSocs infrastructure. Existing parts include Graphics components, UARTs etc. NB The UART model has just been updated by CircuitSutra one part of the Eco-System….

59
May 6, 05

Enabling the Open SystemC User Community

Software services to semiconductor industry
SystemC Modeling Services Existing Expertise with TLM 2.0 d2, Greenbus and hence TLM2.0
•Modeling of complete SoC and individual IP blocks at various abstraction levels •Virtual platform creation for embedded software development •Virtual platform creation for architectural exploration •Creation of reference models for RTL verification •Verification of SystemC Models •Creation of instruction set simulator (ISS) model of processors

Outsourced EDA Tool development Embedded semiconductor software

Meta Description for Silicon Based Functionality
This years Project…

61
May 6, 05

Enabling the Open SystemC User Community

Parts of a SystemC model
Protocol State Machine Registers
Address Maps

User Model

Standard Bus Interface

lt

at

Registers with functional side effects

And in reverse too!

62
May 6, 05

Enabling the Open SystemC User Community

Parts of a SystemC model
Protocol State Machine Registers Registers defined In IPXACT
Address Maps

User Model
Should more of this be Generated too?

Protocol should be defined in IPXACT Standard Bus Interface

How should this connection work in IPXACT?

OSCI TLM 2.0

lt

at User codes using Green* kit in SystemC

SystemC typedefs Provided by GreenSocs

Generator uses Green* kit and SystemC typedefs

Generator targets Green* kit for SystemC Registers with functional side effects

And in reverse too! Generated “Convenience” Socket Generated “user” Code Users model

63
May 6, 05

Enabling the Open SystemC User Community

DRF - Device Register Framework
Work In Progress
• • • • GreenSocs will be amalgamating a Device Register framework with the existing Green* kit DRF was initially written by Jason Patrick Useful for describing Registers, Devices, State machines, etc. Will be Integrated with Green* (state variables will use gs_params etc, etc, etc…) Is DRF the “whole story”?

64
May 6, 05

Enabling the Open SystemC User Community

Meta Description for SbF
• • IPXACT will describe structural and definitional parts of a System. IPXACT could describe the structure and definitional parts of a silicon based function component (whether that component was built from software, hardware, or a combination) BUT - IPXACT is not great at describing semantics…. What should be used to capture those semantics? Some initial thoughts:
1. We must work to improve IPXACTS utility for SbF. 2. We must provide a convenient simulation language in SystemC for SbF (hence DRF). 3. We probably need to do other things as well

BOF?
65
May 6, 05

(all meanings!)

Enabling the Open SystemC User Community

Eco System

66
May 6, 05

Enabling the Open SystemC User Community

Adopting ESL - “use the force”
• Need Interfaces
• • Common methodology Common deliverables
Entrenched Existing IP Ground up “perfect” solutions

Requires : • Clear PROCESS • SUPPORT • •
67
May 6, 05

Build migration plans Require assistance to align business processes
Enabling the Open SystemC User Community

The pillars of successful ESL
Infrastructure, Interfaces Libraries of IP

Tools
Successful ESL Methodology Requires these 3 things + Underlying understanding training, and deployment The GreenSocs partnership includes the experts in ESL deployment. - use the Force
68
May 6, 05

Enabling the Open SystemC User Community

ESL/TLM 2.0 Experience for Hire
 Xtreme ESL Worldwide
• Adoption Planning • Methodology & Flow • Schedule Acceleration • Mentors/Quick Ramp (best value) • Training • Turnkey SystemC/TLM 2 Modeling  History • Consultancy focused on ESL • Founded 2003 • Work with OSCI (e.g. TLM 2 • Wrote book, “SystemC: From the Ground Up”  Contact • Email: info@eslx.com • Phone: 888-467-4609 • Web: http://www.ESLX.com
©2008 ESLX, Inc.

ESLX

69

Eco-System underlying commonality
In order for different businesses, (models, tools, s/w, h/w) OR different parts of the same business to work together - requires
Library developmen t Tools

Algorithm/sw

System development

Training

Common infrastructure.
Flows

70
May 6, 05

Enabling the Open SystemC User Community

Eco system - MISSION
• • • • • • Building the ESL Eco-System is GreenSocs main mission. Proving open source infrastructure enables the Eco system. Universities are enabled to better focus on relevant topics Companies need not expend engineering effort on zero-value add activities Commonality and interoperability is enhanced. The GreenSocs partnership includes those sponsoring this meeting: • CoFluent Design - providing advanced architectural exploration tools • CircuitSutra - partners in IP creation • ESLX - The experts in ESL deployment • Virtutech - High speed platforms for software engineering
Also… GreenSocs chairs the OCP-IP SLD WG, are active members of the OSCI TLM WG, members of SPIRIT, and are becoming involved in Power.org and MIPI. Enabling the Open SystemC User Community

71
May 6, 05

ESL Deployment Chain
IP Component development

IP Component assembly

User “platform” Tool. User interaction

72
May 6, 05

Enabling the Open SystemC User Community

Heterogeneous environments
simulations are mixed. Different tools have different specialities Users want to make best use of each SystemC is “glue” - it is C++ it links nicely with other tools BUT - so many interfaces this makes it harder to integrate models

Now - Today, And its getting MORE common

With COMMON INFRASTRUCTRE It Works!
73
May 6, 05

Enabling the Open SystemC User Community

CoFluent Studio

www.cofluentdesign.com
Timed-Behavioral Modeling Platform Architecting

 HW/SW ESL modeling & simulation
• Input = graphics + ANSI C/C++ • Output = TLM SystemC code (TL3)

 Easy characterization of new features & subsystems and integration of existing ones  Architecture exploration & performance prediction
• Loads, power, memory, cost

Mapping

 Continuous validation of use cases and designs     Enabling innovation Optimizing architectures Delivering executable specifications Optimizing design supply chain

Architecture Exploration

Behavioral use case + application model with time Generic HW performance models No hardware IPs needed No embedded software needed No ISS
74

6/16/08

Copyright © CoFluent Design - CONFIDENTIAL

SystemC and CoFluent Studio
• • Architectural Exploration tool, based on SystemC for execution is very easily integrated with other SystemC models. The wrapper that has been used will work well for TLM 2.0 models, meaning CoFluent s tool suit will be able to facilitate the exploration of systems including fixed IP blocks. CoFluent graphical abstraction also facilitates the description (behavioural model with time) of new IP blocks to be integrated to virtual platform/prototyping environment.

Graphical and Textural Language used for design and architectural exploration

75
May 6, 05

Enabling the Open SystemC User Community

Simics value point
IP Component development

IP Component assembly

User “platform” Tool. User interaction

76
May 6, 05

Enabling the Open SystemC User Community

Simics Architecture
User program User program Target operating system Target hardware drivers
Inspection Control Features

Middleware
GUI Scripting Built-in Debugger

Target boot code

Target ISA decoder

Memory Memory

JIT Interpreter VMP Compiler

Devices Devices Devices

Devices Networks Devices
and IO

Processor Processors

Target Machine(s) Configuration management Core Services API Event queue and time Multithreading and scaling

External world connections

Simics Core Simics

DML, C, C++, Python, Simics script, SystemC

Device model

Network model

CPU

SoC

Intercon nect

Intercon Config scripts nect

Ethernet Serial Keyboard Mouse Ext. Debuggers ...

Model library

SystemC and Simics

simics devices Optionally advance time Event queue, and simulation kernel wheel

Forward calls to SystemC model

systemC TLM device model

Spy on SystemC events Allow SystemC kernel to advance when events are ready to process

TLM model may post SystemC events and use SystemC API

OSCI SystemC kernel SystemC world

Bridge Simics kernel

Single Thread
BUT - the interface was hard…..

78
May 6, 05

Enabling the Open SystemC User Community

GreenSocs Interface Repository

79
May 6, 05

Enabling the Open SystemC User Community

Interoperability needs ALL interfaces
Simulator kernel and services Simulation models

External apps

a1

[D]

[C]

m1
[B]

[A]

m2

S1

Hardware models

m3
[E]

a2

Non-Hardware models

A – Model to model. Hardware oriented channel. B – Model to model. Non-hardware oriented channel. C – Model to service. D – External application to service. E – External application to model. 80
May 6, 05

Enabling the Open SystemC User Community

Under the Hood (Simplified)
xxx auart auart iomux usbotg sahara Serial_port Serial_port xxxx asiminterface xxx fiodev xgpio xxx xdog xgpio xxx l2cache arm xpit xpit xxx xxx xxx xint xgpt xrtr xitc xspi xspi xtimer keypad xhandset xxx xspi xxx fiodev xdog xuart xuart xkypd xxx xxx xxx xxx pinlogic xxx xxx pinlogic xspi xspi xtimer xhandset simslirp xxx xxx sc4 owb Serial_port Serial_port xxx xxx rtc wcdmarfi

SoC

fiodev fiodev fiodev fiodev fiodev battery xxx

fiodev fiodev fiodev fiodev

fiodev fiodev fiodev fiodev fiodev

gsmbs gsmbs gsmbs

gsmbs gsmbs gsmbs

gsmbs gsmbs gsmbs

Platform
xxx gsmrfi wcdmabs

llc sndcp rlcmac

Interfaceflash interfaces xxx everywhere…. xxx xxx

asiminterface

dummy xhandset

Call Processing
ptfif ptfif ptfif

Graphical Handset

81
May 6, 05

Enabling the Open SystemC User Community

GreenSocs Interface Repository
• • All interfaces used by GreenSocs are recorded in an interface repository. The repository holds any information: •ONLINE repository. • SystemC implementation •Free Access • SPIRIT identifier •Updated Instantly • Formal description •YOU HAVE WRITE The Repository works at several levels: ACCESS!!! • Protocol description •“Gardened” by • Broken into Attributes GreenSocs
• Paravitulisation (Software view) • TLM view • Model-Tool

• •

This provides an easily accessible resource for all designers. The repository is open to all to contribute. GreenSocs engineers ensure that there are no overlaps or errors.
Enabling the Open SystemC User Community

82
May 6, 05

What is an Interface?
• Structural Definition -- using SPIRIT IPXACT
• Both Data and Timing information for the protocol

Implementation Definition
• In SystemC - aligned with TLM 2.0, must provide “traits classes” etc.
Protocol.h Protocol.vhdl …..

Exemplar components
• Example routers, or other appropriate components

• Example USER INTERFACE components - Plugged into Eclipse.

GUI components

83
May 6, 05

Enabling the Open SystemC User Community

Putting it all together.

Interface repository
IPXACT Definition Exemplar IP components

YOUR ESL
Rich infrastructure support

SystemC Definition

Exemplar Eclipse Components

Free Choice of Vendor

84
May 6, 05

Enabling the Open SystemC User Community

Thankyou
For more information, please visit http://www.greensocs.com/ Or contact Mark.Burton@greensocs.com
Enabling the Open SystemC User Community

85
May 6, 05