Www.vlsi.itu.edu.tr04.11.2015 1 Very Large Scale Integration II - VLSI II SystemC Gürer Özbek ITU VLSI Laboratories Istanbul Technical University.

Slides:



Advertisements
Similar presentations
The Verilog Hardware Description Language
Advertisements

Chap. 6 Dataflow Modeling
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Chapter 3 : Combination and Sequential Circuits Modeling.
Chapter 9: Hardware Description Languages
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 15: SystemC (3/3) Prof. Sherief Reda Division of.
Copyright © 2001 Stephen A. Edwards All rights reserved SystemC Prof. Stephen A. Edwards.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
Chapter 2 : Data types. Extension Data Type Overview NameDescription sc_bitsingle bit with two values, ‘0’ and ‘1’ sc_bv Arbitrary width bit vector sc_logicSignle.
Copyright © 2001 Stephen A. Edwards All rights reserved SystemC Prof. Stephen A. Edwards.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 14: SystemC (2/3) Prof. Sherief Reda Division of.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 13: SystemC (1/3) Prof. Sherief Reda Division of.
Lecture 7 Verilog Additional references Structural constructs
Yoshinori Takeuchi Osaka University 1MPSoC Osaka University  Expansion of multi-functional portable multimedia devices requires high performance.
SystemC: Introduction. SystemC  A C++ based class library and design environment for system-level design.  Suitable for functional description that.
1 Advanced Computer Architecture 5MD00 / 5Z032 SystemC Henk Corporaal 2007.
From Scenic to SystemC Mehrdad Abutalebi. Outline Introducing Scenic Scenic Implementation Modeling Reactivity A Simple example From Scenic to SystemC.
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
ECE 2372 Modern Digital System Design
SystemC Tutorial Author: Silvio Veloso
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
1 Freeha Azmat Saba Zia Dec 02, Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Design & Co-design of Embedded Systems Combinational Logic in SystemC Maziar Goudarzi.
Modules and Processes in SystemC A Presentation by: Najmeh Fakhraie Mozhgan Nazarian-Naeini Hardware-Software Codesign Spring 2006.
Basic Overview of VHDL Matthew Murach Slides Available at:
Winter-Spring 2001Codesign of Embedded Systems1 Reactivity, Ports, and Signals in SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
1 IMEC / KHBO June 2004 Micro-electronics SystemC Dorine Gevaert.
EEE2243 Digital System Design Chapter 3: Verilog HDL (Combinational) by Muhazam Mustapha, January 2011.
Module 1.2 Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Winter-Spring 2001Codesign of Embedded Systems1 Debug and Trace Facilities in SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
Design & Co-design of Embedded Systems Data Types in SystemC Maziar Goudarzi.
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #10 – Introduction.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Digital System Projects
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Verilog hdl – II.
Design & Co-design of Embedded Systems Introduction to SystemC Maziar Goudarzi.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Introduction to Verilog
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
1 of 14 Ivan Ukhov Embedded Systems Laboratory Department of Computer and Information Science Linköping University TDDI08: Embedded Systems Design Introduction.
CIS 4930/6930 System-on-Chip Design Introduction to SystemC Hao Zheng Computer Science & Engineering U of South Florida.
Hardware Description Languages: Verilog
Tutorial 1 COEN691B.
Discussion 2: More to discuss
Hardware Description Languages: Verilog
SystemC for SoC Designs
Design Flow System Level
Behavioral Modeling in Verilog
Design Language 최기영 (서울대학교, 전기컴퓨터공학부) Copyrightⓒ2003.
The Verilog Hardware Description Language
Chapter 1 : SystemC Overview
EEE2243 Digital System Design Chapter 1: Verilog HDL (Combinational) by Muhazam Mustapha, February 2012.
Digital Designs – What does it take
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

1 Very Large Scale Integration II - VLSI II SystemC Gürer Özbek ITU VLSI Laboratories Istanbul Technical University

Outline Design of Big Digital Systems SystemC SystemC Fundamentals Coding Examples Conclusion

Design of Big Digital Systems Old Way – Hardware-like C/C++ Model – Simulated and – Given to Hardware Designers – Hardware Designers write VHDL/Verilog Model – Simulated and compared with C model – Synthesized

Design of Big Digital Systems Drawbacks of Old Way – Different Flow – Different Library – System Designers don’t know VHDL/Verilog – Hardware Designers don’t understand system design

Design of Big Digital Systems Desired Way – Single Model – Suitable for System-Level Modeling – Synthesizable – No manual conversion – and Synopsys Creates SystemC

SystemC What – Subset of C++: Class library Importance – Enables hardware and software co-design Advantages – More hardware-like wrt C/C++ – More system-level wrt VHDL/Verilog

SystemC Advantages (Cont’d) – Open Source – Runs on both C compilers & (most) HDL tools – Many abstraction levels from system level to cycle-accurate RTL – Rich set of data types and specifications – Brings new concepts to system-level modeling: Powersim

SystemC Fundamentals – Design Entity: SC_MODULE – Ports – Signals – Module Instantiation – Processes – Clocks – Data Types – Operators

SystemC Fundamentals Design Entity: SC_MODULE – Class in C++ – Building blocks of the design – Divide and Conquer – Like Module in Verilog

SystemC Fundamentals Design Entity: SC_MODULE SC_MODULE(module_name) { // Ports declaration // Signals declaration // Module constructor : SC_CTOR // Process constructors and sensitivity list // SC_METHOD // Sub-Modules creation and port mappings // Signals initialization // Process definition };

SystemC Fundamentals Ports – Defines interface of the module SC_MODULE(module_name) { sc_in in1, in2; sc_out out1, out2; sc_inout inout1, inout2; //… };

SystemC Fundamentals Signals – Carries information within a module SC_MODULE(module_name) { //ports declaration sc_signal s1,s2,s3; SC_CTOR(module_name) { //module instances that connect to signals } };

SystemC Fundamentals Module Instantiation – Submodules that called in a module SC_MODULE(module_name) { //ports declaration //signal decletation SC_CTOR(module_name) { Module_Type submodule1 (“label1”); Module_Type submodule2 (“label2”); submodule1.x(in1); submodule1.y(s1);//equivalent to submodule1 << in1 << s1; submodule2.x(s1); submodule2.y(out1); //equivalent to submodule2 << s1 << out1; } };

SystemC Fundamentals Processes – Functions of the Classes – Defines Functionality – Three types: SC_METHOD (Combinational) SC_THREAD (Testing) SC_CTHREAD (Sequential)

SystemC Fundamentals METHOD Processes – Models Combinational Logic – Triggered with what it is sensitive for – Cannot store data between invocations SC_MODULE(module_name) { //ports declaration //signal declaration SC_CTOR(module_name) { SC_METHOD (process_name); sensitive << in1 << in2 << in3; } //… Void process_name() { out.write = in1.read() + in2.read() - in3.read(); } };

SystemC Fundamentals THREAD Processes – Models functionality of testbench – Triggered with what it is sensitive for – Stores data between invocations – Suspendable with wait() – Reactivated with input change SC_MODULE(module_name) { //ports declaration //signal declaration SC_CTOR(module_name) { SC_THREAD (process_name); sensitive << in; // or nothing } //… Void process_name() { a_t = 12; b_t = 15; c_t = 11; wait(); //... } };

SystemC Fundamentals CTHREAD Processes – Models functionality of sequential circuit – Triggered with a clock edge – Stores data between invocations – Suspendable with wait() – Reactivated with a clock edge SC_MODULE(module_name) { //ports declaration //signal declaration SC_CTOR(module_name) { SC_CTHREAD (process_name, clock_name.pos()); } //… Void process_name() { out.write = in.read(); out_n.write = ~in.read(); } };

SystemC Fundamentals Clocks – Triggers SC_CTHREAD processes sc_clock clock_name(“clock_label”, period, duty_ratio, delay, initial_value);

SystemC Fundamentals Data Types – sc_bit, sc_logic: 0/10/1/X/Z – sc_int, sc_uint :1-64 bits – sc_bigint, sc_biguint :arbitrary size (>64) – sc_fixed, sc_ufixed:fixed point – sc_bv, sc_lv:vector form – And All C/C++ Data Types

Bitwise& (and)| (or)^ (xor)~ (not) Assignment=&=|=^= Equality==!= SystemC Fundamentals Operators for bits & logic

Bitwise~&|^>><< Arithmetics+-*/% Assignement=+=-=*=/=%=&=|=^= Equality==!= Relational<<=>>=>= Auto-Inc/Dec++-- Bit selection[x] ex: mybit = myint[7] Part selectrange() ex: myrange = myint.range(7,4) Concatenation(,) ex: intc = (inta, intb); SystemC Fundamentals Operators for fixed point types

SystemC Fundamentals Operators for vectors – Just assign “=” To a value To/from integer To/from sc_bv and sc_lv – Functions Reduction: and_reduction() or_reduction() xor_reduction() Conversion: to_string()

Coding Examples sc_bit x; sc_bv y; sc_bv z; sc_bv databus; sc_logic result; x = y[6]; y = z.range(0,7); result = databus.or_reduce(); cout << “bus = ” << databus.to_string();

Coding Examples 1-bit adder #include "systemc.h" SC_MODULE (BIT_ADDER) { sc_in a, b, cin; sc_out sum, cout; SC_CTOR(BIT_ADDER) { SC_METHOD (process); sensitive << a << b << cin; } void process() { sc_logic aANDb,aXORb,cinANDaXORb; aANDb = a.read() & b.read(); aXORb = a.read() ^ b.read(); cinANDaXORb = cin.read() & aXORb; sum = aXORb ^ cin.read(); cout = aANDb | cinANDaXORb; } };

Coding Examples Testbench #include "systemc.h" SC_MODULE (testbench) {sc_out A_p,B_p,CIN_p; sc_in SUM_p,COUT_p; SC_CTOR (testbench) { SC_THREAD (process); } void print() { cout << "At time " << sc_time_stamp() << "::"; cout << "(a,b,carry_in): "; cout << A_p.read() << B_p.read() << CIN_p.read(); cout << " (sum,carry_out): " << SUM_p.read(); cout << COUT_p.read() << endl; } void process() { //Case 1 A_p = SC_LOGIC_0; B_p = SC_LOGIC_0; CIN_p = SC_LOGIC_0; wait (5, SC_NS);//wait to set assert ( SUM_p == SC_LOGIC_0 ); assert ( COUT_p == SC_LOGIC_0 ); wait (10, SC_NS); print(); //Case 2 //… print(); sc_stop(); }

Coding Examples Main function #include "add1.cpp" #include "add1_tst.cpp" int sc_main(int argc, char* argv[]) { sc_signal A_s,B_s,CIN_s,SUM_s,COUT_s; BIT_ADDER adder1("BitAdder1"); adder1 << A_s << B_s << CIN_s << SUM_s << COUT_s; testbench test1("TestBench1"); test1 << A_s << B_s << CIN_s << SUM_s << COUT_s; sc_start(200,SC_NS); return(0); }

Coding Examples Simulation Output At time 15 ns::(a,b,carry_in): 000 (sum,carry_out): 00 At time 30 ns::(a,b,carry_in): 001 (sum,carry_out): 10 At time 45 ns::(a,b,carry_in): 101 (sum,carry_out): 01 … OR,

Summary Is a C++ Class Library Brings C/C++ and VHDL/Verilog together Eases Designing Process Less people use it Still more work to do Better tools are necessary We will wait and see…

References Stephen A. Edwards, (2001), SystemC, retrieved from: 02/presentations/systemc.ppt 02/presentations/systemc.ppt Silvio Veloso, SystemC Tutorial, retrieved from: bremen.de/risse/RST/WS03/SystemC/Tutorial.pptwww.weblearn.hs- bremen.de/risse/RST/WS03/SystemC/Tutorial.ppt John Moondanos, SystemC Tutorial, retrived from: s/l10-SystemC.pdf s/l10-SystemC.pdf

References Giammarini, M.; Conti, M.; Orcioni, S.;, "System-level energy estimation with Powersim," Electronics, Circuits and Systems (ICECS), th IEEE International Conference on, vol., no., pp , Dec doi: /ICECS Vahid, F., SystemC Simulation Tutorial. retrieved from VHDL to SystemC Converter. retrieved from lab.com/freeutils/vh2sc/vh2sc.htmlhttp:// lab.com/freeutils/vh2sc/vh2sc.html