3 research outputs found
Safe and Precise WCET Determination by Abstract Interpretation of Pipeline Models
Failure of computer software in a hard real-time system leads to severe consequences and must be avoided by proving the correctness of the systems software. A prerequisite for this is the determination of an upper bound for the worst-case execution times (WCET) of the tasks in the system. We show that for modern CPUs, WCETs can be obtained by static program analysis methods even for CPUs with execution history sensitives components like caches and pipelines. This is the first time that complex CPU features (out-of-order execution, speculation, etc) have been included in a comprehensive and safe analysis. The approach presented in this thesis is able to handle the analysis of very complex architectures (PowerPC 755) by first modeling the CPU and peripherals of the system and then using abstractions on some components of the system to obtain an analysis. The analysis computes WCET for the basic blocks of the program by simulating the abstract system model. The correctness of the approach is shown. A tool has been built based on this approach, which was evaluated under reallife industry conditions by Airbus France in the course of the DAEDALUS project, showing the practical applicability of the methodology.Fehlverhalten der Computersoftware eines harten Echtzeitsystems kann katastrophale
Folgen haben. Um ein solches Verhalten zu verhindern, muss die Korrektheit
der Programme des Systems vorher nachgewiesen werden. Eine Voraussetzung
hierf®ur ist die Kenntniss von oberen Schranken f®ur die Ausf®uhrungszeit der
Programme (WCET). F®ur moderne CPUs k®onnen solche Schranken effektiv nur
durch statische Analysemethoden verl®asslich gewonnen werden, da die Laufzeiten
stark von kontextsensitiven Komponenten (Caches, Pipelines) abh®angen. Bisher
galten komplexe Merkmale moderner CPUs (out-of-order Ausf®uhrung, Spekulation)
als nicht efzient statisch analysierbar.
Die vorliegende Arbeit pr®asentiert einen Ansatz, der in der Lage ist, sehr komplexe
Architekturen (etwa den PowerPC 755) zu behandeln. Hierbei wird zuerst
ein Modell des Prozessors und der Peripherie des Systems erstellt, dessen Komponenten
dann geeignet abstrahiert werden k®onnen, um eine Analyse zu erhalten.
Die Analyse berechnet WCET f®ur die Basisbl®ocke eines Programmes durch Simulation
des abstrahierten Prozessormodells. Die Korrektheit der Analyse wird
durch die Verwendung der Theorie der abstrakten Interpretation garantiert.
Mit diesem Ansatz wurde ein Werkzeug entwickelt, welches unter Industriebedingungen
von Airbus France im Verlauf des DAEDALUS Projektes evaluiert
wurde. Dabei konnte die praktische Anwendbarkeit des vorgestellten Ansatzes
klar demonstriert werden
MiADL : linguagem para geração automática de simuladores redireccionáveis
Tese de Doutoramento em Electrónica Industrial - Área de Conhecimento em Informática IndustrialOs sistemas embutidos, além de fazerem cada vez mais parte da vida do cidadão
comum, são dispositivos cada vez mais sofisticados e complexos. As equipas de
desenvolvimento de sistemas embutidos têm por isso de lidar com complexidade
crescente para atingir performances e requisitos cada vez mais exigentes (ex. hierarquias
de memória complexas). Estes dispositivos exigem ferramentas de software – tais
como: simuladores, depuradores, assembladores ou compiladores – que têm que
acompanhar a evolução dos mesmos. Torna-se por isso fundamental desenvolver de
forma rápida o conjunto de ferramentas para determinado sistema embutido para
garantir espaço num mercado bastante competitivo, ou seja, conseguir um curto time-tomarket.
O desenvolvimento de aplicações que permitam a rápida e eficaz geração deste
tipo de ferramentas assume relevo no âmbito do desenvolvimento dos sistemas
embutidos.
Das ferramentas de software, o simulador é uma das essenciais para o
desenvolvimento de novas arquitecturas computacionais. Entre as vantagens que
apresenta, destaca-se a flexibilidade e baixo custo, uma vez que permite simular
hardware em estágios iniciais do processo de desenvolvimento, sem necessidade de
existência física do mesmo. Os primeiros simuladores eram desenvolvidos
manualmente. Entretanto têm emergido linguagens de descrição de arquitecturas
(ADLs) que facilitam a geração dessas ferramentas de uma forma automática, rápida,
redireccionável e menos propensa a erros. Uma das vantagens destas linguagens
consiste em permitirem gerar várias ferramentas a partir de uma única descrição, o que
garante desde logo compatibilidade e coerência entre elas. Estas linguagens além de
aplicação prática para fins industriais, podem também ser usadas para fins educacionais
nomeadamente para o ensino de arquitecturas de microprocessadores.
Este trabalho de Doutoramento tem por objectivo contribuir para simplificar o
processo de construção de simuladores, usados no projecto de sistemas embutidos.
Pretende-se mostrar que a melhor forma de alcançar este objectivo consiste numa
abordagem usando uma linguagem estruturada e que explora os comportamentos/sintaxes comuns ao conjunto de instruções da arquitectura alvo. Para
suportar esta abordagem propõem-se uma linguagem que introduz uma forma diferente
de descrever arquitecturas do conjunto de instruções (ISAs). A linguagem nomeada de
Minho Architecture Description Language (MiADL), possui uma estrutura que explora
o que é comum às instruções (comportamento e assembly) e permite a existência de
blocos que são descritos uma vez e podem ser usados várias vezes. Desta forma a
validação e identificação de incoerências fica facilitada e conduz a descrições claras,
robustas e fáceis de depurar. As principais características desta linguagem são a
existência de scopes, a inferência de argumentos, a estrutura em secções que permitem
reutilização em diferentes partes da linguagem, a forma como lida com variabilidades e
regularidades presentes em ISAs e a relação com a informação presente geralmente em
manuais dos processadores. As modelações usando MiADL de vários ISAs complexos,
de arquitecturas conhecidas, resulta em descrições bastante compactas, estruturadas e
fáceis de explorar, quando comparadas com as conseguidas por outras ADLs.
Em termos de simulação, com base em modelações MiADL, na tese é apresentada a
infra-estrutura de geração automática de simuladores redireccionáveis de ISAs usando a
técnica de simulação compilada estática, recorrendo a generic programming. Esta
possibilidade de recorrer àquela técnica de programação deve-se às características da
linguagem, que com outras ADLs não é tão fácil de conseguir. Além de tornar o código
mais compacto e estruturado, permite que o compilador nativo explore optimizações
para conseguir bom desempenho do simulador.Embedded system devices, besides having a growing importance in the common
citizen’s life, are more and more sophisticated and complex devices. The embedded
systems development teams have to deal with the rising complexity to provide higher
performance and more demanding requisites (ex. complex memory organizations).
These devices require software tools – such as: simulator, debugger, linker, assembler
or compiler - that must be proper to those devices. It is therefore essential to develop in
a quick way the software toolkit, for the target embedded system, to assure place in a
competitive market, in other words, to shorten time-to-market. The development of
applications to efficiently generate the software toolkit is of great importance in the
embedded systems development scenario.
From the set of software tools, the simulator is an essential tool for the development
of new computational architectures. It brings flexibility and reduces the cost, since it
allows the hardware simulation in early stages of the development process, without the
physical existence of such hardware. The first simulators were hand-coded developed.
Since then, new Architecture Description Languages (ADLs) have emerged, that have
made easier the generation of these tools in an automatic, quicker, retargetable and error
resilient way. One advantage of these languages is that they allow generating several
tools from a single description. These languages, besides the practical applications for
industrial purposes, can also be used for educational purposes namely for teaching
microprocessors architectures.
The purpose of this PhD work is to contribute for the simplification of generating
simulators to be used in the design of embedded systems. The aim is to demonstrate that
the best way is achieved through the use of a structured language which explores the
common behavioural/syntaxes of the target instruction set architecture. To support this
approach a new language is proposed which introduces a new way to describe
Instructions Set Architectures (ISAs). This language, named Minho Architecture
Description Language (MiADL), possesses a structure that explores what is common
with the instructions (behaviour and assembly) and is block organized. The language blocks can be described once and used several times. In this way the validation and
detection of incoherencies is facilitated, leading to clear, robust and easy to debug
descriptions. The main features of this language are: scopes existence; arguments
inference; structure organized in sections which allows its reuse in different parts of the
description; the way in which it deals with variability and regularities present in
complex ISAs and similarity with the information usually available in processors
manuals. The descriptions of several complex ISAs of known architectures using
MiADL, result in rather compact, structured and easy to explore descriptions, when
compared with the ones obtained by other ADLs.
In this thesis is also discussed the retargetable framework designed for automatic
generation of compiled simulators, from MiADL descriptions, using generic
programming to execute instruction behaviors. The use of function templates is possible
due to MiADL features, with other ADLs this isn’t so easy to accomplish. Besides
making the code more compact and structured, allows to explore optimizations from the
native compiler to achieve improvements in the simulator´s performace.Ministério da Educação - Prodep II