//control file to connect and run three ports

#include "systemc.h"
#include "transmit.h"
#include "interface.h"
#include "display.h"

// Array elements to be Transmitted
int transmit::array[10] = {1,2,3,4,5,6,7,8,9,10};

int sc_main(int argc, char* argv[]) 
{
   //instantiate
   transmit t1("transmit");
   intfc i1("interface");
   display d1("display");
   sc_link_mp<int > in_data;
   sc_link_mp<int > out_data;
   sc_time dtu(1.0, sc_ns);
   sc_set_default_time_unit(dtu);
   
   //create clock
   sc_time ctime(5.0, sc_ns);
   sc_clock clock("clock",ctime);
      
   //connect clocks to modules
   t1.clk(clock);
   
   //connect ports to channels
   t1.inp1(in_data);
   i1.inp2(in_data);
   i1.outp2(out_data);
   d1.outp1(out_data);
   
   //simulation parameters
   sc_time tim(200.0, sc_ns);
   sc_start(tim);
   
   return(0);
};
