Professional Documents
Culture Documents
UML SystemC PDF
UML SystemC PDF
Pao-Ann Hsiung
Department of Computer Science & Info. Eng.
National Chung Cheng University
Chiayi, Taiwan, ROC.
http://www.cs.ccu.edu.tw/~pahsiung/
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
2
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
3
Introduction
4
Introduction
5
Why UML? Why SystemC?
6
Why UML? Why SystemC?
Why SystemC?
Can implement HW and SW and interfaces
Multiple abstraction levels
Executable (directly simulatable)
Reuse of large base of C/C++ reference
implementations (JPEG, MPEG, …)
Synthesizable
Under some restrictions
Synopsys System Studio
7
UML versus SystemC?
8
UML versus SystemC
2.1 2.0
9
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
10
UML/SystemC-based
SoC Codesign Flows
Several design flows have been proposed by
several different organizations and research
results
Our classification
UML Extension-based Design Flow
NUS, NEC (ACES), Alcatel (OWL), Fujitsu (SLOOP)
UML Profile-based Design Flow
STMicro, Fujitsu, U.Catania (Italy)
Platform Model-based Design Flow
INRIA (Gaspard2, France), U. Applied Sci Mittweida,
Freiberg U. (MOCCA, Germany)
11
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
12
UML Extension-based Design Flows
Class Diagram
15
UML Ext-based Flow (1)
Statechart
16
UML Ext-based Flow (1)
SystemC Block Diagram
17
UML Ext-based Flow (1)
18
UML Ext-based Flow (2)
Models Used:
NUS • Class Diagram
Version • Statecharts
(2) • Structure Diag.
Tools Used:
• Rose RT
• RT2SystemC
• Synopsys
System Studio
NUS: RTSS’2004, uSoC’2004, ASPDAC’2005 19
U. Lugano
UML Ext-based Flow (3) NEC
20
UML Ext-based Flow (3) Functional
Specification
21
UML Ext-based Flow (3)
Models used
Object Model Diagram
State Diagram
Sequence Diagram
Tools used
front-end tools (self-developed)
Rhapsody
Translator, Code Generator
Back-end tools
CYBER, CysimGen, Classmate, C compiler
22
UML Ext-based Flow (3)
Object Model Diagram
HW-SW
Partitioning
23
UML Ext-based Flow (3)
State Diagram for Module AveControl
24
UML Ext-based Flow (3)
Sequence Diagram
25
UML Ext-based Flow (3)
26
UML Ext-based Flow (4)
27
UML Ext-based Flow (4)
28
UML Ext-based Flow (4)
29
UML Ext-based Flow (5)
SLOOP (System-Level design with OO Process)
SLOOP employs
four models to
develop SoC
incrementally
before software
and hardware
implementation
30
UML Ext-based Flow (5) 4 Models
used in
SLOOP
Conceptual Model
To grasp functional and nonfunctional
requirements
Functional Model
Computation and communication workloads
Architectural Model
Processing and communication resources
Performance Model
Maps: process Æ processing resources,
communication Æ communication resources
31
UML Ext-based Flow (5)
Realizing each model
Modeling phase: specifies results of analysis and
design using UML
Implementation phase: implements the UML model
into C++/SystemC as an executable model
32
UML Ext-based Flow (5)
Tools used:
ObjecTime ROOM
Rose RT
UML Extensions
Module
Port
Interface
Channel
33
UML Ext-based Flow (5) — A Case Study
34
Conceptual Model
35
Functional Model
36
Executable Functional Model
37
Computation Workload and
Communication Workload
38
Architectural Model
Modeled using deployment diagram of UML
39
Performance Model
40
Performance Model (Cont.)
41
Performance Evaluation Metric
Performance metric
=> Throughput (frames per second)
Requirement of performance
=> 30 frames per second
42
Experiment 1
43
Utilizations of Modules in Experiment 1
44
Utilization of Channels in Experiment 1
45
Experiment 2
46
Experiment 3
47
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
48
UML Profile-based Design Flow
49
UML Profile-based Design Flow
Defining a SystemC Profile in UML
•UML lacks a set of Provide stereotypes for the
predefined data types– most commonly used
reuse the ones from constructs–«module»,
SystemC (and C++) – «process», «port»
define your own datatypes
50
UML Profile-based Design Flow
A Simple Example
int sc_main(int, char*[]) {
// declare channel
sc_fifo<int> fifo(10);
// instantiate blocks
writer w(”writer”);
reader r(”reader”);
// connect to channel
w.out (fifo);
r.in (fifo);
51
UML Profile-based Design Flow
A SystemC Metamodel
WiSME’2004, DATE’2005 52
UML Profile-based Design Flow
WiSME’2004, DATE’2005 53
UML Profile-based Design Flow
WiSME’2004, DATE’2005 54
55
56
Conventional SoC Design Flow
WiSME’2004, DATE’2005 57
UML Profile-based Design Flow
WiSME’2004, DATE’2005 58
UML Profile-based Design Flow
WiSME’2004, DATE’2005 59
UML Profile-based Design Flow
class write_if : virtual public sc_interface {
public:
virtual void write(char) = 0;
virtual void reset() = 0; };
class read_if : virtual public sc_interface {
public:
virtual void read(char &) = 0;
virtual int num_available() = 0; };
read_write_if.h 60
UML Profile-based Design Flow
#include "read_write_if.h"
class producer: public sc_module {
public:
sc_port<write_if> out;
void main();
SC_HAS_PROCESS(producer);
producer(sc_module_name mn): sc_module(mn)
{ SC_THREAD(main); } };
producer.h
61
UML Profile-based Design Flow
#include "producer.h"
void producer::main() {
const char *c = "Visit www.systemc.org\n";
out->reset();
while (*c)
out->write(*c++); }
producer.cpp
62
UML Profile-based Design Flow
// file fifo.h
#include "read_write_if.h"
class fifo : public sc_channel, public write_if,
public read_if {
public:
fifo(sc_module_name mn): sc_channel(mn) {
num_elements = first = 0; }
void write(char);
void reset();
void read(char&);
int num_available();
private:
enum e { max = 10 };
char data[max];
int num_elements, first;
sc_event write_event, read_event;
};
fifo.h 63
UML Profile-based Design Flow
// file fifo.cpp
#include "fifo.h"
void fifo::write(char c) {
if(num_elements == max)
wait(read_event);
data[(first+num_elements)%max] = c;
++ num_elements;
write_event.notify(); }
void fifo::read(char& c){
if(num_elements == 0)
wait(write_event);
c = data[first];
-- num_elements;
first = (first + 1) % max;
read_event.notify(); }
void fifo::reset() { num_elements = first = 0; }
int fifo::num_available() { return num_elements;}
fifo.cpp 64
UML Profile-based Design Flow
class top: public sc_module
{
public:
top.cpp fifo * fifo_inst; //a fifo instance
producer * producer_inst; //a producer instance
consumer * consumer_inst; //a consumer instance
top(sc_module_name mn):sc_module(mn) {
fifo_inst = new fifo("Fifo1");
producer_inst= new producer("Producer1");
consumer_inst= new consumer("Consumer1");
producer_inst->out(*fifo_inst);
consumer_inst->in(*fifo_inst);
}
};
65
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
66
Platform Model-based Design Flow
67
Platform Model-based Design Flow
Y-Model
& TLM
& RTL
INRIA DART
68
Application PIM
70
Application PIM Example
71
Hardware Architecture PIM
72
HW Architecture PIM
(Classification Refinement)
73
HW Architecture PIM: Example
74
HW Architecture PIM:
Repetitive Component Example
75
Association PIM
76
Model to Model Transformation
77
Model to Model Transformation
Gaspard2:
An IDE for
SoC visual
co-modeling
(INRIA
DART)
80
Platform Model-based Design Flow (RTR)
82
MOCCA: FDL’2003, uSoC’2004, MoDES’2004
Platform Model-based Design Flow (RTR)
83
MOCCA
UML 2.0 Model Compiler
Automated transition from platform
independent application design to
platform specific implementation
Automated Design Partitioning
Support for partially or completely
manually specified partitioning
Estimation of Execution and
Implementation characteristics
Type and Message Analysis
Scheduling, Allocation, Binding
Branch Prediction
Automated Synthesis of Platform
Dependent Implementation
RTR-Manager and Broker
84
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
85
Conclusions
86
Contents
Introduction
UML/SystemC-based SoC Codesign Flows
UML Extension-based Design Flows (x 5)
UML Profile-based Design Flows (x 1)
Platform Model-based Design Flows (x 2)
Conclusions
References
87
References (Ext-based, NUS)
88
References (Ext-based, ACES, OWL,
SLOOP)
M. Lajolo, NEC Laboratories, USA, M. Prevostini, University of
Lugano, Switzerland, “UML in an Electronic System Level Design
ACES Methodology,” International Workshop on UML for SoC Design
(uSoC), DAC’2004 workshop, USA.
Y. Vanderperren, G. Sonck, P. van Oostende, M. Pauwels, W.
Dehaene, T. Moore, “A Design Methodology for the Development
OWL of a Complex SoC using UML and Executable System Models,”
Forum on Specification and Design Languages (FDL), Marseille,
France, September 2002.
Q. Zhu, A. Matsuda, M. Shoji, “An Object-Oriented Design
Process for System-on-Chip using UML,” 15th International
Symposium on System Synthesis (ISSS), Kyoto, Japan, October
2002.
SLOOP
89
References (Profile-based, Italy, STM)
90
References (Platform-based, INRIA,
MOCCA)
P. Boulet, A. Cuccurru, J.-L. Dekeyser, C. Domoulin, P. Marquet, M.
Samyn, R. De Simone, G. Siegel, T. Saunier, “MDA for SoC Design:
INRIA UML to SystemC Experiment,” International Workshop on UML for
SoC Design (uSoC), June 2004.
T. Beierlein, D. Fröhlich, B. Steinbach, “UML-based Co-design for
Run-Time Reconfigurable Architectures,” Forum on Specification
and Design Languages (FDL), Germany, September 2003.
T. Beierlein, D. Fröhlich, B. Steinbach, “UML-Based Development of
Applications for Run-Time Reconfigurable Architectures,”
International Workshop on UML for SoC Design (uSoC), June 2004.
T. Beierlein, D. Fröhlich, B. Steinbach, “Model-Driven Compilation of
UML-Models for Reconfigurable Architectures,” 2nd RTAS
Workshop on Model-Driven Embedded Systems (MoDES), Toronto,
Canada, May 2004.
MOCCA
91
Links
92