Lec30 - Overview of SystemC Module The basic building block...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
    Overview of SystemC
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Module The basic building block in SystemC is the module. A SystemC module is a container in which processes and other modules are instantiated. A typical module can have Single or multiple RTL processes to specify combinational or sequential logic Multiple RTL modules to specify hierarchy One or more member functions that are called from within an instantiated process or module
Background image of page 2
   
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Processes SystemC provides processes to describe the parallel behavior of hardware systems. This means processes execute concurrently rather than sequentially like C++ functions. The code within a process, however, executes sequentially.
Background image of page 4
    Registering a Process Defining a process is similar to defining a C++ function. A process is declared as a member function of a module class and registered as a process in the module’s constructor. Registering a process means that it is recognized as a SystemC process rather than as an ordinary member function.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Triggering Execution of a Process You define a sensitivity list that identifies which input ports and signals trigger execution of the code within a process. You can define level-sensitive inputs to specify combinational logic or edge-sensitive inputs to specify sequential logic.
Background image of page 6
    Reading and Writing Processes A process can read from and write to ports, internal signals, and internal variables. Processes use signals to communicate with each other. One process can cause another process to execute by assigning a new value to a signal that interconnects them. Do not use data variables for communication between processes, because the processes execute in random order and it can cause nondeterminism (order dependencies) during simulation.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Types of Processes SystemC provides three process types— SC_METHOD, SC_CTHREAD, and SC_THREAD —that execute whenever their sensitive inputs change. For simulation, you can use any of the process types. For RTL synthesis, you can use only the SC_METHOD process.
Background image of page 8
    Creating a Module It is a recommended coding practice to describe a module by using a separate header file ( module_name .h) and an implementation file ( module_name .cpp or module_name .cc). Module Header File Each module header file contains Port declarations Internal signal variable declarations Internal data variable declarations Process declarations Member function declarations Module constructor
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Module Syntax Declare a module, using the syntax shown in bold in the following example: #include "systemc.h" SC_MODULE ( module_name ) { //Module port declarations //Signal variable declarations //Data variable declarations //Member function declarations //Method process declarations //Module constructor SC_CTOR (module_name) { //Register processes //Declare sensitivity list } }; SC_MODULE and SC_CTOR are C++ macros defined in the SystemC Class library.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/08/2010 for the course EEE SSM taught by Professor Pawansharma during the Spring '10 term at Birla Institute of Technology & Science.

Page1 / 70

Lec30 - Overview of SystemC Module The basic building block...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online