bus_dmi.cpp revision 12855
112855Sgabeblack@google.com/***************************************************************************** 212855Sgabeblack@google.com 312855Sgabeblack@google.com Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 412855Sgabeblack@google.com more contributor license agreements. See the NOTICE file distributed 512855Sgabeblack@google.com with this work for additional information regarding copyright ownership. 612855Sgabeblack@google.com Accellera licenses this file to you under the Apache License, Version 2.0 712855Sgabeblack@google.com (the "License"); you may not use this file except in compliance with the 812855Sgabeblack@google.com License. You may obtain a copy of the License at 912855Sgabeblack@google.com 1012855Sgabeblack@google.com http://www.apache.org/licenses/LICENSE-2.0 1112855Sgabeblack@google.com 1212855Sgabeblack@google.com Unless required by applicable law or agreed to in writing, software 1312855Sgabeblack@google.com distributed under the License is distributed on an "AS IS" BASIS, 1412855Sgabeblack@google.com WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1512855Sgabeblack@google.com implied. See the License for the specific language governing 1612855Sgabeblack@google.com permissions and limitations under the License. 1712855Sgabeblack@google.com 1812855Sgabeblack@google.com *****************************************************************************/ 1912855Sgabeblack@google.com#define SC_INCLUDE_DYNAMIC_PROCESSES 2012855Sgabeblack@google.com#include "tlm.h" 2112855Sgabeblack@google.com 2212855Sgabeblack@google.com#include "SimpleLTInitiator1_DMI.h" 2312855Sgabeblack@google.com#include "SimpleLTTarget1.h" 2412855Sgabeblack@google.com#include "SimpleLTInitiator2_DMI.h" 2512855Sgabeblack@google.com#include "SimpleLTTarget2.h" 2612855Sgabeblack@google.com#include "SimpleLTInitiator3_DMI.h" 2712855Sgabeblack@google.com#include "SimpleATInitiator1.h" 2812855Sgabeblack@google.com#include "SimpleATTarget1.h" 2912855Sgabeblack@google.com#include "SimpleATInitiator2.h" 3012855Sgabeblack@google.com#include "SimpleATTarget2.h" 3112855Sgabeblack@google.com#include "CoreDecouplingLTInitiator.h" 3212855Sgabeblack@google.com#include "ExplicitLTTarget.h" 3312855Sgabeblack@google.com#include "ExplicitATTarget.h" 3412855Sgabeblack@google.com#include "SimpleBusLT.h" 3512855Sgabeblack@google.com 3612855Sgabeblack@google.comint sc_main(int argc, char* argv[]) 3712855Sgabeblack@google.com{ 3812855Sgabeblack@google.com SimpleLTInitiator1_dmi initiator1("initiator1", 10, 0x00000000); 3912855Sgabeblack@google.com SimpleLTTarget1 target1("target1"); 4012855Sgabeblack@google.com 4112855Sgabeblack@google.com SimpleLTInitiator2_dmi initiator2("initiator2", 10, 0x10000000); 4212855Sgabeblack@google.com SimpleLTTarget2 target2("target2"); 4312855Sgabeblack@google.com 4412855Sgabeblack@google.com SimpleLTInitiator3_dmi initiator3("initiator3", 10, 0x20000000); 4512855Sgabeblack@google.com SimpleLTTarget2 target3("target3"); 4612855Sgabeblack@google.com 4712855Sgabeblack@google.com SimpleATInitiator1 initiator4("initiator4", 10, 0x30000000); 4812855Sgabeblack@google.com SimpleATTarget1 target4("target4"); 4912855Sgabeblack@google.com 5012855Sgabeblack@google.com SimpleATInitiator2 initiator5("initiator5", 10, 0x40000000); 5112855Sgabeblack@google.com SimpleATTarget2 target5("target5"); 5212855Sgabeblack@google.com 5312855Sgabeblack@google.com CoreDecouplingLTInitiator initiator6("initiator6", 10, 0x50000000); 5412855Sgabeblack@google.com ExplicitLTTarget target6("target6"); 5512855Sgabeblack@google.com 5612855Sgabeblack@google.com CoreDecouplingLTInitiator initiator7("initiator7", 10, 0x60000000); 5712855Sgabeblack@google.com ExplicitATTarget target7("target7"); 5812855Sgabeblack@google.com 5912855Sgabeblack@google.com SimpleBusLT<7, 7> bus("bus"); 6012855Sgabeblack@google.com 6112855Sgabeblack@google.com initiator1.socket(bus.target_socket[0]); 6212855Sgabeblack@google.com initiator2.socket(bus.target_socket[1]); 6312855Sgabeblack@google.com initiator3.socket(bus.target_socket[2]); 6412855Sgabeblack@google.com initiator4.socket(bus.target_socket[3]); 6512855Sgabeblack@google.com initiator5.socket(bus.target_socket[4]); 6612855Sgabeblack@google.com initiator6.socket(bus.target_socket[5]); 6712855Sgabeblack@google.com initiator7.socket(bus.target_socket[6]); 6812855Sgabeblack@google.com bus.initiator_socket[0](target1.socket); 6912855Sgabeblack@google.com bus.initiator_socket[1](target2.socket); 7012855Sgabeblack@google.com bus.initiator_socket[2](target3.socket); 7112855Sgabeblack@google.com bus.initiator_socket[3](target4.socket); 7212855Sgabeblack@google.com bus.initiator_socket[4](target5.socket); 7312855Sgabeblack@google.com bus.initiator_socket[5](target6.socket); 7412855Sgabeblack@google.com bus.initiator_socket[6](target7.socket); 7512855Sgabeblack@google.com 7612855Sgabeblack@google.com sc_core::sc_start(); 7712855Sgabeblack@google.com sc_core::sc_stop(); 7812855Sgabeblack@google.com 7912855Sgabeblack@google.com return 0; 8012855Sgabeblack@google.com} 81