File indexing completed on 2024-05-12 04:02:11

0001 #include "systemc.h"
0002 
0003 /*
0004  multi line comment
0005  */
0006 
0007 // declare some module
0008 SC_MODULE(gate)
0009 {
0010     // inputs
0011     sc_in<bool> inA, inB;
0012 
0013     // outputs
0014     sc_out<bool> out;
0015 
0016     // C function
0017     void do_something()
0018     {
0019         out.write(inA.read() || inB.read());
0020     }
0021 
0022     // constructor
0023     SC_CTOR(gate)
0024     {
0025         // register method
0026         SC_METHOD(do_something);
0027     }
0028 };