Asim/AWB Training Mohit Gambhir Intel Massachusetts Content: Joel Emer, Michael Pellauer, Chris Weaver.

Slides:



Advertisements
Similar presentations
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2004 Go4 v2.8 Analysis Design.
Advertisements

Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
6.S078 - Computer Architecture: A Constructive Approach AWB - Architect’s Workbench Joel Emer Computer Science & Artificial Intelligence Lab. Massachusetts.
Java Integrated Development Environments: ECLIPSE Part1 Installation.
1 Location-Based Services Using GSM Cell Information over Symbian OS Final Year Project LYU0301 Mok Ming Fai (mfmok1) Lee Kwok Chau (leekc1)
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
Guide To UNIX Using Linux Third Edition
Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,
Views Dwight Deugo Nesa Matic
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
1 CSIT 320. Just as the combination of a database and a database management system collects and organizes information about an institution/company/… as.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Linux Operations and Administration
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
WebFOCUS Developer Studio Update Dimitris Poulos Technical Director September 3, 2015 Copyright 2009, Information Builders. Slide 1.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Background The Encyclopedio of Life (EOL) is an ROR open source project to create a free, online reference source and database for every one of the 1.8.
1 AWB: Architect’s WorkBench Joel Emer. 2 A CPU model, A single model or project of anything A communications or interface protocol Or a modeling library.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
IAY 0600 Digital Systems Design
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Git – versioning and managing your software L. Grewe.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
CSE 219 Computer Science III CVS
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
ClearCase Concepts and Terminology
Programmable Logic Training Course HDL Editor
Design Verification Code and Toggle Coverage Course 7.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
Design and Implementation of a Rationale-Based Analysis Tool (RAT) Diploma thesis from Timo Wolf Design and Realization of a Tool for Linking Source Code.
SWGData and Software Access - 1 UCB, Nov 15/16, 2006 THEMIS SCIENCE WORKING TEAM MEETING Data and Software Access Ken Bromund GST Inc., at NASA/GSFC.
WinCvs. WinCVS WinCvs is a window based version control system. Use WinCvs when  You want to save every version of your file you have ever created. CVS.
1 MSTE Visual SourceSafe For more information, see:
L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009.
Processes and Virtual Memory
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Computer Simulation of Networks ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
Classes, Interfaces and Packages
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Hyperion Artifact Life Cycle Management Agenda  Overview  Demo  Tips & Tricks  Takeaways  Queries.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
11 Version control (part 2)
Advanced Integration and Deployment Techniques
Computer Simulation of Networks
Chapter 2: System Structures
Concurrent Versions System
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Presentation transcript:

Asim/AWB Training Mohit Gambhir Intel Massachusetts Content: Joel Emer, Michael Pellauer, Chris Weaver

Agenda  AWB Overview  Modular Software Design  AWB Abstractions & Terminology  AWB Tools  Configuration File Formats  Asimcore (libasim) Overview

AWB  Architects Workbench  Originally written to create software performance models  Core Principle: Modularity  AWB facilitates the modular plug-n-play style construction of software and hybrid software/hardware projects

AWB (contd.)  A suite of tools to support rapid modular construction and analysis of performance model  GUI and command-line based  Publically released under the GPL (models are not)  Across Multiple:  Code bases:  Different repositories, or even types of repositories  Model configurations:  Alternative modules, knobs, levels of accuracy  ISA variations  Benchmark suites  Results from different runs, etc.

Why Modularity  Speed of model development  Shared components between products  Reuse across generations  Encourages isomorphism to design  Improved fidelity  Facilitates speed/fidelity trade-offs  Architectural experimentation  Factorial development and evaluations  Sharing

AWB Abstractions & Terminology  Packages (codebases) are stored in repositories  Packages can be grouped into related bundles  Users check out bundles into local workspaces  The set of packages in a workspace is viewed a Union Dir  Bundle packages contain modules (modular source code)  Modules are arranged into models (configurations)  Each workspace can contain multiple model build directories  Each build directory can contain multiple benchmark runs

AWB Abstractions and Terminology  Workspace  Configure (a model)  Repository  Bundle  Package  Model  Module  Uniondir Search Path

Workspace  Directory where one works on the AWB based project  awb commands that need a workspace context in which to operate search up the directory tree until they find the root of a workspace.  contain a stylized directory structure

Workspace

Configure  Collect a set of source files together that can be built into a specific design or model  The specific set of modules (and hence source code) that comprise a specific model are specified in an.apm file.  Since a model is created from a pool of modules, the build paradigm adds a new step to “configure” a model source tree from a pool of modules.  Thus given an.apm file, the configure process involves placing copies of the designated source files (via symbolic links) and some automatically created glue files into a model-specific subtree in the build area of the workspace.

Repository  A repository is a source code repository using one of the supported source code management systems.  Supported versioning systems - CVS, SVN, Bitkeeper and git  Repository specification  [/ ]  The set of available repository names are specified in a.pack file.  /etc/respositories/.pack  ~/.asim/respositories/.pack

Bundle  Collection of repositories (with optional versions) – used to checkout a group of packages together.  Bundle specification  [/ ]  Bundles are specified in bundlefiles  /etc/asim/bundles.d/  ~/.asim/bundles.d/  files files

Package

 Portion of repository that is checked out in the workspace  the configure/Makefile.in/Makefile files are optional and do not build a user's model, but simply the tools that might exist in the package  Globally installed packages that can be shared by all users  /share/asim/ /  Private packages:  /src/

Model  An AWB model is a hierarchical representation of a design, where each node of the hierarchy is a module  Each workspace may have multiple models configured/built each constructed plug-n-play style out of the pool of modules available in all packages in a workspace  Represented in.apm file  Typically found in config/pm directory inside a package  Can be edited by apm-edit  In the AWB editor GUI, models are marked with an icon which looks like a double cog

Module  Modules represent the unit of “swapability” in source code  If two modules provide the same awb type then this is an assertion that they can be swapped for one another and that the result will be a coherent model that will successfully build  Each module is specified in an.awb file which specifies  ‘awb-type’of the module,  Awb-types of the children modules that it 'requires'  Source files that implement the module.

Uniondir Search Path  awb supports a union mount-like directory structure that overlays the files from a set of packages.  This set of packages is specified as a uniondir search path  File references resolved through search of all package directories in the search path  Packages added to search path at checkout awb-resolver config/pm/simcore/model.apm /home/mgambhir/asim/src/asim- simcore/config/pm/simcore/model.pm

AWB Operation Example Repositories Workspace

AWB Tools  awb-shell  awb  apm-edit

Awb-shell  This is a program that provides a command line interface to manipulate various ASIM objects.  Has default values for these Asim objects  Can set reset default values through set command  help command displays all possible commands   awb-shell help quickstart

Awb-shell % awb-shell awb> set model pm/Arana/arana_aint_dev.apm awb> clean model awb> configure model awb> build model awb> run model bm/Micro/maxipc.cfg awb> quit % awb-shell awb> set model pm/Arana/arana_aint_dev.apm awb> clean model awb> configure model awb> build model awb> run model bm/Micro/maxipc.cfg awb> quit % awb-shell --package=arana commit package % awb-shell help % awb-shell help code

Awb-shell  Primer for most commonly used awb-shell wrapped svn commands  awb-shell checkout package  awb-shell update package  awb-shell commit package  Make sure that environment variable EDITOR is set to your favorite EDITOR  setenv EDITOR vi  awb-shell checkout package /  To checkout a package branch  awb-shell checkout package /  To checkout a particular revision of a package

Awb-shell  Bundle commands  awb-shell new bundle [/ ]  By default takes a snapshot of packages in the current workspace  By default adds the file into ~/.asim/bundles/release  Use --head to specify the head version  Use --install to publicly install in /p/asim  Requires asimadm permissions  awb-shell checkout bundle [/ ]  awb-shell update bundle [/ ]  awb-shell show bundle [/ ]

Awb  cd into your workspace  Type: “awb”

Awb

Lets Select an ape softsdv model

Awb Nuke

Awb Configure

Awb Build

Apm-edit

Configuration File formats  Workspace configuration: awb.config   Model description:.apm file   Module description:.awb file   Benchmark description:.cfg file   Multiple benchmark description:.cfx file 

Asimcore (libasim) overview  Clocking  Ports  Stats

Clocking  Cycle accurate models:  Hierarchical and explicit time control void ASIM_CPU_CLASS::Clock (UINT64 cycle) { efmmbx.Clock(cycle); mbx.Clock(cycle); qbx.Clock(cycle); ibx.Clock(cycle); … }  Clock Server bool ASIM_RBOX_CLASS::InitModule () { ostringstream os; os << "SYSINT_CLOCK_DOMAIN_" << myUniqueRboxId; RegisterClock(os.str()); }  Clock techniques can be combined

Clocking  Creating Clock domains  void newClockDomain (string name, float freq, INT32 threadId = -1)  void newClockDomain (string name, list freqs, INT32 threadId = -1) List of valid frequencies

Clocking  Set Domain Frequency void setDomainFrequency (string domainName, float freq)  Register Clock void RegisterClock (string domainName, UINT32 skew = 0, INT32 threadId = -1, bool referenceDomain = false) void RegisterClock (string domainName, CLOCK_CALLBACK_INTERFACE cb, UINT32 skew = 0, INT32 threadId = -1, bool referenceDomain = false) void RegisterClock (string domainName, CLOCK_CALLBACK_INTERFACE cb, CLK_EDGE ed, UINT32 skew = 0, INT32 threadId = -1, bool referenceDomain = false)

Clocking template CLOCK_CALLBACK_INTERFACE newCallback (T *obj, void (T::*meth)(UINT64))  Traditionally all the module work happen in one method: void Clock(UINT64 cycle)  Callbacks enable:  Having more that one clock method in a module  Clocking a module at different frequencies

Clocking bool ASIM_CBOX_CLASS::InitModule () { … ostringstream os; os.str(""); os << "RING_CLOCK_DOMAIN_" << myChipNum; RegisterClock(os.str()); os.str(""); os << "CBOX_CLOCK_DOMAIN_" << myChipNum; RegisterClock(os.str(), newCallback(this, &ASIM_CBOX_CLASS::ClockCBOX)); … } void ASIM_CBOX_CLASS::ClockCBOX (const UINT64 cycle) { // Clocked at CBOX frequency …} void ASIM_CBOX_CLASS::Clock (const UINT64 cycle) { // Clocked at Ring frequency …}

Ports  In an Asim model, time only passes when messages flow through ports  Activity within each module is instantaneously fast  Each port defines a latency and a bandwidth  BW: Number of abstract objects that can enter/exit in a cycle  LAT: Number of cycles that objects travel through port  Sender defines BW and receiver defines LAT  Benefits:  LAT and BW are often useful knobs for architectural exploration  Separates functionality from timing  Encourages reuse  Can ease burden of coding “NetworkInUse” 2

Ports  Connect modules  Read port and write port make a connection  BW set by writer  Latency set be reader  What gets passed through ports?  Pointers to objects  allows for generic interfaces between modules  does make it easier to “cheat” by accessing info that shouldn’t be available to certain modules  Bools & integers

Ports WritePort var1_WPort; var1_WPort.Init("Unique_String"); var1_WPort.SetBandwidth(bandwidth); ReadPort var1_RPort; var1_RPort.Init("Unique_String"); var1_RPort.SetLatency(latency);

Ports // Write data into the port in cycle C CPU_INST inst; var1_WPort.Write(inst1, cycle); // Read data in cycle C + latency CPU_INST inst2; var2_RPort.Read(inst2, cycle);

Ports WritePort var1_WPort; var1_WPort.Init("Unique_String"); var1_WPort.Config(bandwidth); ReadPort var2_RPort var2_RPort.Init("Unique_String"); var2_RPort.Config(latency); ReadPort var3_RPort var3_RPort.Init("Unique_String"); var3_RPort.Config(latency + 1); ReadPort var4_RPort var4_RPort.Init("Unique_String"); var4_RPort.Config(latency +2);

Ports  Other Kinds of Ports  Stall Ports  Enable reader to stall the port to disable write from writing  Rate Matcher Ports  To connect modules in different frequency domains  Skid Ports  Allow lazy reading of data

Stats  Stat Types  Scalar  Stats that comprise of one value collected over the entire simulation run.  For eg. DCacheMisses  Multidimensional (Histograms)  These stats show the number of times particular clusters of events occur.  For eg, the number of times N instructions were issued in a cycle where N for an 8 way processor varies from 0 to 8.  Per Instructions Stats  Global  Per instruction type  Per instruction

Stats  Declare the stats data member of a class as a UINT64, Double, UINT64* or a Double*  UINT64 dstreamFull;  UINT64 instsRetired[CPU_THREADS];  Register the stats variable with StatsRegistry class  RegisterState(dstreamFull, "PremafDstreamFull", "Number of dstream full events");  RegisterState(instsRetired, CPU_THREADS, "RetiredInstructions", "Retired Instructions");  Accumulate Stats  dstreamFull++;  instRetired[tpu]++;

Stats  Histograms Stats  Declaration  HISTOGRAM_TEMPLATE instrIssuedPerCycle  Initilization  HISTOGRAM_TEMPLATE (UINT32 num_rows, UINT32 num_cols = 1, UINT32 row_size = 1, BOOL row_flex_cap = FALSE, UINT32 col_size = 1, BOOL col_flex_cap = FALSE )  Register  RegisterState(&instrIssuedPerCycle, "instrIssuedPerCycle", "Number of instructions issued from the IQ per cycle");  Accumulate Stats  AddEvent(UINT32 row_val, UINT32 col_val = 0, UINT64 value = 1)  AddEventWideBins(UINT32 row_val, UINT32 col_val = 0, UINT64 value = 1)

Stats  Command line switches  -sc Emit stats file every cycles  -sn Emit stats file every nanoseconds  -si Emit stats file every instructions  -sm Emit stats file every macro instructions  -rsc Reset stats on cycle  -rsi Reset stats on instruction  -rsm Reset stats on macro instruction  -rsn Reset stats on nanosecond  Adding a p after the previous flags (for instance -rscp) will reset stats periodically after events