- About WSim
- Using WSim
- What is WSim ? br>
- How much does it cost ? br>
- Who/Why to contact ? br>
WSim is a full system emulator for micro-controller based platforms. WSim uses a emulation loop that is byte precise and cycle precise on instruction boundaries. This behaviour allows to debug and analyse application using the same firmware as the target platform. WSim currently support many Ti MSP430 micro-controller models as well Chipcon radio chips and several other devices.
Nothing. WSim is under the Cecill and GNU GPL free software license agreement.
If you have any remark, question or contribution to this simulator, do not hesitate to contact one of the developers. Inputs and feedback are more than welcome. In particular, do not hesitate to ask for additions in this FAQ or in the tutorials.
- How many nodes can I use in a WSim+WSNet simulation ?
- Can I use WSim for TinyOS applications ?
- How can I debug my application using WSim ?
- What is the meaning of the message "block not implemented" ?
- I get a behaviour mismatch between simulation and real target. What should I do ?
You can easily use 10 to 15 WSim nodes in a simulation on a reasonable machine. The CPU load will mainly depend on the wireless network activity you are simulating.
Larger simulations can also be easily built using simulation distribution across several machines on a local network. The distributed parallel simulation technique used between WSim nodes and WSNet relies on multicast IP in order to be able to distribute the simulation on a set of machines. If you want to simulate a large number of nodes then you should dedicate a processor to the WSNet program as it will be the central synchronisation point for all nodes and thus be on the critical path concerning performance issues.
WSim is independant of any operating system. You can use TinyOS, MantisOS, FreeRTOS, Contiki or any embedded OS with WSim. Please see the TinyOS/Wsim tutorial.
One of the main use of WSim is made during the debugging phase of an application. If you need to get more detailed information on the hardware events generated by your software you should switch on debugging information in the source code and recompile WSim.
The main entry point for logs and debug information can be found in liblogger/logger.h This file is the main entry for debugging. Each model in WSim has then its internal debug message filtering system. For the MSP430 the file to look for is arch/msp430/msp430_debug.h If you have any specific needs or are looking for special information on hardware events that could help you debug your application the best is to post on wsim-user
This message means that a hardware part of the simulation platform is not yet done or finished. Most of the work on emulation is done on request and user needs, please fill a feature request on the tracker or contact the mailing-list. We are of course also welcome to submit a patch if you have time to implement the missing parts.
Well, simulation is not perfect all the time. If you find such behaviour mismatch then please provide us with a small example on how to reproduce the error on the user mailing-list mailing list. Simulation mismatch can often be dealt with in a few days.
- How can I compare easily two or more traces coming from different nodes ?
You have to use the
wtracer. This option synchronises all the
different traces so that events can be compared in time.
--merge option can be
on TinyOS traces.
- I get a multicast error when trying to use WSim + WSNet. What goes wrong ?
- Why does WConsole display several times the same data ?
- Netcat does not work and WSim displays the error message "wsim:libselect:update: error on descriptor (id=0:6) type UDP"
If you are not connected to internet you may need to add a route as following :
$route add -net 184.108.40.206 netmask 255.0.0.0 lo
It is a normal behaviour due to backtrack mechanism : nodes synchronisation is performed by rendez-vous. If an event happen before next rendez-vous, a new appointment will be set and nodes will backtrack to last synchronisation point. The program after the synchronisation point is going to be executed, resulting in a double (or more) display on WConsole.
Nevertheless an option has been added to fix this trouble. The serial output is buffered and sent only when reaching a synchronisation point. This patch introduces a small lag in serial output, but same data is sent only once.
You can change the behaviour by using a command line
You probably used the netcat-openbsd package which is the default one on Ubuntu and some other distributions. In order to use the examples and demo.sh scripts please change nc (NetCat) to the netcat-traditional package.
You can keep both netcat-openbsd and netcat-traditional installed on your system if you need to. The two binaries are called "nc" (openbsd version) and "nc.traditional". Most demo.sh script are testing for the presence of nc.traditional before falling back to "nc".