SpecC Language Tutorial 1 The SpecC Language Rainer Dömer Center for Embedded Computer Systems University of California, Irvine http://www.cecs.uci.edu/~specc/ Copyright 2001 R. Dömer The SpecC Language 2 Outline • Introduction • The SpecC model • System-level language requirements • The SpecC language • The SpecC methodology • Design example • Summary and conclusion
25
Embed
The SpecC Language - CECSspecc/language.pdf · The SpecC Language • ANSI-C • Program is set of functions • Execution starts from function main() • SpecC • Program is set
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SpecC Language Tutorial
1
The SpecC Language
Rainer DömerCenter for Embedded Computer Systems
University of California, Irvinehttp://www.cecs.uci.edu/~specc/
Copyright 2001 R. DömerThe SpecC Language 2
Outline
• Introduction• The SpecC model• System-level language requirements• The SpecC language• The SpecC methodology• Design example• Summary and conclusion
SpecC Language Tutorial
2
Copyright 2001 R. DömerThe SpecC Language 3
Introduction
• System-on-Chip (SOC) design• Increase of design complexity
1E0
1E1
1E2
1E3
1E4
1E5
1E6
1E7
Number of componentsLevel
Gate
RTL
Algorithm
System
Transistor
Ab
stra
ctio
n
Acc
ura
cy
Copyright 2001 R. DömerThe SpecC Language 4
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 componentsLevel
Gate
RTL
Algorithm
Transistor
Ab
stra
ctio
n
Acc
ura
cy
SpecC Language Tutorial
3
Copyright 2001 R. DömerThe SpecC Language 5
Outline
• Introduction• The SpecC model• System-level language requirements• The SpecC language• The SpecC methodology• Design example• Summary and conclusion
Copyright 2001 R. DömerThe SpecC Language 6
The SpecC Model
• Traditional model
• Processes and signals• Mixture of computation and communication• Automatic replacement impossible
s2
s1
s3
P1 P2
SpecC Language Tutorial
4
Copyright 2001 R. DömerThe SpecC Language 7
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
P1 P2
B2
v2
v1
v3
B1C1
Copyright 2001 R. DömerThe SpecC Language 8
The SpecC Model: Protocol Inlining
• Specification model• Exploration model
• Computation in behaviors• Communication in channels
B2
v2
v1
v3
B1C1
SpecC Language Tutorial
5
Copyright 2001 R. DömerThe SpecC Language 9
The SpecC Model: Protocol Inlining
• Specification model• Exploration model
• Computation in behaviors• Communication in channels
• Implementation model
• Channel disappears• Communication inlined into behaviors• Wires exposed
B2
v2
v1
v3
B1C1
B2B1
v2
v1
v3
Copyright 2001 R. DömerThe SpecC Language 10
The SpecC Model: Plug-and-Play
• Computation IP: Adapter model
B
replacableat any time
Synthesizablebehavior
T
Transducer
v2
v1A
Adapter
IP
IP
SpecC Language Tutorial
6
Copyright 2001 R. DömerThe SpecC Language 11
The SpecC Model: Plug-and-Play
• Computation IP: Adapter model
T
v2
v1
IPA
B
replacableat any time
Synthesizablebehavior
Transducer Adapter IP
• Protocol inlining with adapter
B1
v2
v1
IPA
before
B1
v2
v1
IP
after
Copyright 2001 R. DömerThe SpecC Language 12
IP protocol channel in wrapper
C2
The SpecC Model: Plug-and-Play
• Communication IP: Channel with wrapper
replacableat any time
Virtual channel
v2
v1
v3
C1
IP
SpecC Language Tutorial
7
Copyright 2001 R. DömerThe SpecC Language 13
The SpecC Model: Plug-and-Play
• Communication IP: Channel with wrapper
replacableat any time
Virtual channel IP protocol channel in wrapper
v2
v1
v3
IP
• Protocol inlining with hierarchical channel
B1 B2
v2
v1
before
v2
v1
B1 B2
after
C1 C2
Copyright 2001 R. DömerThe SpecC Language 14
Outline
• Introduction• The SpecC model• System-level language requirements• The SpecC language• The SpecC methodology• Design example• Summary and conclusion
SpecC Language Tutorial
8
Copyright 2001 R. DömerThe SpecC Language 15
System-level Language Goals
• Executability• Validation through simulation
• Synthesizability• Implementation in HW and/or SW• Support for IP reuse
Copyright 2001 R. DömerThe SpecC Language 16
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
SpecC Language Tutorial
9
Copyright 2001 R. DömerThe SpecC Language 17
System-level Language Requirements
BehavioralhierarchyStructuralhierarchy
Concurrency
Synchronization
Exceptionhandling
Timing
StatetransitionsCompositedata types
SpecCharts
Statecharts
HardwareC
Verilog
VHDLJava
C++CSpecC
not supported partially supported supported
Copyright 2001 R. DömerThe SpecC Language 18
Outline
• Introduction• The SpecC model• System-level language requirements• The SpecC language• The SpecC methodology• Design example• Summary and conclusion
SpecC Language Tutorial
10
Copyright 2001 R. DömerThe SpecC Language 19
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
Copyright 2001 R. DömerThe SpecC Language 20
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
SpecC Language Tutorial
11
Copyright 2001 R. DömerThe SpecC Language 21
The SpecC Language
• ANSI-C• Program is set of functions• Execution starts from
function main()
/* HelloWorld.c */
#include <stdio.h>
void main(void){ printf(“Hello World!\n”); }
Copyright 2001 R. DömerThe SpecC Language 22
The SpecC Language
• ANSI-C• Program is set of functions• Execution starts from