1 / 27

An Introduction to SystemC

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

janeeva
Download Presentation

An Introduction to SystemC

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to SystemC By: Mohammad Agahian & Mohammad T. Karami HW/SW Co-design University of Tehran

  2. Introduction

  3. Introduction

  4. Introduction • 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

  5. Introduction

  6. Introduction

  7. Introduction

  8. Introduction • 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.

  9. Introduction • C++ Class Library (systemc) use for : • Hardware Architecture • Interface of SoC(System-on-Chip) • System-level designs • Executable Specification

  10. Introduction • 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: www.systemc.org

  11. Introduction

  12. Development • 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

  13. 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

  14. Data Types

  15. Data Types

  16. Data Types

  17. 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.

  18. Modules

  19. Modules

  20. Modules

  21. Modules - Basic Modeling Structure

  22. Modules

  23. 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.

  24. The module’s constructor • an example: SC_MODULE(RAM) { sc_in<bool> doOp; . . void execute() { . . . } SC_CTOR(RAM) { SC_METHOD(execute); sensitive(doOp); dont_initialize(); for(int i=0;i<MEM_SIZE;i++) memData[i]=0; } }; // End of module RAM.

  25. 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.

  26. The module’s constructor • In simple terms when the rwb port changes the func1 member function will run. SC_CTOR(RAM) { SC_METHOD(func1); sensitive(rwb); }

More Related