This example can be used as a starting point for the submission of your own examples. It only contains an empty SystemC module, with comments where to add actual logic, etc..
#include <systemc.h> SC_MODULE( my_module ) { /* ----- input ports ----- */ sc_in<bool> clock; sc_in<bool> reset; // add your input ports here // sc_in< sc_uint<32> > in_data; /* ----- output ports ----- */ // add your output ports here // sc_out< sc_uint<32> > out_data; /* ----- constructor ----- */ SC_CTOR( my_module ) { /* ----- process definitions ----- */ SC_CTHREAD( processing, clock.pos() ); reset_signal_is( reset, true ); } private: /* ----- process(es) ----- */ void processing(); /* ----- sub-module(s), and other members ----- */ // ... }; // my_module /* ----- process body ----- */ void my_module::processing() { /* ----- reset block ----- */ wait(); while( true ) { /* ----- main loop ----- */ wait(); } } // my_module::processing() /* ----- sc_main() ----- * * This is optional and only required, if you have more than one * module in your design. In that case, you should instantiate * your top-level module here. */ int sc_main( int, char*[] ) { my_module top( "top" ); return 0; }