Professional Documents
Culture Documents
Search
SystemC Tutorial
SystemC Introduction
SystemC Hello World
SystemC Modules SystemC Data Types
SystemC Operators
SystemC Modules SystemC Statement and Flow Control
SystemC Jump Statements
Modules are the building blocks of SystemC, It is a container class that may contain data members, SystemC Functions
channel members, processes, instance of other modules and ports for communication.
SystemC Functions argument passing
SystemC Modules
Modules are extended from sc_module, in other words modules are the child classes of sc_module Class.
Example:
Contact / Report an issue
class module_name : public sc_module { Your valuable inputs are
. . . required to improve the quality.
};
Also module may be created with use of the SC_MODULE macro as follows, Follow Us
Example:
SC_MODULE( module_name ) {
……
};
Constructor
SC_CTOR macro declares the constructor, module must have SC_CTOR or it can have
SC_HAS_PROCESS.(will see the SC_HAS_PROCESS in next chapters)
by default SC_CTOR macro has one argument which is the name of the module.
Example:
SC_MODULE( module_name ) {
SC_CTOR(module_name){ }
};
Constructor to initialize the module properties:
Module Instance:
Module instance can be created as below,
module_name instance_name(“instance_name”);
Example:
SC_MODULE( module_1 ) {
};
© Copyright 2016 Verification Guide. All rights reserved.