VHDL Symbolic simulator in OCaml Florent Ouchet TIMA Labs – GINP – UJF – CNRS – VDS group OCaml Meeting 2009.

Slides:



Advertisements
Similar presentations
Digital System Design Subject Name : Digital System Design Course Code : IT-314.
Advertisements

ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Evolution and History of Programming Languages Software/Hardware/System.
The Design Process Outline Goal Reading Design Domain Design Flow
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
Topics of Lecture Structural Model Procedures Functions Overloading.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
(1) Introduction © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Chapter 1 Algorithm Analysis
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Chap. 1 Overview of Digital Design with Verilog. 2 Overview of Digital Design with Verilog HDL Evolution of computer aided digital circuit design Emergence.
COE4OI5 Engineering Design. Copyright S. Shirani 2 Course Outline Design process, design of digital hardware Programmable logic technology Altera’s UP2.
CAD Techniques for IP-Based and System-On-Chip Designs Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan, R.O.C {
Cosc 2150: Computer Organization
Programming Lifecycle
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
CSE 494: Electronic Design Automation Lecture 2 VLSI Design, Physical Design Automation, Design Styles.
Chapter 6 Programming Languages (2) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 3, 09/11/2003 Prof. Roy Levow.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
EE 466/586 VLSI Design Partha Pande School of EECS Washington State University
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
An Overview of Hardware Design Methodology Ian Mitchelle De Vera.
Evaluating and Improving an OpenMP-based Circuit Design Tool Tim Beatty, Dr. Ken Kent, Dr. Eric Aubanel Faculty of Computer Science University of New Brunswick.
Introduction to Compiling
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
ECE-C662 Lecture 2 Prawat Nagvajara
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
EE121 John Wakerly Lecture #17
1 Structure of Compilers Lexical Analyzer (scanner) Modified Source Program Parser Tokens Semantic Analysis Syntactic Structure Optimizer Code Generator.
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
Language Implementation Overview John Keyser Spring 2016.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
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.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
EMT 351/4 DIGITAL IC DESIGN Week # 1 EDA & HDL.
Introduction To VHDL 홍 원 의.
Chapter 1 Introduction.
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
ELEC 7770 Advanced VLSI Design Spring 2016 Introduction
Chapter 1 Introduction.
ELEC 7770 Advanced VLSI Design Spring 2014 Introduction
Department of Software & Media Technology
332:437 Lecture 7 Verilog Hardware Description Language Basics
ELEC 7770 Advanced VLSI Design Spring 2012 Introduction
Lecture 1.3 Hardware Description Languages (HDLs)
ELEC 7770 Advanced VLSI Design Spring 2010 Introduction
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
332:437 Lecture 7 Verilog Hardware Description Language Basics
VHDL Introduction.
HIGH LEVEL SYNTHESIS.
332:437 Lecture 7 Verilog Hardware Description Language Basics
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

VHDL Symbolic simulator in OCaml Florent Ouchet TIMA Labs – GINP – UJF – CNRS – VDS group OCaml Meeting 2009 Grenoble – France 04/02/2009

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 2 Outline VSYML – Vhdl Symbolic Simulator in ocaML: Symbolic simulation goals Why OCaml? Application structure and limitations of OCaml in this context Perspectives Conclusion

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 3 Symbolic simulation goals Model is needed for: –Model checking: equivalence of IC implementation and specification; –Other formal methods based on the model: (ANR project FME 3 ) analysis of error consequences using formal methods.

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 4 Symbolic simulation goals Integrated circuit synthesis flow: Modeling level Register Transfert Level Gate Level Layout Chips FSM, complex types Explicit time,behavioral Boolean type Drawing of transistors and wires Manual refinements Automatic synthesis Placing and routing Manufacturing

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 5 Symbolic simulation goals Existing symbolic simulators: Modeling level Register Transfert Level Gate Level Layout Chips FSM, complex types Explicit time,behavioral Boolean type Drawing of transistors and wires VOSS/Forte (Intel CAD Labs)

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 6 Symbolic simulation goals Existing symbolic simulators: Modeling level Register Transfert Level Gate Level Layout Chips FSM, complex types Explicit time,behavioral Boolean type Drawing of transistors and wires VSYML

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 7 Symbolic simulation goals Integrated Circuit Description Design Under Test (DUT) X t=0 ns X t=1 ns … Y t=0 ns Y t=1 ns … X t=0 + Y t=1 ? Description written in VHDL (IEEE Std TM – 2007) Symbolic values depend on the time.

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 8 Why OCaml? Expression patterns: –1 – unary_operator X(not – abs) –X assoc_operator Y (+ * and or xor xnor) –X binary_operator Y (nand nor ^ = /= =) –X other_operator Y (mod rem / -) –… (total of 28 patterns)

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 9 Why OCaml? type formula = | FormulaSymbol of symbol | FormulaImmediateInt of big_int | FormulaUnaryOperator of (unary_operator*formula) | FormulaAssociativeOperator of (assoc_operator*formula list) | FormulaBinaryOperator of (binary_operator*formula*formula) | FormulaOtherOperator of (other_operator*formula*formula list) | …

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 10 Why OCaml? Known expression patterns are rewritten (numeric evaluation); As in the standard, the simulation algorithm is intrinsically free of side effects.

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 11 Why OCaml? Process A Process B Process C The next value of each signal is computed from current values. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 12 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 13 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 14 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 15 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 16 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 17 Why OCaml? Process A Process B Process C The processes are executed until the design is stabilized. DUT

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 18 Why OCaml? Strong type checking (compared to C, Pascal…): confidence in computations; Lexer/parser generator; « Free » software, its ancestor was written in Mathematica; Lightweight and easy to redist (Java, C#, F#).

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 19 Application structure VSYML VHDL source files Design model parameters Standalone and automated application.

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 20 Application structure Some facts: –Over lines of code –24 dedicated modules (types, basics, lexer, parser, resources, evaluators, converters, volume extrusion, top-level…)

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 21 Application structure Straightforward conversion from BNF rules (language spec) No syntax for optional tokens Debugging conflicts is a nightmare VHDL source files (thousands lines) Lexer (59 states, 1058 transitions) Parser (695 grammar rules,1318 states) Abstract syntax tree

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 22 Application structure Some basic functions are missing in OCaml standard libraries Issue 4662 closed as « won’t fix » Abstract syntax tree Design elaboration Simulation structure tree

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 23 Application structure A function to map a list of functions to the same parameter: (‘a -> ‘b) list -> ‘a -> ‘b list A function to remove the n first list elements: ‘a list -> int -> ‘a list

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 24 Application structure Unbounded integers in VHDL (32 bits at least - "Time" requires 64 bits) Simulation of design on n bits  Big_int Abstract syntax tree Design elaboration Simulation structure tree

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 25 Application structure Big_int is an abstract type (=) ( ) on Big_int raise runtime exceptions Associative list functions based on (=) Abstract syntax tree Design elaboration Simulation structure tree

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 26 Application structure Many executions of the functional structure with different evaluation contexts Simulation structure tree Simulation algorithm Simulation results

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 27 Application structure Signature of process simulation function: process -> structure_context -> evaluation_context -> changed_object list

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 28 Prototype of process simulation function: process -> structure_context -> evaluation_context -> changed_object list Functors for efficiency (+50%) Application structure

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 29 Application structure Prototype of process simulation function: process -> structure_context -> evaluation_context -> changed_signal list evaluation_context = { simulation_time: Big_int; currentvalues: (signal*formula) list; … } Test with array, hashtbl and references

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 30 Application structure Some timings: FIR filter simulation, 1000 clock cycles. Parsing + elab. SimulationOutputProcess memory GC bytes assoc40 ms9.60 s1.20 s2.4 Mo1189 Mo array40 ms1.82 s1.20 s2.4 Mo910 Mo hashtbl40 ms2.00 s1.17 s2.3 Mo921 Mo ref40 ms1.76 s1.25 s2.3 Mo899 Mo

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 31 Application structure Process A Process B Process C DUT Load averaging for a multi-thread simulation. Communication efficiency for a distributed simulation.

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 32 Perspectives Spread the simulation over cores and computers: an integrated circuit is a fixed finite set of concurrent process  concurrent simulation but: –lots of rendez-vous and communications –Irregular load Mathematics: loop invariants…

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 33 Conclusion Development for project FME 3 is now finished. Research prototype for parallel computations? Release to the public? CeCill Licence?

Florent Ouchet – OCaml meeting 2009 – Grenoble – France 34 Questions? Thanks for your attention