How to Start XY Routing Projects Using OMNeT++

To start XY Routing using OMNeT++ environment which is a deterministic routing algorithm frequently utilised within Network-on-Chip (NoC) designs. It routes packets according to its X and Y coordinates within a grid or mesh topology. This algorithm is easy process, effective, and prevents the deadlock once utilised within a two-dimensional mesh.

Below is a stepwise method to get started with executing an XY Routing project in OMNeT++:

Steps to Start XY Routing Projects in OMNeT++

  1. Understand XY Routing

Key Features

  • Routing Mechanism:
    • Initial packet route with X-axis (horizontal direction).
    • Then route near to the Y-axis which is vertical direction.
  • Deterministic Routing:
    • Packets eternally follow the similar path for provided source-destination pair.
  • Applications:
    • Static grid-based or mesh networks.
    • Network-on-Chip (NoC) architectures.

Advantages

  • It helps to execute easily.
  • Ensured to be deadlock-free within a 2D mesh topology.
  1. Set Up the Environment

Install OMNeT++

  1. We should download and install OMNeT++ on the system.
  2. Confirm that the installation with sample simulations is properly configured.

Install INET Framework (Optional)

  • If project includes traditional networking then we will need to install the INET framework:

make makefiles

make

  1. Plan the Simulation

Define Objectives

  • Execute the XY routing for a grid or mesh topology.
  • Measure the performance parameters like:
    • Packet latency.
    • Packet delivery ratio.
    • Routing path length.

Define the Topology

  • Make use of a 2D grid or mesh including fixed coordinates for nodes.
  • Allocate a unique (X, Y) coordinates to every node.
  1. Create a New OMNeT++ Project
  1. Go to OMNeT++ IDE.
  2. To navigate File > New > OMNeT++ Project.
  3. Name it to the project like XYRouting and choose Finish.
  1. Implement XY Routing Logic

Custom XY Routing Module

Make a .cc file as XYRouting.cc and then execute the routing logic.

Example: XY Routing Logic

#include <omnetpp.h>

using namespace omnetpp;

class XYRouting : public cSimpleModule {

private:

int xCoord, yCoord; // Coordinates of the current node

int gridWidth;      // Number of columns in the grid

protected:

virtual void initialize() override {

// Retrieve node coordinates from parameters

xCoord = par(“xCoord”);

yCoord = par(“yCoord”);

gridWidth = par(“gridWidth”);

}

virtual void handleMessage(cMessage *msg) override {

auto packet = check_and_cast<cMessage *>(msg);

// Retrieve destination coordinates

int destX = packet->par(“destX”);

int destY = packet->par(“destY”);

if (xCoord == destX && yCoord == destY) {

EV << “Packet reached destination.\n”;

delete packet; // Packet delivered

} else {

int nextX = xCoord, nextY = yCoord;

// Route along the X-axis first

if (xCoord != destX) {

nextX += (destX > xCoord) ? 1 : -1;

}

// Then route along the Y-axis

else if (yCoord != destY) {

nextY += (destY > yCoord) ? 1 : -1;

}

// Calculate next node index

int nextNode = nextY * gridWidth + nextX;

// Forward the packet

send(packet, “out”, nextNode);

}

}

};

Define_Module(XYRouting);

  1. Define Network Topology

Create a .ned File

Make the grid topology including (X, Y) coordinates for very node.

network XYNetwork {

parameters:

int gridWidth = 3;

int gridHeight = 3;

submodules:

node[9]: StandardHost {

parameters:

@display(“i=device/router”);

routingProtocol = “XYRouting”;

xCoord = index % gridWidth;

yCoord = index / gridWidth;

gridWidth = gridWidth;

}

connections:

for i=0..gridHeight-1, j=0..gridWidth-1 {

if (j < gridWidth-1) {

node[i * gridWidth + j].pppg++ <–> node[i * gridWidth + j + 1].pppg++;

}

if (i < gridHeight-1) {

node[i * gridWidth + j].pppg++ <–> node[(i + 1) * gridWidth + j].pppg++;

}

}

}

  1. Configure Simulation Parameters

Edit omnetpp.ini

Specify simulation metrics such as the volume of nodes and grid dimensions.

[Config XYRoutingSimulation]

network = XYNetwork

**.node[*].app[0].typename = “UdpApp”

**.node[*].app[0].destX = uniform(0, 2)  # Random destination X-coordinate

**.node[*].app[0].destY = uniform(0, 2)  # Random destination Y-coordinate

simulation.timeLimit = 100s

  1. Run the Simulation
  1. Execute the simulation to utilise Tkenv (GUI) or Cmdenv (command line).
  2. Monitor:
    • Packet paths within the grid.
    • Node-to-node forwarding.
  1. Analyze Results

Performance Metrics

  • Packet Delivery Ratio: We estimate the rate of packets that are effectively distributed.
  • Path Length: Count the volume of hops which are taken to distribute each packet.
  • Latency: We need to measure end-to-end delay for packets.

Visualization

  • Make use of OMNeT++’s built-in tools to:
    • Envision packet forwarding.
    • Observe the node communications.
  1. Extend and Optimize

Dynamic Scenarios

  • Launch node/link failures, monitoring how XY routing manages the disruptions.
  • Mimic traffic including diverse intensity or mobility patterns.

Advanced Features

  • We can execute the 3D XY routing for a cube topology.
  • Integrate the priority-based packet routing for enhancing latency-sensitive traffic.

Comparison

  • We need to equate the XY routing including other routing protocols like Dijkstra’s algorithm, flooding.

This procedure encompasses the steps of implementation, simulation and analyse of XY Routing Projects using OMNeT++ environment. We can also offer additional insights of this process through another manual.