• Nenhum resultado encontrado

Chapter 7. Conclusion and Ongoing Work

7.2. Next Generation WSN node

7.2.2. Finite State Machine OS: FSMOS

Chapter 7. Conclusion and Ongoing Work

mode, which means they can run independent and detect event while SoC core node is in sleep mode.

We also need to add special multi HSDTVI devices to enable the run-time fault detection and fault recovery.

7.2.1.5. Constant voltage core and non-constant voltage core

The power supply requirements of different core and different devices are also different.

In order to make full use of the high input range of non-constant voltage core that can directly connect to battery, The Multicore SoC should support both constant voltage power input and non-constant power input.

The constant voltage core or modules such as ADC can use the constant power input, while the non-constant voltage core can directly use the battery voltage to go a step further to decrease the power consumption.

7.2.1.6. Summary

The Multicore SoC is specially optimized for WSN sensor node; it can make full use of the advance of multicore architecture. Through black box concept, it can support different requirements with one chip, decrease the Time to Market (TTM), lower the total cost, reuse the technical resource, minimize the development cost for the new project, and ease the stock management. By using SoC approach, we can further decrease the size of the WSN nodes.

Higher integration of SoC need less extra components, so it can help to develop lower unit price, smaller form factor and higher reliability WSN node.

7.2.2.1. FSMOS Concept

FSMOS is based on following concepts:

 The whole system can be divided into several modules. Each module should have it own Local State. Finite State Machine can describe their running modes.

 FSMOS as a whole big module also has several Global States

 Those Local State and Global States can be easily used in Auto Fault Detection and Fault Recovery

 FSMOS Directly supports Multicore Architecture, provide all the basic multicore system service, such as inter-core communication, multicore power management, and remote process communication.

 FSMOS directly supports IEEE802.15.4, eases the development of WSN application.

 The main source code of FSMOS is C Language, and these codes should directly support cross compiler and can run on different platforms such as AVR, ARM7, ARM11 and PC (WIN and Ubuntu).

 Based on FSMOS, an application can be ported through different platforms without modification.

7.2.2.2. FSMOS High-level Architecture

The high-level architecture of FSMOS is presented on the Figure 7-6. The FSMOS is separated into a number of logical modules each provides a set of APIs accessible for the user.

Chapter 7. Conclusion and Ongoing Work

Network Layer(NWK)

RF Physical Layer(PHY)

Hardware Abstraction Layer(HAL)

Middleware Abstraction Layer

System Services Application Services

iLive

Application

Hardware Driver MiLive PC/Win PC/Ubuntu FSMOS

Figure 7-6 Cross Platform of the FSMOS Software Architecture

 Hardware Abstraction Layer (HAL) provides basic hardware dependent platform independent functionality, like hardware timer, sleep control, GPIO access for the radio interface

 Radio physical layer (PHY) provides functions for radio transceiver access. Some of them are accessible only by the network layer (request to send data, data indication);

some of them can be used from the application (channel selection, random number generation, energy detection, etc.)

 Network layer (NWK) provides network stack functionality, like Frame Transmission, Frame Reception, and Acknowledgement, Routing, Security, etc.

 System services provide common functions for all layers, which are necessary for normal stack operation. System services include basic types and definitions, software timers, default configuration parameters, encryption module access, etc.

 Application services include modules that are not required by the stack, but are common for most applications, such as Over-The-Air upgrade (OTA), etc.

 Middleware Abstraction Layer provides higher abstraction interface for application development, like node configuration, etc.

 Hardware Driver provides basic hardware dependent platform dependent functionality, like hardware timer, sleep control, GPIO access for the radio interface.

The driver included at least AVR, ARM7, ARM11 and PC platform.

7.2.2.3. Remote Modules Based on Remote Processor Call

Debug, test and validate WSN application is still a difficult job. The JTAG tool can help to locate the internal information of WSN node. However, the JTAG tool is a little bit expensive and requires more time for learning how to use it. The tool can only debug one WSN node. If considering the distributed information in a set of WSN nodes, this task will be an even more difficult problem.

There are many methods which have been developed to ease the implementation of WSN application, such as Java Virtual Machine (JVM) (Xing, Xunxing, et al., 2012), Middleware (Xing, Kun Mean, Honglin, & Chengcheng, 2012; Xing, Kun Mean, Hongling, Chengcheng,

& Haiying, 2011), etc. but those methods still focus on one single-core node, and real-time debug issue remains uncovered. Here we introduce a FSMOS based debugging method to archive real-time user-friendly debugging experience.

FSMOS is a cross platform design, so it can run on different platform such as AVR, ARM7, ARM11, PC (WIN and Ubuntu), etc. The PC did not have same hardware as WSN mode, in order to enable FSMOS and application over FSMOS running on PC can access real hardware, FSMOS have special modules, remote module, to support hardware accessment.

The Figure 7-7 shows the block diagram of a FSMOS running on PC with remote module.

The remote module can provide the same service as real module. The only different between remote module and real module is that remote module can’t directly handle the request. So it will forward all the request to a real node in another place, then the request will be handled by that real node. The response will then tranfer back to the remote module in the reverse direction. Then up layer can get the response from remote module simlar as from real module.

The request and response transfer and remote execution are all based on Remote Processor Call (RPC) mechanisms in FSMOS.

Chapter 7. Conclusion and Ongoing Work

Network Layer(NWK)

RF Physical Layer(PHY)

Hardware Abstraction Layer(HAL)

Middleware Abstraction Layer

System Services Application Services

PC Hardware Driver Application

Hardware Driver FSMOS

PC(WIN / Ubuntu)

WSN Node (IEEE 802.15.4)

Remote Hardware Driver Hardware Diver

Remote Processor Call through UART/Wifi/Eth

Figure 7-7 FSMOS running on a PC with the Remote Module

Running the FSMOS on a PC can provide many advantages, such as user-friendly IDE, more resource for complex application prototype, more resource for tracing and debugging, etc. And remote modules enable program running on a PC directly access WSN hardware, such as sending and receiving PHY layer packet, controlling GPIO, reading Sensor, etc.

Furthermore, gathering distributed information from a set of FSMOS running on a PC is also much easier than directly from WSN nodes.

7.2.2.4. Summary

The FSMOS is optimized for multicore architecture. It can make full use of the advance of multicore architecture. With cross platform and Remote Module, the debugging, testing and validation of WSN application based on FSMOS will be much easier. This also will greatly help to improve the reliability of whole system.