3. PhoenixSim Tutorial



Comments



Description

Introduction To NetworkSimulation With OMNET++ A case of PhoenixSim Tutorial © Adaptive Systems Laboratory Division of Computer Engineering School of Computer Science and Engineering University of Aizu Contact: [d8151102, benab] @ u-aizu.ac.jp Edition: June 1, 2015 Outline  What Is OMNeT++?  Programming model in OMNET++  PhoenixSim: o PhoenixSim folder hierarchy o Install OMNET++ o Build PhoenixSim o Configuration file o Run PhoenixSim  PhoenixSim’s Electronic Router  RouterInport simple module C++ implementation  The OMNeT++ IDE requires Windows. component-based C++ simulation library and framework. Etc. What Is OMNeT++?  OMNeT++ is an extensible. queueing networks. Linux. primarily for building network simulators. Linux. and other Unix-like systems. Mac OS X. Introduction To Simulation With OMNET++ May 31. modular. or Mac OS X. on-chip networks.  OMNET ++ framework includes:  Simulation kernel library  NED topology description language  OMNET++ IDE based on eclipse platform  GUI for simulation execution (Tkenv)  Command-line user interface for simulation execution (Cmdenv)  OMNeT++ runs on Windows.  "Network" is meant in a broader sense that includes wired and wireless communication networks. 2015 3 A case of PHOENIXSIM .  The active modules are termed simple modules. they are written in C++. Programming model  An OMNeT++ model consists of modules that communicate with message passing. is itself a compound module. called network in OMNeT++. Messages can be sent either via connections that span modules or directly to other modules. using the simulation class library.  The whole model. 2015 4 A case of PHOENIXSIM . Figure: Simple and compound modules Introduction To Simulation With OMNET++ May 31. ……. Source described in C++ long DstId. protected: myNetwork. class ElectronicMessage : public ::cPacket { and linking protected: int Id_var.cc/h files Simulation Kernel OMNET++ opp_msgc to generate C++ class: _m. Configuration int virtualChannel_var. Example. buffer size. Result Files Introduction To Simulation With OMNET++ May 31. long DstId_var. Simulation Program NED Files private: File . int virtualChannel. modules should be MSG Files long SrcId.ini void copy(const ElectronicMessage& other).cc NED files define how all simple modules and Compiling compound modules are connected to each other.h and _m.msg int Id.exe Define the network to bool operator==(const ElectronicMessage&). long SrcId_var. simulation. Running simulate in addition to the ……. Programming model All messages/ packets should be packet ElectronicMessage { The behavior of all simple C++ defined in the file messages. packet length…. } Opp_msgc Simulation kernel handle different events created by the C++ description of your simple module *_m. 2015 5 A case of PHOENIXSIM . parameters needed in the }.  Because photonics often requires electronic components around it for control and processing. Introduction To Simulation With OMNET++ May 31. 2015 6 A case of PHOENIXSIM . models of some typical electronic network components are incorporated.  We ended up with a simulation environment that is suited to investigate both electronic and photonic NoCs.0  PhoenixSim (Photonic and Electronic Network Integration and eXecution Simulator) was originally designed to allow the investigation of silicon nanophotonic NoCs taking into account component’s physical layer characteristics. PhoenixSim 1. contains all the models of the photonic devices including with PhoenixSim • processingPlane .contains components used in the IO PLANE. Also contains all Arbiters. 2015 7 A case of PHOENIXSIM . including the ORION power model .contains default parameter values for all components • photonic . such as message definitions and statistics • topologies .contains definitions of some useful components used in NoCs • electronicComponents . PhoenixSim folder hierarchy  The components you will find in the PhoenixSim code are organized into various folders depending on their function.contains the components used in electronic routers. which is currently limited to DRAM • parameters .contains the network topologies that come with PhoenixSim Introduction To Simulation With OMNET++ May 31.contains core functions.contains components necessary for modeling traffic generation • simCore . • ioComponents . The following enumerates and describes the contents of these folders: • chipComponents . which are used to define new routing functions. Introduction To Simulation With OMNET++ May 31.  Go to the folder where you unzipped the sources and Start mingwenv. Install OMNET++  Download the last version of OMNeT++ for windows from this link: OMNeT++ 4. where the path is already set to include the omnetpp-4.6/bin directory. zip)  Extract the zip folder into a directory that doesn’t have space in its name. 2015 8 A case of PHOENIXSIM . It will bring up a console with the MSYS bash shell. Otherwise you'll have problems with the makefiles.6 win32 (source + IDE + MinGW.cmd as administrator. Install OMNET++  First check your gcc and g++ versions  Then enter . 2015 9 A case of PHOENIXSIM ./configure OMNET++ will check your system configuration Introduction To Simulation With OMNET++ May 31. 2015 10 A case of PHOENIXSIM .  Now You should be able to start the IDE by typing: omnetpp Introduction To Simulation With OMNET++ May 31. The build process will create both debug and release binaries. Install OMNET++  Then enter make . 2015 11 A case of PHOENIXSIM .Choose your workspace directory Introduction To Simulation With OMNET++ May 31. Install OMNET++ 1. 6 Introduction To Simulation With OMNET++ May 31. 2015 12 A case of PHOENIXSIM . Install OMNET++ Welcome screen in OMNET++ 4. 2015 13 A case of PHOENIXSIM . Build PhoenixSim 2.You need to create an empty project through File/New/OMNET++ Project Introduction To Simulation With OMNET++ May 31. Chose empty project and click Finish Introduction To Simulation With OMNET++ May 31.Name your project 4. 2015 14 A case of PHOENIXSIM . Build PhoenixSim 3. ned. Build PhoenixSim 5.Do not forget to delete package.Right click on your project and otherwise you will get errors when you choose Import import PhoenixSim project Introduction To Simulation With OMNET++ May 31. 6. 2015 15 A case of PHOENIXSIM . zip file and select it (When you download PheonixSim DO NOT unzip it ) Introduction To Simulation With OMNET++ May 31. Build PhoenixSim 7. 2015 16 A case of PHOENIXSIM .Go to where you saved PhoenixSim .Choose General / Archive File 8. your project is ready to be 10. Build PhoenixSim 9. 2015 17 A case of PHOENIXSIM .Right click on your project and build click Build Project Introduction To Simulation With OMNET++ May 31.Now. If everything goes fine you will be able to see this message Introduction To Simulation With OMNET++ May 31. Build PhoenixSim 11. 2015 18 A case of PHOENIXSIM . NetworkSize: X=8.. 2. “neighbor”. ElectronicPara: Processor frequency= 2. Applications to run: “random”.. MessageSize: 512. Y=X 5. InjectionRate: 1E-3. Configuration file  PhoenixSim has multiple networks and topologies. You may find many configurations in <myProject>/parameters/Hendry-Thesis  To run PhoenixSim you need a configuration file where you define all needed parameters for the simulation  In this example the configuration file contains: 1. 1E-4… (seconds) 3. 2015 19 A case of PHOENIXSIM .5GHZ Introduction To Simulation With OMNET++ May 31. (bits) 4. 1024. go to Run/Run Configurations Introduction To Simulation With OMNET++ May 31. Run PhoenixSim 1. 2015 20 A case of PHOENIXSIM . Run PhoenixSim 2.Create new configuration click on OMNET++ Simulation Introduction To Simulation With OMNET++ May 31. 2015 21 A case of PHOENIXSIM . Run PhoenixSim 1.Name your configuration. you can run all 5 7 6 of them by typing (*). 6. 1 3.Select the folder containing configuration files.Select how many process run in parallel (depends on your processor).When you are ready click Run Introduction To Simulation With OMNET++ May 31. 4. 2.Your configuration may have 4 multiple iterations.choose default for GUI based 8 simulation or Command line if you want to see the output on the console.Select the network to simulate (you configuration file may have 2 many networks). 3 5. 2015 22 A case of PHOENIXSIM . 7. 8.Select the configuration to run. only run number 0 is executed Introduction To Simulation With OMNET++ May 31. In this example. 2015 23 A case of PHOENIXSIM . Run PhoenixSim  When the simulation finish you will see on your console this output. you need to write your own script to parse all files at once. Introduction To Simulation With OMNET++ May 31. 2015 24 A case of PHOENIXSIM .  Photonic energy.  Physical Layer statistics including Crosstalk and Insertion Loss. Run PhoenixSim  The obtained result file is located in <myProject>/results  The result file contains different statistics:  Electronic energy.  For some configurations you will have hundreds of files. To speed up gathering statistics from these files.  Performance including throughput and latency. Run PhoenixSim  Result file sample Throughput Electronic Latency Energy distribution Latency breakdown Photonic Energy distribution Physical layer stat (SNR) Total component Insertion count in your Loss network distribution Introduction To Simulation With OMNET++ May 31. 2015 25 A case of PHOENIXSIM .  In the following slides. and example of the electronic router and the input port in PhoenixSim is provided. using the OMNeT++ class library. 2015 26 A case of PHOENIXSIM .ned file. simple modules are the active components in the model. Introduction To Simulation With OMNET++ May 31. In addition. the connections to other modules are defined. Simple modules are programmed in C++.  In addition to the C++ implementation. you can add all parameters that you need. PhoenixSim’s Electronic Router  As we mentioned at the beginning of this tutorial. needs to be defined with topology description language (NED). simple module like all other modules in your network.  In the . Crossbar (xbar).  ackMux module is used to multiplex the ack from input and the data from the crossbar to be sent to the output port.  The typical simple modules in the electronic router are: Input ports (in).ned  ElectronicRouter. PhoenixSim’s Electronic Router  The figure shows the .ned is a compound module having multiple simple modules connected with each other. Introduction To Simulation With OMNET++ May 31. Arbiter(arb).  Stat module is used for simulation purpose to gather statistics from the different modules. 2015 27 A case of PHOENIXSIM . You can find this file in <myProject>/electronicComponents/ElectronicRoute r.ned definition of the electronic router in PhoenixSim. cc Crossbar and Arbiter Simple modules Introduction To Simulation With OMNET++ May 31.h Component module RouterInport. 2015 28 A case of PHOENIXSIM . PhoenixSim’s Electronic Router RouterInport Connection between Simple module all modules Simple module needs C++ implementation: Electronic Router RouterInport. RouterInport. In addition.cc Example of sendRequest() method. you can initialize the parameters used in this simple module.ned file. This method implements how the input buffer prepares a request and sends it to the arbiter module through the predefined gate (reqportOut) RouterInport. 2015 29 A case of PHOENIXSIM . it contains the gates definitions. where all gates are defined according to their first definition in the . In addition.h Defines different methods. RouterInport C++ implementation RouterInport.cc Each simple has initialize() method. Introduction To Simulation With OMNET++ May 31.
Copyright © 2024 DOKUMEN.SITE Inc.