1 Freeha Azmat Saba Zia Dec 02, 2008. Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2.

Slides:



Advertisements
Similar presentations
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
CDA 3100 Recitation Week 11.
COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Synchronous Sequential Logic
Table 7.1 Verilog Operators.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
//HDL Example 6-1 // //Behavioral description of //Universal shift register // Fig. 6-7 and Table 6-3 module shftreg.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Pulse-Width Modulated DAC
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Chapter 9: Hardware Description Languages
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Counters Discussion 12.1 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 14: SystemC (2/3) Prof. Sherief Reda Division of.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Introduction to VHDL (part 2)
SystemC: Introduction. SystemC  A C++ based class library and design environment for system-level design.  Suitable for functional description that.
From Scenic to SystemC Mehrdad Abutalebi. Outline Introducing Scenic Scenic Implementation Modeling Reactivity A Simple example From Scenic to SystemC.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
SystemC Tutorial Author: Silvio Veloso
Registers CPE 49 RMUTI KOTAT.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
SystemC and Levels of System Abstraction: Part I.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Modules and Processes in SystemC A Presentation by: Najmeh Fakhraie Mozhgan Nazarian-Naeini Hardware-Software Codesign Spring 2006.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Winter-Spring 2001Codesign of Embedded Systems1 Reactivity, Ports, and Signals in SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
1 Very Large Scale Integration II - VLSI II SystemC Gürer Özbek ITU VLSI Laboratories Istanbul Technical University.
Winter-Spring 2001Codesign of Embedded Systems1 Introduction to System-Level Modeling in SystemC 2.0 Part of HW/SW Codesign of Embedded Systems Course.
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.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
Winter-Spring 2001Codesign of Embedded Systems1 Debug and Trace Facilities in SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
CPE 626 The SystemC Language – VHDL, Verilog Designer’s Guide Aleksandar Milenkovic Web:
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Design & Co-design of Embedded Systems Introduction to SystemC Maziar Goudarzi.
 A test bench is an HDL program used for applying stimulus to an HDL design in order to test it and observe its response during simulation.  In addition.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
A Fast SystemC Engine D. Gracia Pérez LRI, Paris South Univ. O. Temam LRI, Paris South Univ. G. Mouchard LRI, Paris South Univ. CEA.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
CIS 4930/6930 System-on-Chip Design Transaction-Level Modeling with SystemC Dr. Hao Zheng Comp. Sci & Eng. U of South Florida.
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.
Logic Simulation 1 Outline –Logic Simulation –Logic Design Description –Logic Models Goal –Understand logic simulation problem –Understand logic models.
An Introduction to Verilog: Transitioning from VHDL
Tutorial 1 COEN691B.
Verilog Introduction Fall
Design Lab with SystemC
SystemC for SoC Designs
Design Flow System Level
332:437 Lecture 8 Verilog and Finite State Machines
The Verilog Hardware Description Language
Chapter 1 : SystemC Overview
332:437 Lecture 8 Verilog and Finite State Machines
Presentation transcript:

1 Freeha Azmat Saba Zia Dec 02, 2008

Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2

Installation on Linux Download System2.2 from Run following commands in terminal cd systemC-2.2 mkdir objdir cd objdir setenv CXX g++./configure Gmake debug Gmake instaal Gmake check Download dinotrace from tar xvf dinotrace*.tg*z cd dinotrace*./configure make # Test./dinotrace traces/ascii.tra make install 3

Introduction : System C : Is a C++ Library for system Level Modeling Supports various abstraction Layers System C is used for : Fast and efficient designs System verification

SystemC VS C++ Sequential Language Not suitable for complex and detailed systems Data Types are not suitable for Hardware Implementation Parallel Processing is possible Incorporate delays, Clocks or Time Data Types dedicated to Hardware modeling e.g bit, vector types as well as fixed point types. System C C ++

SystemC implementation Modules Processes Ports and Interfaces Channels

Modules : Is a C++ Class Encapsulates hardware /software description Any Modules has to be derived from the existing class sc_module. SystemC modules are analogous to verilog modules or VHDL entity / architecture pair. Modules communicate to other modules via ports.

Ports and Interfaces : Ports are defined as objects inside a module Publically available to the outside world through the use of public Keyword. Predefined Ports: sc_in<>,sc_out<>,sc_inout<>,sc_fifo_in<>,sc_fifo_out<> Example :sc_in clk; User Defined Ports are defined with the help of sc_port class Example:Sc_port, 1> clk;

Processes : Two kinds of Processes : SC_METHOD: cannot be suspended during its execution Once the execution of SC_METHOD as been performed it halts and waits for new activities on its sensitivity list Similar to Verilog always block SC_THREAD : Can be suspended during execution and resumed at a later stage SC_THREAD only executes once during simulation and then suspends Similar to Verilog initial Block

Channels : SystemC ‘s communication Medium. Modules communicate via ports and channels They are similar to Verilog wire and VHDL signal System C provides a exhaustive range of pre-defined channels for generic uses such as sc_signal. This Feature of language differentiate it from VHDL and Verilog

From Verilog to SystemC 11 module name(); // module functionality endmodule input A,B; output F; reg [3:0] G; clk) begin //process sensitive //to rising edge of clock //input end SC_MODULE(name) { //module functionality } sc_in A,B; sc_out F; sc_uint G; SC_CTOR(name) { //process to execute SC_METHOD(myfunc); //sensitive to clock sensitive<<clk.pos(); }

From Verilog to SystemC 12 add inst (.F(F),.A(A),.B(B) ); () begin end add inst; SC_CTOR(name):inst(“INST”) { inst.A(A); inst.B(B); inst.F(F); } SC_METHOD(myfunc); Initial begin end SC_THREAD (myfunc);

Counter 13 #include SC_MODULE(counter){ sc_in_clk clk; sc_in reset; sc_out > counter_out; sc_uint count; SC_CTOR(counter) { SC_METHOD(myfunc); sensitive<<clk.pos(); sensitive<<reset; } void myfunc() { count=0; if(reset.read()==1) counter_out.write(count); else count =count + 1; counter_out.write(count); cout<<counter_out.read()<<endl; } }; int sc_main(int argc,char *argv[]){ counter c("hello"); c.myfunc(); sc_start(); return(0); } module counter(clk,reset,counter_out); input clk; input reset; output [3:0]counter_out; reg [3:0]counter_out; clk or negedge reset) begin if(!reset) counter_out<=0; else counter_out<=counter_out + 1; end endmodule

Complete SystemC Model 14 REF: REF:Introduction to SystemC by Deian Tabakov Rice University Houston, TX

Stimulus Generator 15 /************************stimulus.h *********************/ #include "systemc.h" SC_MODULE(stim) { sc_out A, B; sc_in Clk; void StimGen() { A.write(false); B.write(false); wait(); // wait for the next clock tick A.write(false); B.write(true); wait(); // wait for the next clock tick... sc_stop(); // notify kernel to stop simulation } SC_CTOR(stim) { SC_THREAD(StimGen); sensitive << Clk.pos(); } }; REF: REF:Introduction to SystemC by Deian Tabakov Rice University Houston, TX

Monitor 16 /************************monitor.h *********************/ #include "systemc.h" SC_MODULE(mon) { sc_in A, B, F; sc_in_clk Clk; void Monitor() { while(1) { wait(); cout << sc_time_stamp() << "\t " << A.read() << " " << B.read() << " " << F.read() << endl; } SC_CTOR(mon) { SC_THREAD(Monitor); sensitive << Clk.pos(); cout << "Time\t A B F" << endl; } }; REF: REF:Introduction to SystemC by Deian Tabakov Rice University Houston, TX

Complete XOR Model 17 #include "stim.h" #include "exor.h" #include "mon.h“ int sc_main(int argc, char* argv[]) { sc_signal ASig, BSig, FSig; sc_clock TestClk("TestClock", 10, SC_NS, 0.5); stim Stim1("Stimulus"); mon Monitor1("Monitor"); Stim1.A(ASig); Monitor1.A(ASig); Stim1.B(BSig); Monitor1.B(BSig); Stim1.Clk(TestClk); Monitor1.F(FSig); Monitor1.Clk(TestClk); exor DUV("exor"); DUV.A(ASig); DUV.B(BSig); DUV.F(FSig); sc_start(); // run forever return 0; } REF: REF:Introduction to SystemC by Deian Tabakov Rice University Houston, TX

Simulation in Terminal 18 REF: REF:Introduction to SystemC by Deian Tabakov Rice University Houston, TX