Towards Achieving a Deterministic System from Hardware/Software Co-design

Real-time safety-critical systems have to meet many requirements: strict timing constraints, limited resource availability, and stringent certification standards. In the context of the Gurkh project, traditional Ada run-time system (RTS) does not provide deterministic behavior because it depends on currently available operating systems. Commercial operating systems today offer numerous services and enhancing features which make them more powerful and user-friendly. This usability, however, compromises their simplicity. With many interrupts and memory hierarchies, the time required to complete one task can vary many folds. Although a pessimistic worst-case running time (WCET) could be derived, it would not represent the average performance of the system. In order to achieve a more accurate WCET, a minimal deterministic RTS, RavenHaRT, is developed to provide resource management, task creation and deletion, as well as manages inter-task communication. RavenHaRT is implemented in the hardware description language VHDL which can be implemented on a Field Programmable Gate Array (FPGA). It is therefore very different from traditional RTKs, which are implemented in a software language and run directly on the processor, and are typically not fully predictable. The hardware implementation provides faster response times, greater reliability and predictability, and better utilization of available power resources. In addition, by utilizing an FPGA, RavenHaRT provides some flexibility for system configuration and can leverage parallel processing to achieve higher speed.

Traditional Ada RTS relies on POSIX interface offered by the underlying operating system. Despite the determinism provided by the POSIX library, the system's timing properties are still affected by the enhancing features of the OS. RavenHaRT, implemented in hardware, however provides more accurate timing properties, thus eliminating the pessimism in timing analysis. The Ada RTS needs to be modified to rely on RavenHaRT instead of POSIX. (See figure below)

This modification requires a compiler specific for the system. The GNU NYU Ada Translator (GNAT) is a widely-used open-source Ada95 compiler. To leverage this availability of source code and documentation, the GNAT compiler is selected to be modified for RavenHaRT. A number of program analysis techniques are adopted to study the dependency model of GNAT. Library-slicing is incorporated to eliminate calls to POSIX library. Finally, the GNU Ada Run-Time Library (GNARL) is modified to establish communications to and utilize services offered by RavenHaRT.