An introduction to systemc
1 / 27

An Introduction to SystemC - PowerPoint PPT Presentation

  • Uploaded on

An Introduction to SystemC. By: Mohammad Agahian & Mohammad T. Karami HW/SW Co-design University of Tehran. Introduction. Introduction. Introduction. Why not leverage experience of C/C++ developers for H/W & System Level Design? C/C++ have no : notion of time

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'An Introduction to SystemC' - janeeva

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
An introduction to systemc

An Introduction to SystemC

By: Mohammad Agahian & Mohammad T. Karami

HW/SW Co-design

University of Tehran


  • Why not leverage experience of C/C++ developers for H/W & System Level Design?

  • C/C++ have no :

    • notion of time

      • No event sequencing

    • Concurrency

      • But H/W is inherently concurrent

    • H/W Data Types

      • No ‘Z’ value for tri-state buses


  • SystemC is a library of C++ classes, global functions, data types and a simulation kernel that can be used for creating cycle-accurate simulators of hardware architecture.


  • C++ Class Library (systemc) use for :

    • Hardware Architecture

    • Interface of SoC(System-on-Chip)

    • System-level designs

    • Executable Specification


  • An executable specification is essentially a C++ program that exhibits the same behavior as the system when executed.

  • The SystemC library is Open Source and can be downloaded from the following address:


  • SystemC1.0

    • Provide VHDL like capabilities

    • Simulation kernel

    • Fixed point arithmetic data types

    • Signals (communication channels)

    • Modules

    • Break down designs into smaller parts

  • SystemC2.0

    • Complete library rewrite to upgrade into true SLDL

    • Events as primitive behavior triggers

    • Channels, Interfaces and Ports

  • Future SystemC3.0

    • Modeling of OSs

    • Support of embedded S/W models

Systemc 2 0
SystemC 2.0

  • Objectives of SystemC 2.0

    • Primary goal: Enable System-Level Modeling Systems include hardware and software

    • Challenge:

      • Wide range of design models of computation

      • Wide range of design abstraction levels

      • Wide range of design methodologies

Starting point
Starting Point

  • Every C/C++ program has a main() function. When the SystemC library is used the main() function is not used. Instead the function sc_main() is the entry point of the application.

  • This is because the main() function is defined into the library so that when the program starts initialization of the simulation kernel and the structures this requires to be performed, before execution of the application code.

  • In the sc_main() function the structural elements of the system are created and connected throughout the system hierarchy.

  • Access to all SystemC classes and functions is provided in a single header file named “systemc.h”.

  • A SystemC system consists of a set of one or more modules.

The module s constructor
The module’s constructor

  • The SC_CTOR statement is also a macro used for the constructor of the class.

  • The code which starts with the statement SC_CTOR is the code of the constructor of the module.

The module s constructor1
The module’s constructor

  • an example:


sc_in<bool> doOp;



void execute() {









for(int i=0;i<MEM_SIZE;i++) memData[i]=0;


}; // End of module RAM.

The module s constructor2
The module’s constructor

  • Processes have a list of events of which they are sensitive.

  • sensitive(rwb) creates that list for the process registered by the previous SC_METHOD statement.

  • It specifies that this process will execute when an event is triggered by the rwb port.

  • Ports trigger events owned by the channel they are connected to.

  • when the value of the port itself changes or the value of another port also connected to the same channel changes.

The module s constructor3
The module’s constructor

  • In simple terms when the rwb port changes the func1 member function will run.