AN APPROACH OF UBIQUITOUS DEVICES USING T-ENGINE IN VIETNAM

: The 21st century is the era of Ubiquitous Computing where computing devices are present everywhere in our lives. To satisfy the development of this tendency, many hardware platforms have been proposed for developing Ubiquitous devices. Among them, T-Engine, an open standardized development platform for embedded systems, is one of the most popular platforrms. It is nowadays compatible with embedded equipments for a wide range of fields. In Vietnam, T-Engine has just been introduced for 4 years. However, most of the ubiquitous applications using T-Engine are developed restrictively based on the standard hardware of T-Engine. One issue that arises is the necessity of a solution to expand T-Engine hardware and use it to control automatic systems to satisfy different types of Ubiquitous devices. This research is to propose an approach to use T-Engine in the Ubiquitous Devices that require the attachment of the additional hardware as well as the complicated control mechanism with real time constraints. In this research, we proposed an expanding solution T-Engine through the extension bus. Besides that, we consider the timing problems in bus transaction and problems in real-time programming. A simple robot demonstration has also been designed and implemented to prove the feasibility of our model. This approach will open up a new tendency of developing complicated Ubiquitous devices using T-Engine in Vietnam.


Ubiquitous computing is
systems. Therefore, it is required to have the ability to handle a number of complex tasks.
In our research, we concentrate on the last of the mentioned above research trends. That is utilizing standard platforms, particularly, it is a famous platform called T-Engine. We propose a model for using this platform in ubiquitous devices to fulfill the characteristic of ability to handle a number of complex tasks.    P2 area is the one that allows the accessing without Memory Management Unit and Cache.

SOLUTION OF EXPANDING T-ENGINE HARDWARE
It means that the virtual address space and external address space are mapped directly.
However, P2 area accessing requires the privileged authority with two ways to access.
The first one is to set the type of the task that contains the accessing code to system level. By this way, the task will have right to use all other kinds of resource of the system besides TAÏ P CHÍ PHAÙ T TRIEÅ N KH&CN, TAÄ P 14, SOÁ K4 -2011 Trang 19 the right of accessing the external address space. As the result, system resources may be unintentionally damaged by this task. The second way is using device driver. All of the program portions that contain the external address space will be place in the device driver.
The user task will access the external address space through some device driver interface function.

TIMING PROBLEMS
Timing problems affect the correctness and the speed of the transaction. Figure 3 describes the timing waveform of a standard bus cycle and a bus cycle with wait cycles.    There are some problems that need considering when programming with T-Kernel.
The first problem is resource sharing, the common problem of multitasking operating system. Resource sharing is a function of task priority. The higher priority task has precedence over other tasks when accessing shared resources. However, if higher priority tasks always take resources, lower priority tasks will be in starvation state.
The second problem is deadlock. Deadlock happens when the following conditions are present: mutual exclusion, no preemption, hold and wait, or circular wait.
The third problem is priority inversion.
Priority inversion is a situation in which a lowpriority task executes while a higher priority task waits on it due to resource contentions. T-Kernel provides two type of mutex object: priority inheritance mutex and priority ceiling mutex.
The solutions for these problems can be found in [1], in which the authors give out several models to overcome specific problems when programming with real-time operating system.

DEMONSTRATION
A robot is a typical automatic system application so we design a simple robot to demonstrate our approach. It is implemented  When it has finished doing a command, it sends an interrupt signal to T-Engine.
Robot is controlled by six concurrent tasks.
Four tasks are used to control motor cards. One task controls the interaction with user. The other task is the main processing task. These tasks communicate with each other's by a message buffer.

Figure 5.
Motor card block diagram.

CONCLUSION
The research is the first step in developing the controlling application of T-Engine as well