0% found this document useful (0 votes)
81 views

SystemC Schuster

SystemC is an open-source C++ library used for modeling digital systems at multiple levels of abstraction. It provides constructs for modeling concurrent hardware and software components as modules that communicate through ports and signals. Modules contain processes that define concurrent behavior and can be sensitive to events. There are different types of processes like method and thread processes. SystemC allows executable specification of systems from transaction to register-transfer level and enables system-level design and IP exchange.

Uploaded by

Gagan Chopra
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)
81 views

SystemC Schuster

SystemC is an open-source C++ library used for modeling digital systems at multiple levels of abstraction. It provides constructs for modeling concurrent hardware and software components as modules that communicate through ports and signals. Modules contain processes that define concurrent behavior and can be sensitive to events. There are different types of processes like method and thread processes. SystemC allows executable specification of systems from transaction to register-transfer level and enables system-level design and IP exchange.

Uploaded by

Gagan Chopra
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/ 18

SystemC

SystemC
Alexandra Schuster
Vienna University of Technology

4. Juni 2007

SystemC

Table of contents
1 Introduction

SystemC Design Flow Synthese


2 Concepts and syntax of SystemC

Modules Ports and Signals Process Confrontation Advantages


3 Reference

SystemC Introduction

History

SystemC was rst announced 1999 as a open source project SystemC V1.0 was released on March 2000
it provided modeling constructs similar to those used for RTL

SystemC V2.0 was released on Februar 2001


it enabled system level modeling and IP exchange

The actual Version of SystemC is 2.1 Since December 2005: IEEE 1666 standard

SystemC Introduction

Purpose of SystemC

Today, problems arise from the use of dierent design languages, incompatible tools and fragmented tool ows SystemC is entirley based on C++ The creation of a system-level model is possible with SystemC and standard C++ development tools SystemC provides hardware and software development team with an executable specication of the system

SystemC Introduction SystemC Design Flow

Model types

System Architectural Model


executable specications - describe software and hardware

System Performance Model


executable specications with time response - describe software and hardware

Transaction Level Model (TLM)


executable specications - only for hardware

Functional Model
one level higher than TLM and is used for runtime performance

Register Transfer Level Model (RTL)

SystemC Introduction SystemC Design Flow

SystemC Design Flow

SystemC Introduction Synthese

Synthese

Take care, some data types, loops and so on are not synthesizable
oat, double, loops with no constant boundary, pointer, I/O-Streams, SC THREAD,...

SystemC Concepts and syntax of SystemC

Library Overview

SystemC Concepts and syntax of SystemC

Data Types
sc bit sc logic sc int sc uint sc bigint sc biguint sc bv sc lv sc xed sc uxed sc x sc ux 2-valued single Bit (0,1) 4-valued single Bit (0,1,X,Z) 1 to 64 Bit signed integer 1 to 64 Bit unsigned integer arbitrary precision signed integer arbitrary precision unsigend integer vector of sc bit vector of sc logic templated signed xed point type templated unsigend xed point type templated signed xed point type templated unsigned xed point type

SystemC Concepts and syntax of SystemC

Fixed Point Types

Floating point operations are seldom used in hardware because it consumes to many hardware resources. Typical example for the use of xed point type: DSP applications sc xed and sc uxed are setup at compile time and do not change. sc x and sc ux can use variables to determine word length, integer word length, ...

SystemC Concepts and syntax of SystemC Modules

Modules

Modules are the basic building blocks for partitioning a design Modules allow designers to hide internal data representation and algorithms Therefore, designers are forced to use public interfaces to other modules Modules can contain
ports processes internal data hierarchically other modules

SystemC Concepts and syntax of SystemC Modules

Modules

Modules are declared with the SystemC keyword SC MODULE, e.g.: SC MODULE(nameOfModule); The module is initiated by the constructor SC CTOR, e.g.: SC CTOR(nameOfModule);

SystemC Concepts and syntax of SystemC Ports and Signals

Ports and Signals

Ports of a module are the external interface that pass information to and from a module, and trigger actions within the module. Modes of operation:
Input (sc in porttype ) Output (sc out porttype ) In- and Output (sc inout porttype )

Signals create connections between module ports allowing modules to communicate.


A signal is declared with the keyword sc signal.

SystemC Concepts and syntax of SystemC Process

Processes
Processes provide the mechanism for simulating concurrent behavior A process is a member function of a module and called whenever signals, this process is sensitive to, change value Types of processes:
method process (SC METHOD)
A SC METHOD process is triggered by events. These events must be declared in the sensitive list

thread process (SC THREAD)


A SC THREAD process can be suspended by the wait() function and reactivated by the occurence of an event. The process continues to execute until the next wait().

SystemC Concepts and syntax of SystemC Process

Example of a process
1 2 3 4 5 6 7 8 9 10 11 12 13

SC MODULE( Adder ) { s c i n <i n t > a; s c i n <i n t > b; s c o u t <i n t > c ; v o i d compute ( ) { c = a + b; } SC CTOR( Adder ) { SC METHOD( compute ) ; s e n s i t i v e << a << b ; } };

SystemC Concepts and syntax of SystemC Confrontation

VHDL vs. SystemC Example


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 library ieee ; use i e e e . s t d l o g i c 1 1 6 4 . a l l ; use i e e e . s t d l o g i c u n s i g n e d . a l l ; entity counter i s port ( clock : in s td lo gi c ; load : in s td lo gi c ; reset : in s td lo gi c ; din : i n s t d l o g i c v e c t o r ( 7 downto 0 ) ; dout : i n o u t s t d l o g i c v e c t o r ( 7 downto 0 ) ; end d f f ; a r c h i t e c t u r e r t l of counter i s begin p r o c e s s ( r e s e t , load , din , dout ) begin i f r e s e t = 1 then c o u n t v a l <= 00000000 ; e l s i f l o a d = 1 then c o u n t v a l <= d i n ; else c o u n t v a l <= d o u t + 00000001 ; end i f ; end p r o c e s s ; process begin w a i t u n t i l c l o c k e v e n t and c l o c k = 1 ; d o u t <= c o u n t v a l ; end p r o c e s s ; end r t l ; // c o u n t e r . h #i n c l u d e s y s t e m c . h SC MODULE( c o u n t e r ) { s c i n <b o o l > c l o c k , l o a d , r e s e t ; s c i n <s c i n t <8 > > din ; s c o u t <s c i n t <8 > > dout ; int countval ; void onetwothree ( ) ; SC CTOR ( c o u n t e r ) { SC METHOD( o n e t w o t h r e e ) ; sensitive pos ( clock ); } }; // c o u n t e r . c c #i n c l u d e c o u n t e r . h void counter : : onetwothree () { if ( reset ) { countval = 0; } else i f ( load ) { countval = din . read ( ) ; } else { c o u n t v a l ++; } dout = c o u n t v a l ; }

SystemC Concepts and syntax of SystemC Advantages

Advantages

simulation performance standardized modeling language: enable system level design and IP exchange at multiple abstraction levels provide the hardware and software development team with an executable specication of the system SystemC has a xed-point numeric type Open Source Licence - free development and simulation packets most designers familiar with C++???

SystemC Sources

Bibliography
Hannes Muhr. Einsatz von SystemC in Hardware/Software-Codesign Diplomarbeit: TU Wien, 2000 Thorsten Gr otker. System Design with SystemC Kluwer Academic Publishers, New York. 2002 Frank Ghenassia Transaction Level Modeling with SystemC Springer, 2005 IEEE Computer Society IEEE Standard SystemC Language Reference Manual IEEE Std 1666, 2006 SystemC Users Guide www.systemC.org, 2002

You might also like