#include "systemc.h"
#include "modx.h"  //include only parent definition
#include "mody.h"


int sc_main(int argc, char* argv[]) {
   sc_link_mp<int> top_ch;
   
   sc_time ctime(5.0,sc_ns);
   sc_clock clock("clock",ctime);  // clock for triggering purpose only
    
   //parent module X is connected to to two child modules A and B and to parent
   //module Y.
   modx X1("modx");
   X1.p4(top_ch);
   X1.clk(clock);
   
   //parent module Y is connected to to two child modules C and D and to parent
   //module X.
   mody Y1("mody");
   Y1.p5(top_ch);
   
   sc_time stime(5.0,sc_ns);
   sc_start(stime);
   
   return(0);
   
};
