CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #4 – Introduction.

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

A hardware-software co-design approach with separated verification/synthesis between computation and communication Masahiro Fujita VLSI Design and Education.
SoC Challenges & Transaction Level Modeling (TLM) Dr. Eng. Amr T. Abdel-Hamid ELECT 1002 Spring 2008 System-On-a-Chip Design.
Copyright  2003 Dan Gajski and Lukai Cai 1 Transaction Level Modeling: An Overview Daniel Gajski Lukai Cai Center for Embedded Computer Systems University.
Operating Systems Lecture 7.
ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
High Level Languages: A Comparison By Joel Best. 2 Sources The Challenges of Synthesizing Hardware from C-Like Languages  by Stephen A. Edwards High-Level.
Give qualifications of instructors: DAP
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #6 – Model Refinement.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Addressing the System-on-a-Chip Interconnect Woes Through Communication-Based Design N. Vinay Krishnan EE249 Class Presentation.
Spec-C, Handel-C, SystemC : A Comparative Study By: Nikola Rank 13 March 2006.
Copyright  1999 Daniel D. Gajski IP – Based Design Methodology Daniel D. Gajski University of California
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
1 ICS103 Programming in C Lecture 2: Introduction to C (1)
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
1/26/2007CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
Formal Verification of SpecC Programs using Predicate Abstraction Himanshu Jain Daniel Kroening Edmund Clarke Carnegie Mellon University.
1 Embedded Computer System Laboratory RTOS Modeling in Electronic System Level Design.
Design Synopsys System Verilog API Donations to Accellera João Geada.
© 2011 Xilinx, Inc. All Rights Reserved Intro to System Generator This material exempt per Department of Commerce license exception TSU.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
OMNET++. Outline Introduction Overview The NED Language Simple Modules.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Inter-Process Communication Mechanisms CSE331 Operating Systems Design.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #7 – System-Level.
Extreme Makeover for EDA Industry
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
1 H ardware D escription L anguages Modeling Digital Systems.
Automatic Communication Refinement for System Level Design Samar Abdi, Dongwan Shin and Daniel Gajski Center for Embedded Computer Systems, UC Irvine
F. Gharsalli, S. Meftali, F. Rousseau, A.A. Jerraya TIMA laboratory 46 avenue Felix Viallet Grenoble Cedex - France Embedded Memory Wrapper Generation.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #21 – HW/SW.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Design & Co-design of Embedded Systems Next Step: Transaction-Level Modeling Maziar Goudarzi.
Module 1.2 Introduction to Verilog
Processes. Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
SpecC stands for “specification description language based on C”.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #5 – System-Level.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Slides created by: Professor Ian G. Harris Hello World #include main() { printf(“Hello, world.\n”); }  #include is a compiler directive to include (concatenate)
Formal Verification of Synchronization Issues of SpecC Description with Automatic Abstraction Thanyapat Sakunkonchak Masahiro Fujita Department of Electronics.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
Verification of Synchronization in SpecC Description with the Use of Difference Decision Diagrams Thanyapat Sakunkonchak Masahiro Fujita Department of.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #13 – Other.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
System-on-Chip Design Hao Zheng Comp Sci & Eng U of South Florida 1.
Lecturer: Nguyen Thi Hien Software Engineering Department Home page: hienngong.wordpress.com Chapter 2: Language C++
Advanced BioPSE NCRR Programming Conventions and Standards J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J.
System-on-Chip Design
Basic Language Concepts
IP – Based Design Methodology
Design Flow System Level
פרטים נוספים בסילבוס של הקורס
פרטים נוספים בסילבוס של הקורס
CprE 588 Embedded Computer Systems
Introduction to Digital System and Microprocessor Design
CprE 588 Embedded Computer Systems
Transaction Level Modeling: An Overview
Synchronization Verification in System-Level Design with ILP Solvers
Digital Designs – What does it take
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #4 – Introduction to SpecC

Lect-04.2CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 System level Introduction System-on-Chip (SOC) design Increase of design complexity Move to higher levels of abstraction 1E0 1E1 1E2 1E3 1E4 1E5 1E6 1E7 Number of components Level Gate RTL Algorithm Transistor Abstraction Accuracy R. Domer, The SpecC System-Level Design Language and Methodology, Center for Embedded Systems, University of California-Irvine, 2001.

Lect-04.3CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Model Traditional model Processes and signals Mixture of computation and communication Automatic replacement impossible SpecC model Behaviors and channels Separation of computation and communication Plug-and-play s2 s1 s3 P1P2 B2 v2 v1 v3 B1 C1

Lect-04.4CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Model (cont.) Specification model Exploration model Computation in behaviors Communication in channels Implementation model Channel disappears Communication inlined into behaviors Wires exposed B2 v2 v1 v3 B1 C1 B2B1 v2 v1 v3

Lect-04.5CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 System-Level Language Goals Executability Validation through simulation Synthesizability Implementation in HW and/or SW Support for IP reuse Modularity Hierarchical composition Separation of concepts Completeness Support for all concepts found in embedded systems Orthogonality Orthogonal constructs for orthogonal concepts Minimality Simplicity

Lect-04.6CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 System-Level Language Requirements Behavioral hierarchy Structural hierarchy Concurrency Synchronization Exception handling Timing State transitions Composite data types SpecChartsStatechartsHardwareCVerilogVHDLJavaC++CSpecC not supportedpartially supportedsupported

Lect-04.7CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language Foundation: ANSI-C Software requirements are fully covered SpecC is a true superset of ANSI-C Every C program is a SpecC program Leverage of large set of existing programs Well-known Well-established SpecC has extensions needed for hardware Minimal, orthogonal set of concepts Minimal, orthogonal set of constructs SpecC is a real language Not just a class library

Lect-04.8CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) ANSI-C Program is set of functions Execution starts from function main() SpecC Program is set of behaviors, channels, and interfaces Execution starts from behavior Main.main() /* HelloWorld.c */ #include void main(void) { printf(“Hello World!\n”); } // HelloWorld.sc #include behavior Main { void main(void) { printf(“Hello World!\n”); } };

Lect-04.9CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) SpecC types Support for all ANSI-C types predefined types ( int, float, double, …) composite types (arrays, pointers) user-defined types ( struct, union, enum ) Boolean type: Explicit support of truth values bool b1 = true; bool b2 = false; Bit vector type: Explicit support of bit vectors of arbitrary length bit[15:0] bv = b; Event type: Support for synchronization event e;

Lect-04.10CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) Bit vector type signed or unsigned arbitrary length standard operators logical operations arithmetic operations comparison operations type conversion type promotion concatenation operator b slice operator a[l:r] typedef bit[7:0] byte; // type definition byte a; unsigned bit[16] b; bit[31:0] BitMagic(bit[4] c, bit[32] d) { bit[31:0] r; a = b; // constant b = ub; // assignment b[7:0] = a; // sliced access b = d[31:16]; if (b[15]) // single bit b[15] = 0b; // access r = c // b; a = ~(a & ); // logical op. r += *a; // arithmetic op. return r; }

Lect-04.11CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) Basic structure Top behavior Child behaviors Channels Interfaces Variables (wires) Ports b1b2 v1 c1 B p1p2 Behavior Ports Interfaces Channel Variable (wire) Child behaviors

Lect-04.12CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) Basic structure interface I1 { bit[63:0] Read(void); void Write(bit[63:0]); }; channel C1 implements I1; behavior B1(in int, I1, out int); behavior B(in int p1, out int p2) { int v1; C1 c1; B1 b1(p1, c1, v1), b2(v1, c1, p2); void main(void) { par { b1.main(); b2.main(); } }; b1b2 v1 c1 B p1p2

Lect-04.13CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 The SpecC Language (cont.) Typical test bench Top-level behavior: Main Stimulator provides test vectors Design unit under test Monitor observes and checks outputs StimulatorDesign_Unit v2 Monitor v1 v4 v3 Main

Lect-04.14CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 behavior B_pipe { B b1, b2, b3; void main(void) {pipe{b1.main(); b2.main(); b3.main(); } } }; The SpecC Language (cont.) Behavioral hierarchy B_par b1 b3 b2 B_seq b1 b3 b2 B_fsm b1 b3 b2 b5b6 b4 B_pipe b1 b3 b2 behavior B_seq { B b1, b2, b3; void main(void) { b1.main(); b2.main(); b3.main(); } }; behavior B_fsm { B b1, b2, b3, b4, b5, b6; void main(void) { fsm { b1:{…} b2:{…} …} } }; behavior B_par { B b1, b2, b3; void main(void) { par{b1.main(); b2.main(); b3.main(); } } }; Sequential execution FSM execution Concurrent execution Pipelined execution

Lect-04.15CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – FSM Support B_FSM b1b2 b3 b=0 b>0 a>0 a0a0 a>b abab b<0 behavior B_FSM(in int a, in int b) { B b1, b2, b3; void main(void) { fsm { b1:{ if (b<0) break; if (b==0) goto b1; if (b>0) goto b2; } b2:{ if (a>0) goto b1; } b3:{ if (a>b) goto b1; } } }; Finite State Machine (FSM) Explicit state transitions triple fsm { : { if goto } … } Moore-type FSM Mealy-type FSM

Lect-04.16CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Pipelining Support Pipeline Explicit execution in pipeline fashion pipe { }; behavior Pipeline { Stage1 b1; Stage2 b2; Stage3 b3; void main(void) { pipe { b1.main(); b2.main(); b3.main(); } }; b1 b2 b3 Pipeline

Lect-04.17CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Pipelining Support (cont.) behavior Pipeline { Stage1 b1; Stage2 b2; Stage3 b3; void main(void) { int i; pipe(i=0; i<10; i++) { b1.main(); b2.main(); b3.main(); } }; b1 b2 b3 Pipeline Explicit execution in pipeline fashion pipe { }; pipe ( ; ; ) { … }

Lect-04.18CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Pipelining Support (cont.) behavior Pipeline { int v1; int v2; int v3; Stage1 b1(v1, v2); Stage2 b2(v2, v3); Stage3 b3(v3, v1); void main(void) { int i; pipe(i=0; i<10; i++) { b1.main(); b2.main(); b3.main(); } }; b1 b2 b3 Pipeline v3v2 v1 Pipeline Explicit execution in pipeline fashion pipe { }; pipe ( ; ; ) { … } Support for automatic buffering

Lect-04.19CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Pipelining Support (cont.) behavior Pipeline { piped piped int v1; piped int v2; piped int v3; Stage1 b1(v1, v2); Stage2 b2(v2, v3); Stage3 b3(v3, v1); void main(void) { int i; pipe(i=0; i<10; i++) { b1.main(); b2.main(); b3.main(); } }; b1 b2 b3 Pipeline v3v2 v1 Pipeline Explicit execution in pipeline fashion pipe { }; pipe ( ; ; ) { … } Support for automatic buffering piped […] ;

Lect-04.20CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Communication Communication via shared variable via virtual channel via hierarchical channel SR v3 v2 v1 B SR v3 v2 v1 B C SR B C2 C1 Shared memoryMessage passingProtocol stack

Lect-04.21CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Synchronization behavior S(out event Req, out float Data, in event Ack) { float X; void main(void) {... Data = X; notify Req; wait Ack;... } }; behavior R(in event Req, in float Data, out event Ack) { float Y; void main(void) {... wait Req; Y = Data; notify Ack;... } }; SR Ack Data Req B Synchronization Event type event ; Synchronization primitives wait ; notify ; notifyone ;

Lect-04.22CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Communication (cont.) behavior S(IS Port) { float X; void main(void) {... Port.Send(X);... } }; behavior R(IR Port) { float Y; void main(void) {... Y=Port.Receive();... } }; channel C implements IS, IR { event Req; float Data; event Ack; void Send(float X) { Data = X; notify Req; wait Ack; } float Receive(void) { float Y; wait Req; Y = Data; notify Ack; return Y; } }; interface IS { void Send(float); }; interface IR { float Receive(void); }; SR Ack Data Req B C ISIR Communication Interface class interface { }; Channel class channel implements { };

Lect-04.23CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Communication (cont.) behavior S(IS Port) { float X; void main(void) {... Port.Send(X);... } }; behavior R(IR Port) { float Y; void main(void) {... Y=Port.Receive();... } }; channel PCI implements PCI_IF; channel C2 implements IS, IR { PCI Bus; void Send(float X) { Bus.Transfer( PCI_WRITE, sizeof(X),&X); } float Receive(void) { float Y; Bus.Transfer( PCI_READ, sizeof(Y),&Y); return Y; } }; interface PCI_IF { void Transfer( enum Mode, int NumBytes, int Address); }; SR B PCI C2 interface IS { void Send(float); }; interface IR { float Receive(void); }; Hierarchical channel Virtual channel implemented by standard bus protocol example: PCI bus

Lect-04.24CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Miscellaneous (cont.) Exception handling Interrupt behavior B1(in event e1, in event e2) { B b, a1, a2; void main(void) { try { b.main(); } trap (e1) { a1.main(); } trap (e2) { a2.main(); } } }; behavior B2(in event e1, in event e2) { B b, i1, i2; void main(void) { try { b.main(); } interrupt (e1) { i1.main(); } interrupt (e2) { i2.main(); } } }; B1 b a1a2 e1e2 e1e2 B2 i1i2 b e1e2 e1e2 Abortion

Lect-04.25CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Timing Example: stimulator for a test bench 5/100/ 10/200/ 10/20 t7t6t4t3t2t1t5 a d in ABus in RMode in WMode inout DBus a b e1 e b1010b1111b0000b 0 behavior Testbench_Driver (inout int a, inout int b, out event e1, out event e2) { void main(void) { waitfor 5; a = 42; notify e1; waitfor 5; b = 1010b; notify e2; waitfor 10; a++; b |= 0101b; notify e1, e2; waitfor 10; b = 0; notify e2; } }; Timing Exact timing waitfor ;

Lect-04.26CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Timing (cont.) 5/100/ 10/200/ 10/20 t7t6t4t3t2t1t5 a d in ABus in RMode in WMode inout DBus Example: SRAM read protocol bit[7:0] Read_SRAM(bit[15:0] a) { bit[7:0] d; do { t1: {ABus = a; } t2: {RMode = 1; WMode = 0; } t3: { } t4: {d = Dbus; } t5: {ABus = 0; } t6: {RMode = 0; WMode = 0; } t7: { } } timing { range(t1; t2; 0; ); range(t1; t3; 10; 20); range(t2; t3; 10; 20); range(t3; t4; 0; ); range(t4; t5; 0; ); range(t5; t7; 10; 20); range(t6; t7; 5; 10); } return(d); } Specification Timing Exact timing waitfor ; Timing constraints do { } timing { }

Lect-04.27CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Timing (cont.) bit[7:0] Read_SRAM(bit[15:0] a) { bit[7:0] d; do { t1: {ABus = a; waitfor( 2);} t2: {RMode = 1; WMode = 0; waitfor(12);} t3: { waitfor( 5);} t4: {d = Dbus; waitfor( 5);} t5: {ABus = 0; waitfor( 2);} t6: {RMode = 0; WMode = 0; waitfor(10);} t7: { } } timing { range(t1; t2; 0; ); range(t1; t3; 10; 20); range(t2; t3; 10; 20); range(t3; t4; 0; ); range(t4; t5; 0; ); range(t5; t7; 10; 20); range(t6; t7; 5; 10); } return(d); } Implementation 1 5/100/ 10/200/ 10/20 t7t6t4t3t2t1t5 a d in ABus in RMode in WMode inout DBus Example: SRAM read protocol Timing Exact timing waitfor ; Timing constraints do { } timing { }

Lect-04.28CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Timing (cont.) bit[7:0] Read_SRAM(bit[15:0] a) { bit[7:0] d; // ASAP Schedule do { t1: {ABus = a; } t2: {RMode = 1; WMode = 0; waitfor(10);} t3: { } t4: {d = Dbus; } t5: {ABus = 0; } t6: {RMode = 0; WMode = 0; waitfor(10);} t7: { } } timing { range(t1; t2; 0; ); range(t1; t3; 10; 20); range(t2; t3; 10; 20); range(t3; t4; 0; ); range(t4; t5; 0; ); range(t5; t7; 10; 20); range(t6; t7; 5; 10); } return(d); } Implementation 2 5/100/ 10/200/ 10/20 t7t6t4t3t2t1t5 a d in ABus in RMode in WMode inout DBus Example: SRAM read protocol Timing Exact timing waitfor ; Timing constraints do { } timing { }

Lect-04.29CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Miscellaneous (cont.) // MyDesign.sc #include import “Interfaces/I1”; import “Channels/PCI_Bus”; import “Components/MPEG-2”;... Library support Import of precompiled SpecC code import ; Automatic handling of multiple inclusion no need to use #ifdef - #endif around included files Visible to the compiler/synthesizer not inline-expanded by preprocessor simplifies reuse of IP components

Lect-04.30CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 SpecC – Miscellaneous (cont.) /* comment, not persistent */ // global annotations note Author = “Rainer Doemer”; note Date = “Fri Feb 23 23:59:59 PST 2001”; behavior CPU(in event CLK, in event RST,...) { // local annotations note MaxClockFrequency = 800 * 1e6; note CLK.IsSystemClock = true; note RST.IsSystemReset = true;... }; Persistent annotation Attachment of a key-value pair globally to the design, i.e. note = ; locally to any symbol, i.e. note. = ; Visible to the compiler/synthesizer eliminates need for pragmas allows easy data exchange among tools

Lect-04.31CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 Summary SpecC model PSM model of computation Separation of communication and computation Hierarchical network of behaviors and channels Plug-and-play SpecC language True superset of ANSI-C ANSI-C plus extensions for HW-design Support of all concepts needed in system design Structural and behavioral hierarchy Concurrency State transitions Communication Synchronization Exception handling Timing

Lect-04.32CprE 588 – Embedded Computer SystemsFeb 3-5, 2009 Conclusion SpecC language Executable and synthesizable Precise coverage of system language requirements Orthogonal constructs for orthogonal concepts Impact Adoption of SpecC in industry and academia SpecC Open Technology Consortium (STOC) Future Standardization effort in progress by STOC Improvement with your participation