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

int transmit::array[10] = {1,2,3,4,5,6,7,8,9,10};

int sc_main(int argc, char* argv[]) {
   sc_link_mp<int > in_data;
   sc_link_mp<int > out_data;

   sc_time ctime1(100.0, sc_ns);
   sc_clock clock1("clock1", ctime1);  // clock for transmit block
   sc_time ctime2(10.0, sc_ns);
   sc_clock clock2("clock2", ctime2);  // clock for intrface block
   sc_time ctime3(1.0, sc_ns);
   sc_clock clock3("clock3", ctime3);  // clock for display block

   //transmit block - connected to intrface block
   transmit t1("transmit");
   t1.inp1(in_data);
   t1.clk(clock1);    //100ns clock
   
   //intrface block - connected to transmit block and display block
   intrface i1("intrface");
   i1.inp2(in_data);
   i1.outp2(out_data);
   i1.clk(clock2);    //10ns clock
     
   //display block - connected to intrface block
   display d1("display");
   d1.outp1(out_data);
   d1.clk(clock3);    //1 ns clock
   
   sc_time stime(500.0, sc_ns);
   sc_start(stime);
   
   return(0);
};
