Table of Contents

1. WSim: the Worldsens hardware platform simulator
2. WConsole: the Worldsens serial console
3. WTracer: the Worldsens trace reading tool
4. WSNet: the Worldsens wireless network simulator
5. Worldsens: the development framework

Following is a list of tools needed to carry out this tutorial:

Before starting the tutorial, make sure you have installed all the necessary tools listed above. The Worldsens suite will be described in the following. For information on the first couple of tools, please refer to their respective manuals. Please find below some useful links.

[Note]insight and mspgcc

insight isn't available in the official mspgcc package based on gcc 3.2.3 anymore. However to follow the whole tutorial you will need it, that's why we advice you to install the mspgcc4 port of mspgcc based on gcc 4.x. You will find it here : mspgcc4 website.

1. WSim: the Worldsens hardware platform simulator

WSim is part of the Worldsens development environment. WSim is a full platform simulator that can run the target platform object code without modification. The primary goals of WSim are debugging, profiling and performance evaluation for deeply embedded wireless sensor node/network (WSN) distributed applications.

The place of WSim in the development process

Figure II.1. The place of WSim in the development process

Writing distributed WSN applications using the Worldsens toolkit is far easier than using prototype boards due to the fast compile/debug/estimate development cycle. This performance estimation is made possible using a full platform simulation at a cycle accurate level. Peripherals that deal with real time constraints (timers, interrupts, serial ports, radio interface, etc.) are included in the WSim platform model. Time is given in a cycle accurate manner using application instruction timing.

WSim provides a simulation environment in which you can get:

  • Full instruction set support for the target microcontroller
  • Cycle-accurate simulation
  • Simulation of peripherals such as timers
  • Interrupts
  • Cycle-accurate simulation of other peripherals (e.g. UART)
  • External peripherals (radio modules, LCD display, ...)
  • A full system debug and performance analysis framework

WSim should compile and run on any Un*x-like platform. It has been tested on Linux/x86, Linux/x86_64, Linux/ppc32, Linux/Alpha, Solaris9/Sparc, Solaris10/Sparc, MacOSX/ppc32, MacOSX/x86 and Windows XP (using cygwin).

2. WConsole: the Worldsens serial console

The WorldSens serial console (WConsole) is a standalone application that can be used to drive the communication with the pseudo tty model. Its main use is to provide a full duplex interface that can output the octet stream from the simulator and use the host keyboard to communicate with the simulated application. The source code of the serial console can also be used to derive and test applications that will communicate through the serial port of the node in production use such as base station monitoring applications.

WConsole example

Figure II.2. WConsole example

The screenshot of the WSim serial console shown in Figure II.2, “WConsole example” presents a simple application that produces an echo for every character sent to its serial port. The top half of the user interface window presents the simulation output with grayed letters and bottom half is the local keyboard input for the host machine.

3. WTracer: the Worldsens trace reading tool

WSim traces are output in binary format. The WTracer tool transforms the traces in the Gnuplot, VCD or linear formats. The most commonly used output format is VCD. All WSim traces are starting from 0 and several individual traces can be merged and compared using the --compare option of WTracer. An example of VCD traces is available in the TinyOS tutorial.

4. WSNet: the Worldsens wireless network simulator

WSNet is part of the Worldsens development environment. WSNet is a modular event-driven wireless network simulator. Its architecture consists in dint blocks that implement functionnalities of the nodes and the radio medium. As an example, separate blocks are de for the radio propagation, the interference computation or the radio modulation. Similarly, a node is itself composed by several blocks: one for the mobility, one for the application, one for the system queue, one for the mac layer, one for the radio and one for the antenna.

During one simulation, the behaviour of a block is speciusing a model. A model is one particular implementation of the block functionnalities. If we consider the radio propagation block, one model implements the free space propagation model; another one implements a radio range model, etc. Considering the radio modulation block, one model implements the BPSK modulation, another one the FSK modulation, etc.

Models are either provided with the simulator or developped by users. A user can develop models for any of the blocks and use it for its own simulations. A model must implement a given API as well as characteristics that are de by its associated block. WSNet should be able to compile on any Unix-like platform and has been tested on Linux/x86, Linux/x86 64, Linux/ppc32, Linux/Alpha, Solaris9/sparc, Solaris10/sparc, MacOSX/ppc32, Windows XP (using cygwin).

5. Worldsens: the development framework

WSim can be attached to the WSNet simulator through radio interfaces such as the Chipcon CC1100 model. This allows to build a complete simulation framework that is able to debug and analyse a complete wireless sensor network. Thus WSim and WSNet allow to design and rea full distributed application from the top level speciions to the application binary within the same framework and application description: the real application code.

Distributed simulation

Figure II.3. Distributed simulation

Communication between the simulators is done using IPv4 unicast and multicast in order to allow the distribution of the simulation load across a network of workstations. A typical middle range workstation can handle several dozens of concurrent WSN node simulators so that a small set of workstations can scale to hundreds of nodes. This allows the Worldsens environment to provide a performance analysis of real world applications using cycle accurate simulation tools.

These features will be demonstrated in Chapter VI, Token Passing Example.