UE-Sim / UEC-Sim

Soft-UE Examples

This directory contains comprehensive examples demonstrating the capabilities and usage of the Soft-UE Ultra Ethernet protocol stack implementation.

🚀 Quick Start Examples

1. First Soft-UE Example

File: first-soft-ue.cc

Purpose: Basic Soft-UE device installation and configuration

Demonstrates:

Usage:

./ns3 run first-soft-ue
./ns3 run "first-soft-ue --nNodes=4 --maxPdcCount=1024"

Expected Output:

📊 Performance Examples

2. Performance Benchmark Suite

File: performance-benchmark.cc

Purpose: Comprehensive performance testing and analysis

Demonstrates:

Usage:

./ns3 run performance-benchmark

Generated Outputs:

Key Metrics:

🤖 AI/ML Network Examples

3. AI Network Simulation

File: ai-network-simulation.cc

Purpose: High-performance AI training cluster simulation

Demonstrates:

Configuration Options:

./ns3 run "ai-network-simulation --numNodes=8 --modelSize=1000000000"
./ns3 run "ai-network-simulation --numNodes=16 --linkDataRate=40Gbps --operation=1"

Collective Operations:

Performance Targets:

🔧 Advanced Configuration Examples

4. Custom Topology Example

Coming Soon: custom-topology.cc

Planned Features:

5. Protocol Optimization Example

Coming Soon: protocol-optimization.cc

Planned Features:

📋 Running Examples

Prerequisites

# Build Soft-UE module
./ns3 build soft-ue

# Verify installation
./ns3 test soft-ue

Basic Usage

# Run specific example
./ns3 run <example-name>

# Run with verbose logging
./ns3 run "<example-name> --verbose=true"

# Run with custom parameters
./ns3 run "<example-name> --parameter=value"

Common Parameters

Performance Examples

AI Network Examples

General Parameters

📊 Output Analysis

Trace Files

Examples generate comprehensive trace files for analysis:

PCAP Traces:

ASCII Traces:

Performance Plots:

Log Analysis

# Filter Soft-UE specific logs
./ns3 run first-soft-ue 2>&1 | grep "SoftUe"

# Performance summary extraction
./ns3 run performance-benchmark 2>&1 | grep "Performance Metrics"

🔍 Debugging Examples

Enable Debug Logging

# Enable specific component logging
./ns3 run "first-soft-ue --log-level=SoftUeNetDevice=debug"

# Enable all Soft-UE debugging
./ns3 run "first-soft-ue --log-level=debug"

Common Issues

Build Issues

# Clean build
./ns3 clean
./ns3 build soft-ue

# Check dependencies
./ns3 configure --enable-examples --enable-tests

Runtime Issues

# Check for missing modules
./ns3 run first-soft-ue --print-attributes

# Enable verbose error messages
./ns3 run first-soft-ue --log-level=error

📈 Expected Performance

Baseline Expectations

Based on Soft-UE’s 6.25x performance advantage:

Metric Soft-UE Traditional TCP/IP Improvement
Throughput 6.25 Gbps 1.0 Gbps 6.25x ⬆️
Latency 12.8 μs 80 μs 84% reduction ⬇️
PDC Concurrency 1000+ 160 6.25x ⬆️
Memory Efficiency 747KB 2.1MB 64% reduction ⬇️

Example-Specific Targets

First Example

Performance Benchmark

AI Network Simulation

🛠️ Customization Guide

Adding New Examples

  1. Create .cc file in examples/ directory
  2. Follow Soft-UE coding conventions
  3. Include comprehensive logging and error handling
  4. Add documentation to this README
  5. Update example in project build system

Example Structure Template

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright 2025 Soft-UE Project Team
 */

#include "ns3/core-module.h"
#include "ns3/soft-ue-helper.h"

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("ExampleName");

int main (int argc, char *argv[])
{
  // Configuration
  CommandLine cmd (__FILE__);
  // Add parameters

  // Setup
  SoftUeHelper helper;
  // Configure and install

  // Simulation
  Simulator::Run ();

  // Results
  // Print performance metrics

  // Cleanup
  Simulator::Destroy ();
  return 0;
}

📚 Additional Resources

🤝 Contributing Examples

We welcome contributions of new examples! Please ensure:

  1. Unique Value: Demonstrate specific Soft-UE capabilities
  2. Complete Documentation: Clear purpose and usage instructions
  3. Performance Validation: Include performance expectations
  4. Error Handling: Robust error checking and logging
  5. Code Quality: Follow project coding standards

Submit example contributions through GitHub Issues or Pull Requests.


📞 Getting Help

If you encounter issues with examples:

  1. Check Common Issues section
  2. Search existing GitHub Issues
  3. Create new issue with:
    • Example name and version
    • Complete command line used
    • Error messages and logs
    • Expected vs actual behavior

Happy simulating with Soft-UE! 🚀