#include "systemc.h"

SC_MODULE(moda){
   sc_outmaster<int> p1;
   
   sc_in_clk clk1;
   int i;
   
   void moda_f(){
      while(true) {
         wait();
         for(i=0;i<500;i++){
            cout << "data sent from mod A = " << i;
            p1 = i;
         }
      }
   }
   
   SC_CTOR(moda) {
      SC_THREAD(moda_f); //autonomous thread
      sensitive << clk1; 
   }
};