Towards A C++ based Design Methodology Facilitating Sequential Equivalence Checking Venkat Krishnaswamy, Calypto Design Systems, Inc. & Philippe Georgelin,

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Enabling Efficient On-the-fly Microarchitecture Simulation Thierry Lafage September 2000.
MotoHawk Training Model-Based Design of Embedded Systems.
Puneet Arora ESCUG, 09 Abstraction Levels in SoC Modelling.
Fault Detection in a HW/SW CoDesign Environment Prepared by A. Gaye Soykök.
1 HW/SW Partitioning Embedded Systems Design. 2 Hardware/Software Codesign “Exploration of the system design space formed by combinations of hardware.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
Partial Order Reduction for Scalable Testing of SystemC TLM Designs Sudipta Kundu, University of California, San Diego Malay Ganai, NEC Laboratories America.
Interface-based Design Donald Chai EE249. Outline Orthogonalization of concerns Formalisms Interface-based Design Example Cheetah Simulator Future Inroads.
Trend towards Embedded Multiprocessors Popular Examples –Network processors (Intel, Motorola, etc.) –Graphics (NVIDIA) –Gaming (IBM, Sony, and Toshiba)
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Educational Computer Architecture Experimentation Tool Dr. Abdelhafid Bouhraoua.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Design Synopsys System Verilog API Donations to Accellera João Geada.
VerificationTechniques for Macro Blocks (IP) Overview Inspection as Verification Adversarial Testing Testbench Design Timing Verification.
Role of Standards in TLM driven D&V Methodology
OOP Languages: Java vs C++
Effective Methods for Software and Systems Integration
1 Chapter 2. The System-on-a-Chip Design Process Canonical SoC Design System design flow The Specification Problem System design.
TM Efficient IP Design flow for Low-Power High-Level Synthesis Quick & Accurate Power Analysis and Optimization Flow JAN Asher Berkovitz Yaniv.
ITEC224 Database Programming
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
SystemC: A Complete Digital System Modeling Language: A Case Study Reni Rambus Inc.
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
A New Method For Developing IBIS-AMI Models
Programming Models & Runtime Systems Breakout Report MICS PI Meeting, June 27, 2002.
Automatic Communication Refinement for System Level Design Samar Abdi, Dongwan Shin and Daniel Gajski Center for Embedded Computer Systems, UC Irvine
High Performance Embedded Computing © 2007 Elsevier Lecture 3: Design Methodologies Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte Based.
High Performance Embedded Computing © 2007 Elsevier Chapter 1, part 2: Embedded Computing High Performance Embedded Computing Wayne Wolf.
Chonnam national university VLSI Lab 8.4 Block Integration for Hard Macros The process of integrating the subblocks into the macro.
Catapult™ C Synthesis Crossing the Gap between Algorithm and Hardware Architecture Mac Moore North American Product Specialist Advanced Synthesis Solutions.
ESL and High-level Design: Who Cares? Anmol Mathur CTO and co-founder, Calypto Design Systems.
Array Synthesis in SystemC Hardware Compilation Authors: J. Ditmar and S. McKeever Oxford University Computing Laboratory, UK Conference: Field Programmable.
© 2012 xtUML.org Bill Chown – Mentor Graphics Model Driven Engineering.
Fast Simulation Techniques for Design Space Exploration Daniel Knorreck, Ludovic Apvrille, Renaud Pacalet
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 SystemVerilog Enhancement Requests Daniel Schostak Principal Engineer February 26 th 2010.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
Information Systems Engineering. Lecture Outline Information Systems Architecture Information System Architecture components Information Engineering Phases.
Standard Template Library The Standard Template Library was recently added to standard C++. –The STL contains generic template classes. –The STL permits.
Presentation by Tom Hummel OverSoC: A Framework for the Exploration of RTOS for RSoC Platforms.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
System-level power analysis and estimation September 20, 2006 Chong-Min Kyung.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
SOC Virtual Prototyping: An Approach towards fast System- On-Chip Solution Date – 09 th April 2012 Mamta CHALANA Tech Leader ST Microelectronics Pvt. Ltd,
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Teaching The Principles Of System Design, Platform Development and Hardware Acceleration Tim Kranich
Design for Verification in System-level Models and RTL Anmol Mathur Venkat Krishnaswamy Calypto Design Systems, Inc.
Lecture 13.  Failure mode: when team understands requirements but is unable to meet them.  To ensure that you are building the right system Continually.
1 Becoming More Effective with C++ … Day Two Stanley B. Lippman
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 11 System-Level Verification Issues. The Importance of Verification Verifying at the system level is the last opportunity to find errors before.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
03/30/031 ECE Digital System Design & Synthesis Lecture Design Partitioning for Synthesis Strategies  Partition for design reuse  Keep related.
Verification Presentation to SystemVerilog Basic Committee Peter Flake Nov 15, 2002.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
ASIC Design Methodology
Support for Program Analysis as a First-Class Design Constraint in Legion Michael Bauer 02/22/17.
Design Flow System Level
Chapter 5 - Functions Outline 5.1 Introduction
Subject Name: Embedded system Design Subject Code: 10EC74
CoCentirc System Studio (CCSS) by
HIGH LEVEL SYNTHESIS.
H a r d w a r e M o d e l i n g O v e r v i e w
Presentation transcript:

Towards A C++ based Design Methodology Facilitating Sequential Equivalence Checking Venkat Krishnaswamy, Calypto Design Systems, Inc. & Philippe Georgelin, STMicroelectronics

Maximize code reuse across models Methodology Goals Enable EDA tools to unambiguously infer hardware intent Maintain the performance and productivity benefits of C/C++ coding

Talk Outline C++ Modeling Achieving Code Reuse Modeling Hardware Intent Target Model Experimental Results Conclusions and Future

Hardware Modeling in C/C++ Many applications for C/C++ models –Algorithm exploration –System prototyping –Architecture partitioning –Performance tuning –RTL verification –SW development Simulation speed and functional accuracy primary concerns Tools and methods around these models largely home-grown Code reuse across models improves productivity and reduces the chance of model functionality diverging

Transactional Communication Achieving Code Reuse Module Computation and inter-module Communication are distinct tasks Separating computation from communication is necessary for reuse –computational code can be reused from model to model –communication detail changes depending on the application of a specific model The level of detail in inter-module communication is a first order determinant of overall event-simulation speed –events are generated in communication –the lower the level of communication detail the more events generated Cycle accurate Communication Computatio n

Computational Model Terminology Slave mode –no attempt at communication from within the body of computational code –complete execution in zero time –no explicit parallelism –communication detail can be specified in wrappers Master mode –may communicate from within the computational code –communication is at an API level lends itself to TLM styles –implementation of communication API’s determines level of communication

Implementing Slave Mode Computation Classes –Enable multiple instantiations w/ low effort typedef int16 sc_int ; void fir_filter (int16 in, int16 coeffs[8], int16& out) { static int16 regs [8]; for (int I = 7; i > 0; --i) regs[i] = regs[i-1]; regs[0] = in; int tmp = 0; for (int i = 0; i < 8; ++i) tmp = coeffs[i]* regs[i]; out = tmp >> 16; typedef int16 sc_int ; class fir_filter { public: fir_filter () {} virtual ~fir_filter () {} int16 run(int16 in, int16 coeffs[8]) { for (int i = 7; i > 0; --i) regs[i] = regs [i - 1] regs[0] = in; int tmp = 0; for (int i = 0; i < 8; ++i) tmp = coeffs[i] * regs[i]; return (tmp >> 16); } private; int16 regs[8]; Globally Scoped Functions –Model state with statics Two methods to model computation in slave mode

Coding Computational Master Models TLM techniques should be used –considerable work in literature on defining and implementing TLM API’s OSCI TLM working group - TLM methodologies well suited to scale across levels of communication detail –PV –PVT –CC

Modeling Communication Wrappers can be written around slave mode functions to implement communication –level of detail in wrappers adjusted to purpose for which model is intended –SystemC provides excellent facilities with which to implement wrappers at different levels of detail Level of communication dictates detail –Architecture exploration : untimed with function interfaces –SW prototyping : coarsely timed with API level interfaces –RTL verification : detailed timing with pin level interfaces For models coded using master mode, TLM techniques should be used –considerable work in literature on defining and implementing TLM API’s Ghenassia et al

Using Wrappers to Model Communication Wrappers for C Models –Provide “exo-skeleton” –Clock, reset, other timing related ports as required –Pin level I/O which can be mapped with RTL model Intent is to avoid touching computation code –C code can be modified in isolation from wrappers Wrappers are written for Throughput=1, Latency=1 In_B Out_D int In_A Out_C bool uns int Computational Slave Model readDatawriteData wrapper

Enabling a System to RTL design flow EDA tools to must be able to infer hardware intent from C/CC++ models –Sequential Equivalence Checkers (SEC) –High level synthesis (HLS) –Static Analysis SEC reasons about equivalence of hardware models and C/C++ models Model compilation –Hardware intent extraction –Static reasoning Functional Communication Computatio n Transactional Communication Computatio n Cycle accurate Communication Computatio n RTL

Hardware Intent in C++ It is necessary to define a set of rules for writing computational code –SEC statically creates an abstract HW model –Extraction of efficient HW models –Similar to existing behavioral synthesis rules –Not required for communication code outside SEC wrappers Rules preclude use of certain common programming idioms –Dynamic memory allocation/de-allocation –Pointer aliasing –Standard library & header files –Statically indeterminate loop bounds

Dynamic Memory Allocation (malloc) Dynamic allocation of memory to size “a” –The size of “a” could depend on runtime parameters Static allocation –Integer “a” is an array of 100 elements int *a; //This is a runtime call to the OS //to ask for memory allocation from //the kernel. //In general, it is impossible to reason // about size statically a = (int*) malloc (100 * sizeof (int));... free (a); //In this code fragment, a is statically //sized and therefore can be reasoned // about in hardware inferencing //In general, very large arrays that are //sparsely populated can impact // simulation performance. It is therefore //a good idea to isolate such memories // to modules which can be hierarchically // isolated int a[100];

Pointer Aliasing Occurs if a single pointer points to multiple memory locations over its lifetime –Some tools support a limited form of aliasing Single array indexing Linked list traversal example int *x; int a[100], int b[100]; for (x = a; x < (a+100); ++x) *a = 0xf; for (x = b; x < (b+100); ++x) *b = 0xf; //x points to several locations over its //lifetime. Another example is list traversal //In general, impossible to statically //determine what x points to my_struct *a, *first, a = first; while (a != NULL) a = a-->next; //linked list traversal example // //impossible to extract a HW abstraction //from a complex instance of aliasing

Case Study Modeling Style and Design Video Pipe Subsystem –Untimed C model –slave mode functions –Four algorithm blocks: DCT, IDCT, QUANT, IQUANT –functionality defined by sequential top level calls –RTL hierarchy for each block Coding Style –Adherence to separation of computation and communication –Algorithm blocks proven by realistic vectors –RTL created from C code using behavioral synthesis SEC tool (SLEC) driver files automatically created

Case Study Equvalence Checking and Results SEC done at block level –Pin accurate wrappers created for each block –Coarse clock notion: Throughput=1 and Latency=1 Initial SEC runs generated counter examples –Wrapper issues –Throughput and latency mismatches Final SEC runs successful –Full formal equivalence proofs –Runs under 30 minutes per block

Case Study – Benefits from a structured C/C++ methodology Model reuse –Efficiency between design phases and designers C/C++ for HW design –Ability to quickly make system trade offs –Automated RTL generation from HLS Comprehensive verification –Leverage C/C++ verification directly onto RTL –No testbench development using SEC –Exhaustive simulation of these models would have taken years.

Conclusions Separation of computation and communication are essential to achieving re-use Proper attention to such separation enables teams to build models at different levels with freedom to choose simulation infrastructure Most model writers should only care about writing computation blocks –Enabling a multi-hierarchy communication infrastructure involves more C++ expertise than an algorithmic designer/architect has time for Coding with hardware intent in mind enables tools and methods such as sequential equivalence checking and high level synthesis –Value brought to bear by these tools is worth the effort of coding within guidelines It is important to continue to expand the range of constructs from which hardware intent can be inferred in a tool independent manner