Modeling Heterogeneous Systems Using SystemC-AMS Case Study: A Wireless Sensor Network Node Michel Vasilevski, Francois Pecheux, Hassan Aboushady, Laurent de Lamarre University Paris VI, Pierre & Marie Curie LIP6-SOC Laboratory, Paris, France {michel.vasilevski francois.pecheux hassan.aboushady laurent.delamarre}@lip6.fr Abstract— The paper presents a preliminary approach for the modeling and simulation of a simple but complete Wireless Sensor Network with two nodes using SystemC-AMS, an open-source C++ library dedicated to the description of heterogeneous systems containing digital, analog, RF hardware parts as well as embedded software. The WSN node, or mote, detailed herein consists of a physical sensor, a continuous time sigma- delta converter with its associated decimation filter, an ATMEGA128 8-bit microcontroller running the embedded application and a QPSK-based 2.4 GHz RF transceiver. The node has been designed to be interoperable with both the XBow MICAZ hardware platform and the TinyOS operating system in a near future. The paper starts with the structural description of the system as a hierarchical set of behavioural modules, then gives an insight on how multi-frequency simulation is handled in SystemC-AMS, and finally presents simulation results that are systematically compared with the Matlab reference in terms of accuracy and simulation time. I. I NTRODUCTION Needless to say that one of the great challenges of the next decade is pervasive/wireless computing. In this context, the ability to design optimal Wireless Sensor Networks is of paramount importance. To improve their competitiveness, major players in the microelectronics industry are faced with two antonymic issues : 1- the need to dramat- ically reduce the cost and design time of their products like SoCs or SIPs for economical reasons, 2- the lack of a unified design environ- ment that can be used efficiently by system designers to model and simulate state-of-the-art systems (i.e. systems that encompass several research activity fields and combine on the same integrated circuit physics, analog and digital electronics, RF/micro-wave and software application). For the past 20 years, hardware description languages have been widely used to model and simulate systems belonging to various engineering fields, from digital and analog electronics to mechanics, RF and even battery cell chemistry. EDA industry proposed recently consistent modeling and simulation frameworks that allow for the description of systems from different disciplines and for the description of interactions between these systems. These frameworks use VHDL-AMS [1] [2] [3] [4] and Verilog-AMS [5] [4] as effective backbones for the modeling. However, when dealing with WSN containing hundreds of nodes, and with a carrier frequency of 2.4 GHz, these frameworks show rapidly their limits in terms of interoperability and simulation performance. One possible solution to the modeling and simulation of ”More than Moore” multiprocessor heterogeneous systems [6] is SystemC-AMS [7] [8] [9] [10] [11], an extension to the existing library SystemC [12]. The first version has been released by Franhofer Gesellschaft EAS/IIS Dresden [13]. Figure 1, extracted from the SystemC-AMS documentation shows how the objective of multi-discipline modeling can be achieved with a set of interoperable userview layers corresponding to the aforementioned research fields. LN Modeling Formalism LN Solver Other Modeling Formalism Other Solver Modeling SDF Formalism DE MoCs (CP, FSM, etc.) Synchronisation Layer SystemC Simulation Kernel Fig. 1. SystemC-AMS layered architecture. In practice, SystemC-AMS allows to describe mixed-signal [14] designs and currently supports two user views and their associated semantic models: conservative and multi-rate Synchronous DataFlow (SDF). For the moment, the conservative view is restricted to linear networks and does not allow the design of real analog subsytems. For the level of modeling required by this system, the multi-rate synchronous dataflow approach is of much more interest. The key idea of this approach is to embed continuous-time modules into dataflow clusters. Modules perform computation and communicate with others via directed data streams carrying time valued samples. A dataflow cluster may contain any number of dataflow modules whose execution is statically scheduled during simulation elaboration. A cluster is managed by a dedicated SystemC process that handles synchronization with the rest of the system. When scheduled by the SystemC simulation kernel, a dataflow cluster runs at a constant time step, defined by the sampling duration time assigned to one port of one of the modules and automatically propagated to others. Hence, SDF is specially suited for communication systems like WSN with strong oversampling : a SystemC-AMS module can be seen as a simple dataflow class function (always named sig proc()) which, at every time step, reads its SDF inputs, computes and accumulates results, and propagates them to the SDF outputs. II. WIRELESS SENSOR NETWORK SYSTEM The modeled WSN system, presented in figure 2, consists of two independent nodes that exchange information through a noisy 2.4GHz communication channel. Nodes are totally equivalent from the hardware standpoint, and can only be distinguished by the soft- ware application they run. The paper describes in turn the interesting parts of the system. Binary File Data memory Binary File Data memory ATMEGA128 RF Transceiver A/D Conversion Sensor RF Transceiver ATMEGA128 8 bits microcontroller 8 bits microcontroller Sensor A/D Conversion Application Application Fig. 2. The WSN, consisting of two nodes. 978-1-4244-1567-0/07/$25.00 © 2007 IEEE 11