0% found this document useful (0 votes)
29 views16 pages

Introduction To Systemc: Damien Hubaux - Cetic

This document introduces SystemC, an alternative for system modeling and synthesis. It discusses that SystemC is a C++ library that implements hardware concepts to allow modeling at different levels of abstraction. The document outlines SystemC's advantages as being based on the widely used C++ language and having an open-source reference implementation. Potential drawbacks and future perspectives are also mentioned.

Uploaded by

Mitesh Khadgi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views16 pages

Introduction To Systemc: Damien Hubaux - Cetic

This document introduces SystemC, an alternative for system modeling and synthesis. It discusses that SystemC is a C++ library that implements hardware concepts to allow modeling at different levels of abstraction. The document outlines SystemC's advantages as being based on the widely used C++ language and having an open-source reference implementation. Potential drawbacks and future perspectives are also mentioned.

Uploaded by

Mitesh Khadgi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

www.cetic.

be

Introduction to SystemC

Damien Hubaux - CETIC

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

Why SystemC?

www.cetic.be

Needs
Increasing complexity, gate number, simulation time, verification effort, hw/sw co-design, etc.

Why SystemC What is SystemC


- Language - C++ Library

Context of new languages / tools:


Verification languages (PSL, sugar, vera), High-level synthesis (Handel-C, Precision C, behavioural synthesis, etc).

Advantages Drawbacks Perspectives

Common C/C++ modeling


Several event-based C/C++-based simulators exist(ed): in-house, Cynlib, SpeC, Ocapi Common effort, common language -> SystemC Need for standardisation

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

Why SystemC?

www.cetic.be

EDA developers
Small market (compared to SW) Base a new language on an existing widely used language

Why SystemC What is SystemC


- Language - C++ Library

Rely on existing tools Focus on EDA specificity

Advantages Drawbacks Perspectives

Common interest from several companies


Contributions from existing internal technologies (Synopsys, CoWare, Adelante Technologies (was: Frontier Design)) Now extended to others

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

What is SystemC?

www.cetic.be

OSCI: Open SystemC Initiative OSCIs Language Reference Manual (LRM)

Why SystemC What is SystemC


- Language - C++ Library

A Hardware Description language A C++ library that implements hardware concepts (clock, ports, concurrency, etc)

Advantages Drawbacks Perspectives

The reference implementation of this language


Reference!!! (one of the possible...) Open-source, freely available

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

What is SystemC?

www.cetic.be

Associated libraries (from OSCI)


Extension are possible Master-Slave library: abstract communications Verification library: offers to SystemC more verification features (assertion, introspection, etc.)

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Contributions of the OSCI working groups


Language Transaction Level Modeling Verification Synthesis

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

What is SystemC?

www.cetic.be

There are (have been) 2 (successive) "opinions" about SystemC RTL modeling using C++
What is the benefit compared to my favourite HDL? (Looks suspect to HW designers)

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

System level modeling


Between system (C++, Matlab, etc), software, and hardware designers (HDL)
C/C++ is possible RTL is possible Everything between Mixing algorithmic and RTL Mixing HW and SW

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

A Hardware Description Language

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

You can write (RTL) SystemC without really knowing C++ Let's make a short comparison: VHDL / SystemC
ENTITY Mouse IS SC_MODULE(Mouse)

Advantages Drawbacks Perspectives

PROCESS Phone (ring)

SC_METHOD(Phone); sensitive<<ring;

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

Declaration
entity my_module is [ports] end my_name SC_MODULE(my_module) { [ports] [signals] [modules] [processes (decl.)] SC_CTOR(my_module){ [processes (sensitivity)] } };

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

architecture my_arch of my_module is [components] [types] [signals] begin [processes (all)] [combinatorial] end

[processes (implementation)]

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

10

Entity / Ports
entity my_name is port( ... [ports] ); end my_name SC_MODULE(my_name) { [ports] };

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

port ( input: port1 std_logic; output: port2 std_logic; );

{ sc_in<bool> port1; sc_out<bool> port2; ... };

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

11

Hierarchy
architecture my_arch of my_module is component child port(...); end component; Begin child_inst : child port map( in => signal1; ... ); ...

www.cetic.be

#include "child.h" //decl SC_MODULE(my_module) { child* child_inst; SC_CTOR{ child_inst = new child; child_inst.in->(signal1); ... } };

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

12

Processes
process my_process (clk, reset) if (reset) ... elseif(clk'event and clk=='1') ... endif void my_process(); SC_CTOR(){ SC_METHOD(my_process); sensitive_pos<<clk; sensitive<<reset; }

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

void my_process() { if (reset==1) ...; else ...; end; }

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

13

Data types / Assignment


bit std_logic std_logic_vector (X dowto 0) unsigned (X dowto 0) signal my_sig: ...; ... bool or sc_bit sc_logic sc_lv[X] sc_uint<X> sc_signal<...> my_sig; ...

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Enumeration Integer Floating-point Physical Array

Advantages Drawbacks Perspectives

my_var1 := my_var2; my_sig1 <= my_sig2;

my_var1 = my_var2; my_sig1 = my_sig2; my_sig1.write(my_sig2);


Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

14

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

15

A C++ library

www.cetic.be

Classes that implement hardware datatypes and concepts A simulation kernel: registering functions in order to allow "parallel" execution. Possibility to extend with own datatypes, concepts
Support for own methodology Support for own libraries Support all C/C++ you want

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

16

A C++ libray
Some C++ constructs are replaced by macro's The module properties and functions are in fact inherited. HDL: access through ports C++: member access

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

SC_MODULE(my_module) { SC_CTOR(my_module){}; };

Advantages Drawbacks Perspectives

class my_name: public sc_module { public: my_module():sc_module() {...}; };

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

17

SystemC internal: sc_object


http://www.iro.umontreal.ca/~chareslu/systemc-2.0.1/
www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

18

SystemC internal: sc_signal<T>

www.cetic.be

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

19

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

20

SystemC advantages

www.cetic.be

Open-source reference implementation


OSCI released not only the LRM, but an opensource reference implementation that everyone can freely download and use.

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Some (open-source) software development tools allow to create a HW simulation environment


Simulation = compile a C++ program Large number of software development tools, from vendors and Open-source (but need more discussion: later)

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

21

SystemC advantages

www.cetic.be

C++ library / Object-Oriented


Can add own data types Can add own library in order to support own methodology Allows more than RTL. You can use all C++ you want (not for synthesis) SystemC capabilities can be extended. There are add-on libraries:
Master-Slave: an abstract communication scheme Verification: add assertion based verification to SystemC

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Verification
System testbench can be applied at each level of abstraction

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

22

SystemC advantages

www.cetic.be

Standard
Exchange models with "Hardware" behaviour
hierarchy Data-types clock / timed etc

Why SystemC What is SystemC


- Language - C++ Library

Synthesisable subset
It is possible to synthesise from SystemC code, but only from the RTL subset. It is possible to use a SystemC to VHDL/Verilog converter and to build a design flow above current RTL design flow

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

23

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

24

SystemC drawbacks

www.cetic.be

Synthesis
Tool support, model availability, etc

Why SystemC What is SystemC


- Language - C++ Library

Some awkward constructs


Data-type conversion, casts

Compilation / runtime errors:


C++ show-up! Obscure messages, core dump, etc. SystemC syntax checking would be better than C++ syntax checking

Advantages Drawbacks Perspectives

Debugging
Tools debug C++, not SystemC

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

25

SystemC drawbacks

www.cetic.be

SystemC : C++ faster than VHDL?


If you make high level simulation: Yes
(methodology is different, comparison is not fair)

Not guaranteed with RTL code


Why SystemC What is SystemC
- Language - C++ Library

Beware that the OSCI reference simulator is not optimised for speed -> vendor SystemC kernel?

Advantages Drawbacks Perspectives

Some limitations
No dynamic instantiation of modules (logic from a purely hardware point of view)

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

26

SystemC drawbacks

www.cetic.be

Adoption?
There are alternatives:
Modified HDL: SystemVerilog Other C based languages: Handel-C Direct C synthesis Other high level languages: pure C++, Matlab Other verification languages

Why SystemC What is SystemC


- Language - C++ Library

Better acceptation in Europe


SystemVerilog better accepted in USA

Advantages Drawbacks Perspectives

Not a lot of success stories


Did someone succeeded to do what I want to do with SystemC? High level modeling? Co-design? Synthesis?

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

27

Outline

www.cetic.be

Why SystemC? What is SystemC?


A language A C++ library

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

28

Perspectives

www.cetic.be

Tools
EDA use custom languages, custom tools SystemC allows to rely heavily on software tools (compare number of HDL users to software users)

Why SystemC What is SystemC


- Language - C++ Library

Ex: Eclipse IDE


A free OO IDE: common facilities built-in (user interface, file handling, editor, CVS, etc) Allows to add custom HDL support (parser, etc) HDL specific tools remain (synthesis, ad-hoc modeling, verification and methodology)

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

29

Perspectives

www.cetic.be

CASE tools
Versionning (also works with VHDL) Documentation: generate (HTML) documentation from code UML: standard graphical representation UML: coding rules, partial C++ code generation
State machines Classes Sequence diagrams Structured classes (new in UML2)

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

30

Perspectives

www.cetic.be

SystemC is C++ but codesign (HW-SW) is not trivial: you have to set-up your how methodology (but easier with a single language) Extended synthesisable subset
Templates Inheritance

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Use / Adoption
See Doulos survey...

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

31

Follow up

www.cetic.be

Conclusion?
first see other presentations...

Why SystemC What is SystemC


- Language - C++ Library

Advantages Drawbacks Perspectives

Supported by the European Union (ERDF) and the Walloon Region (DGTRE)

February 12, 2004

SystemC, an alternative for system modeling and synthesis?

32

You might also like