//control file to connect and run two ports

#include "systemc.h"
#include "mod1.h"
#include "mod2.h"
#include <stdio.h>

int sc_main(int ac, char *av[])
{
	//instantiate
	mod1 mod1("Master");
	mod2 mod2("Slave");
	sc_link_mp<basic_type> ch;
	sc_link_mp<basic_type> ch1;


	//create clocks
	sc_clock clock1 ("Clock1", 5, 0.5);

	//connect clocks to modules
	mod1.clocking(clock1);
	mod2.clocking2(clock1);

	//connect ports to channels
	mod1.P1_inout(ch);
	mod1.P1_bp(ch1);

	mod2.P2(ch);
	mod2.P2_inout(ch);
	mod2.P2_bp(ch1);


	sc_start(100);

	return 0;

}
