HM-ES-th1 Les 7 Hardware/Software Codesign with SystemC.

Slides:



Advertisements
Similar presentations
Fractions VI Simplifying Fractions
Advertisements

Multiplying Powers Dividing Powers Zero ExponentsNegative.
Aviation Security Training Module 4 Design and Conduct Exercise II 1.
Reducing Fractions. Factor A number that is multiplied by another number to find a product. Factors of 24 are (1,2, 3, 4, 6, 8, 12, 24).
(x + 4)(x + 7) = x2 + 11x + 28 (x + 14)(x + 2) = x2 + 16x + 28
SoCks Hardware / Software Codesign Andrew Pearson Sanders DeNardi ECE6502 May 4, 2010.
UE SYSTEMC – Cours 2 Etude et modélisation dun processeur en SystemC
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
Copyright © 2005 Juniper Networks, Inc. Proprietary and Confidentialwww.juniper.net 1 BGP met Juniper Networks routers Architectuur en praktijk.
Real Application Testing Spreker: Datum: Patrick Munne, Senior Oracle DBA 17 april 2009.
Specially made for you Wat te doen in het leven What To Do In Life Be Calm Wees Kalm.
Console applicatie static void Main ( ) class Hallo { } { } Console. WriteLine("Hallo " + naam + "!" ); statische methodestatische methoden Console. WriteLine("Wat.
Vervolg C Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 1 Onderwerpen voor vandaag Dallas one-wire interface Opgave:
PH. pH =-log [ H + ] [ H + ]: de concentratie H + -ionen (in mol per liter) Voorbeeld: [ H + ] = 3, mol/l. Wat is de pH ? pH = - log 3,
Engels – Counting Leerjaar 1 Lesson 9 Counting schoolobjects.
Good morning :) Please write your name on your hand-out!
All Right! 1thv Unit 4 grammar 4.2. Hoe zet je in het Engels een woord in het meervoud?
VOORBLAD.
Introduction to Computer Science Robert Sedgewick and Kevin Wayne Copyright © Recursive GCD Demo public class.
Unicel DxH 800 & Unicel DxH SLidemaker Stainer Overview
© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
8 2.
Go with God Carolyn Arends. Farther than lands you have ever imagined Verder dan landen die jij ooit kunt bedenken Deeper than even the oceans of blue.
SC-CC Committee 11/26/02svcc-proposal-5.ppt - johnS 1 SV to C, C to SV Function Call Proposal Joao Geada, John Stickley.
SC-CC Committee 11/18/02svcc-proposal-2.ppt - johnS 1 SV to C, C to SV Function Call Proposal Joao Geada, John Stickley.
Slippery Slope
Constructeur Données membres, l’interface Nom du module half_adder.h // File : half_adder.h #include "systemc.h" SC_MODULE(half_adder) { sc_in a,b; sc_out.
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
High performance power conversion SUNDAY 2014 Micro-omvormers door Rudi Jonkman.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt WHILE.
Winter-Spring 2001Codesign of Embedded Systems1 Introduction to SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
Divisor máximo de dois inteiros. unsigned int gcd(unsigned int A, unsigned int B) { if (B > A) return gcd(B,A); else if (B==0) return A; else return gcd(B,A%B);}
Chapter 1 : SystemC Overview. What is SystemC Systemc is a modeling platform  A set C++ class library to add hardware modeling constructs  Simulation.
1/03/09 De 89 à 98. 1/03/09 De 89 à 98 1/03/09 De 89 à 98.
Where Do the 7 layers “fit”? Or, where is the dividing line between hdw & s/w? ? ?
Chapter II. THE INTEGERS
Computer Software Applications By YOUR NAME in YOUR TUTOR GROUP.
Chapter 5. SystemC 1.0 Main Purpose  Model RTL Instruments  Support diverse data type  Execute concurrently by using METHODs.
 Hulpwerkwoord:  Do I, you, they Do you like dancing? Does he/she/it Does she work? did (ovt) alle personen I, you, he, they.
HM-ES-th1 Les 8 Hardware/Software Codesign with SystemC.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 19: Recursion.
From Scenic to SystemC Mehrdad Abutalebi. Outline Introducing Scenic Scenic Implementation Modeling Reactivity A Simple example From Scenic to SystemC.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 19 Recursion.
UNIT - 1Topic - 3. Computer software is a program that tells a computer what to do. Computer software, or just software, is any set of machine-readable.
Cosc175/testing1 Testing Software errors are costly GIGO Preventing Errors –Echo checking –Range and limit checking –Defensive programming.
- 1 - EE898_HW/SW Partitioning Hardware/software partitioning  Functionality to be implemented in software or in hardware? No need to consider special.
Lecture 17: Modular Programming (cont) Debugging and Debuggers.
International Student Exchange Program Online Application Marije van den End, International Office 12 November 2015.
pictures_slideshow/article.htm.
Concepts of Algorithms CSC-244 Unit 5 and 6 Recursion Shahid Iqbal Lone Computer College Qassim University K.S.A.
Application: Algorithms Lecture 19 Section 3.8 Tue, Feb 20, 2007.
CSCI 125 & 161 Lecture 12 Martin van Bommel. Prime Numbers Prime number is one whose only divisors are the number 1 and itself Therefore, number is prime.
CIS 4930/6930 System-on-Chip Design Transaction-Level Modeling with SystemC Dr. Hao Zheng Comp. Sci & Eng. U of South Florida.
。 33 投资环境 3 开阔视野 提升竞争力 。 3 嘉峪关市概况 。 3 。 3 嘉峪关是一座新兴的工业旅游城市,因关得名,因企设市,是长城文化与丝路文化交 汇点,是全国唯一一座以长城关隘命名的城市。嘉峪关关城位于祁连山、黑山之间。 1965 年建市,下辖雄关区、镜铁区、长城区, 全市总面积 2935.
4 Starting Tips to Keep Your Car in Top Condition
Basic concepts of C++ Presented by Prof. Satyajit De
Chapter 19: Recursion.
Greatest Common Divisor
Greatest Common Divisor
Computer Science 101 While Statement.
تحليل الحساسية Sensitive Analysis.
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
Recursive GCD Demo public class Euclid {
Arie Vissers.
Introduction to System-Level Modeling in SystemC 2.0
Ordering Real Numbers 8.NS.2.
Divide 9 × by 3 ×
Presentation transcript:

HM-ES-th1 Les 7 Hardware/Software Codesign with SystemC

24 Als voorbeeld bekijken we een Single-Purpose Processor die de Greatest Common Divider uitrekent. We beginnen met een functional level SystemC model waarin het algoritme wordt beschreven. Van Algoritme naar RTL gcd x_i y_i r_o

25 SystemC Untimed Model Euclid's algorithm 300 BC template SC_MODULE(gcd) { sc_in x_i, y_i; sc_out r_o; SC_CTOR(gcd) { SC_METHOD(run); sensitive << x_i << y_i; } private: void run() { T x = x_i.read(); T y = y_i.read(); while (x != y) { if (x > y) { x -= y; } else { y -= x; } r_o.write(x); } };

26 SystemC Test Bench gcd x_i y_i r_0 tb_gcd x_oy_o r_i template SC_MODULE(tb_gcd) { sc_in r_i; sc_out x_o, y_o; SC_CTOR(tb_gcd) { SC_THREAD(run); } private: void check(const T& x, const T& y, const T& r) { wait(10, SC_NS); x_o.write(x); y_o.write(y); wait(10, SC_NS); assert(r_i.read() == r); } void run() { check(0, 0, 0); check(234, 96, 6); check(12345, 67891, 1); check(12345, 67890, 15); check(12345, 12345, 12345); wait(10, SC_NS); x_o.write(0); y_o.write(0); sc_stop(); //...

27 SystemC sc_main Nu kunnen we timing informatie aan het model toevoegen om te kijken of dit algoritme aan de timing eisen voldoet. int sc_main(int argc, char *argv[]) { gcd gcd("gcd"); tb_gcd tb_gcd("tb_gcd"); sc_buffer x, y, r; gcd.x_i(x); gcd.y_i(y); gcd.r_o(r); tb_gcd.x_o(x); tb_gcd.y_o(y); tb_gcd.r_i(r); sc_start(); return 0; }

template SC_MODULE(gcd) { // idem void run() { while(1) { wait(); T x = x_i.read(); T y = y_i.read(); wait(10, SC_NS); while (x != y) { if (x > y) { x -= y; } else { y -= x; } wait(10, SC_NS); } r_o.write(x); } }; 28 SystemC approximately-timed Voeg wait(…, SC_NS) statements toe!

29 SystemC approximately-timed template SC_MODULE(tb_gcd) { // idem void check(const T& x, const T& y, const T& r) { auto start_time_stamp = sc_time_stamp(); x_o.write(x); y_o.write(y); wait(); wait(10, SC_NS); assert(r_i.read() == r); auto end_time_stamp = sc_time_stamp(); cout << " << sc_time_stamp() << ": gcd(" << x << "," << y << ") = " << r << " duration: " << end_time_stamp - start_time_stamp << endl; }

30 Stel dat dit voldoet aan de timing specificaties. We maken nu een nauwkeuriger model door het clock signaal clk toe te voegen. We voegen meteen een go_i en done_o handshake signaal toe. Waarom? SystemC cycle accurate gcd go_ix_i y_i done_or_o clk

31 SystemC cycle accurate done_o x_i y_i go_i r_o gcd go_ix_i y_i done_or_o clk template SC_MODULE(gcd) { sc_in_clk clk; sc_in go_i; sc_in x_i, y_i; sc_out done_o; sc_out r_o; SC_CTOR(gcd) { SC_THREAD(run); sensitive << clk.pos();

32 SystemC cycle accurate void run() { wait(); while(1) { do { wait(); } while (!go_i.read()); T x = x_i.read(); T y = y_i.read(); wait(); while (go_i.read() && x != y) { if (x > y) { x -= y; } else { y -= x; } wait(); } if (go_i.read()) { r_o.write(x); done_o.write(true); } do { wait(); } while (go_i.read()); done_o.write(false); }

33 SystemC cycle accurate template SC_MODULE(tb_gcd) { sc_in done_i; sc_in r_i; sc_out go_o; sc_out x_o, y_o; SC_CTOR(tb_gcd) { SC_THREAD(run); sensitive << done_i; } private: void check(const T& x, const T& y, const T& r) { auto start_time_stamp = sc_time_stamp(); x_o.write(x); y_o.write(y); go_o.write(true); wait(); assert(r_i.read() == r); auto end_time_stamp = sc_time_stamp(); cout << " << sc_time_stamp() << ": gcd(" << x << "," << y << ") = " << r << " duration: " << end_time_stamp - start_time_stamp << endl; go_o.write(false); wait();

34 SystemC RTL Ga ervan uit dat de benodigde RTL componenten beschikbaar zijn (zie hand-outs). Ontwerp en implementeer Datapath en Controller.

35 Combinational components

36 Sequential components

37 single-purpose processor basic model controller and datapath controllerdatapath … … external control inputs external control outputs … external data inputs … external data outputs datapath control inputs datapath control outputs … … a view inside the controller and datapath controllerdatapath … … state register next-state and control logic registers functional units