1#define SC_INCLUDE_DYNAMIC_PROCESSES
2#include "CoreDecouplingLTInitiator.h"
3#include "SimpleATInitiator1.h"
4#include "SimpleATInitiator2.h"
5#include "SimpleLTInitiator1.h"
6#include "SimpleLTInitiator2.h"
7#include "SimpleLTInitiator3.h"
8#include "SimpleATTarget1.h"
9#include "SimpleATTarget2.h"
10#include "SimpleLTTarget1.h"
11#include "SimpleLTTarget2.h"
12#include "ExplicitATTarget.h"
13#include "ExplicitLTTarget.h"
14
15#include "MultiSocketSimpleSwitchAT.h"
16
17/*
18Connection Map: Busses are written vertically
19
20AT_I1-B-AT_T1
21LT_I1-U-LT_T1
22LT_I2-S
23LT_I3-1-B-LT_T2
24        U-LT_T3
25  AT_I2-S-AT_T2
26  LT_I4-2-AT_T3
27*/
28int sc_main(int argc, char* argv[]){
29
30    MultiSocketSimpleSwitchAT bus1("bus1");
31    MultiSocketSimpleSwitchAT bus2("bus2");
32
33    SimpleATInitiator1 at_i1("AT_I1", 3, 0x10000000); //AT_T1
34    SimpleLTInitiator1 lt_i1("LT_I1", 3, 0x20000000); //LT_T1
35    SimpleLTInitiator2 lt_i2("LT_I2", 3, 0x30000000); //LT_T2
36    SimpleLTInitiator3 lt_i3("LT_I3", 3, 0x60000000); //AT_T3
37
38
39    SimpleATInitiator2 at_i2("AT_I2", 3, 0x50000000); //AT_T2
40    CoreDecouplingLTInitiator lt_i4("LT_I4", 3, 0x40000000); //LT_T3
41
42    SimpleATTarget1    at_t1("AT_T1");
43    SimpleATTarget2    at_t2("AT_T2");
44    ExplicitATTarget    at_t3("AT_T3");
45    SimpleLTTarget1    lt_t1("LT_T1");
46    SimpleLTTarget2    lt_t2("LT_T2");
47    ExplicitLTTarget    lt_t3("LT_T3");
48
49
50    at_i1.socket(bus1.target_socket);
51    lt_i1.socket(bus1.target_socket);
52    lt_i2.socket(bus1.target_socket);
53    lt_i3.socket(bus1.target_socket);
54
55    at_i2.socket(bus2.target_socket);
56    lt_i4.socket(bus2.target_socket);
57
58    bus1.bindTargetSocket(at_t1.socket, 0x10000000,0x1000ffff, 0xfffffff);
59    bus1.bindTargetSocket(lt_t1.socket, 0x20000000,0x2000ffff, 0xfffffff);
60    bus1.bindTargetSocket(bus2.target_socket, 0x30000000,0x6000ffff);
61
62    bus2.bindTargetSocket(at_t2.socket, 0x50000000,0x5000ffff, 0xfffffff);
63    bus2.bindTargetSocket(lt_t2.socket, 0x30000000,0x3000ffff, 0xfffffff);
64    bus2.bindTargetSocket(at_t3.socket, 0x60000000,0x6000ffff, 0xfffffff);
65    bus2.bindTargetSocket(lt_t3.socket, 0x40000000,0x4000ffff, 0xfffffff);
66
67    sc_core::sc_start();
68
69    bus1.dump_status();
70    bus2.dump_status();
71
72    return 0;
73}
74