1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 15 implied. See the License for the specific language governing 16 permissions and limitations under the License. 17 18 *****************************************************************************/ 19#define SC_INCLUDE_DYNAMIC_PROCESSES 20#include <systemc> 21#include "tlm.h" 22 23#include "SimpleLTInitiator1.h" 24#include "SimpleLTTarget1.h" 25#include "SimpleLTInitiator2.h" 26#include "SimpleLTTarget2.h" 27#include "SimpleATInitiator1.h" 28#include "SimpleATInitiator2.h" 29#include "SimpleATTarget1.h" 30#include "SimpleATInitiator2.h" 31#include "SimpleATTarget2.h" 32#include "CoreDecouplingLTInitiator.h" 33#include "ExplicitLTTarget.h" 34#include "ExplicitATTarget.h" 35#include "SimpleBusAT.h" 36 37int sc_main(int argc, char* argv[]) 38{ 39 SimpleLTInitiator1 initiator1("initiator1", 10, 0x00000000); 40 SimpleLTTarget1 target1("target1"); 41 42 SimpleLTInitiator2 initiator2("initiator2", 10, 0x10000000); 43 SimpleLTTarget2 target2("target2"); 44 45 SimpleATInitiator1 initiator3("initiator3", 10, 0x20000000); 46 SimpleATTarget1 target3("target3"); 47 48 SimpleATInitiator2 initiator4("initiator4", 10, 0x30000000); 49 SimpleATTarget2 target4("target4"); 50 51 SimpleATInitiator2 initiator5("initiator5", 10, 0x40000000); 52 SimpleATTarget2 target5("target5"); 53 54 CoreDecouplingLTInitiator initiator6("initiator6", 10, 0x50000000); 55 ExplicitLTTarget target6("target6"); 56 57 CoreDecouplingLTInitiator initiator7("initiator7", 10, 0x60000000); 58 ExplicitATTarget target7("target7"); 59 60 SimpleBusAT<7, 7> bus("bus"); 61 62 initiator1.socket(bus.target_socket[0]); 63 initiator2.socket(bus.target_socket[1]); 64 initiator3.socket(bus.target_socket[2]); 65 initiator4.socket(bus.target_socket[3]); 66 initiator5.socket(bus.target_socket[4]); 67 initiator6.socket(bus.target_socket[5]); 68 initiator7.socket(bus.target_socket[6]); 69 bus.initiator_socket[0](target1.socket); 70 bus.initiator_socket[1](target2.socket); 71 bus.initiator_socket[2](target3.socket); 72 bus.initiator_socket[3](target4.socket); 73 bus.initiator_socket[4](target5.socket); 74 bus.initiator_socket[5](target6.socket); 75 bus.initiator_socket[6](target7.socket); 76 77 sc_core::sc_start(); 78 sc_core::sc_stop(); 79 80 return 0; 81} 82