8 research outputs found

    An Early Real-Time Checker for Retargetable Compile-Time Analysis

    Get PDF
    ABSTRACT With the demand for energy-efficient embedded computing and the rise of heterogeneous architectures, automatically retargetable techniques are likely to grow in importance. On the one hand, retargetable compilers do not handle realtime constraints properly. On the other hand, conventional worst-case execution time (WCET) approaches are not automatically retargetable: measurement-based methods require time-consuming dynamic characterization of target processors, whereas static program analysis and abstract interpretation are performed in a post-compiling phase, being therefore restricted to the set of supported targets. This paper proposes a retargetable technique to grant early realtime checking (ERTC) capabilities for design space exploration. The technique provides a general (minimum, maximum and exact-delay) timing analysis at compile time. It allows the early detection of inconsistent time-constraint combinations prior to the generation of binary executables, thereby promising higher design productivity. ERTC is a complement to state-of-the-art design flows, which could benefit from early infeasiblity detection and exploration of alternative target processors, before the binary executables are submitted to tight-bound BCET and WCET analyses for the selected target processor

    Um analisador de restrições de tempo real para compiladores redirecionáveis automaticamente

    Get PDF
    Dissertação (mestrado) - Universidade Federal de Santa Catarina, Centro Tecnológico. Programa de Pós-Graduação em Ciência da Computação

    OpenISA, um conjunto de instruções híbrido

    Get PDF
    Orientador: Edson BorinTese (doutorado) - Universidade Estadual de Campinas, Instituto de ComputaçãoResumo: OpenISA é concebido como a interface de processadores que pretendem ser altamente flexíveis. Isto é conseguido por meio de três estratégias: em primeiro lugar, o ISA é empiricamente escolhido para ser facilmente traduzido para outros, possibilitando flexibilidade do software no caso de um processador OpenISA físico não estar disponível. Neste caso, não há nenhuma necessidade de aplicar um processador virtual OpenISA em software. O ISA está preparado para ser estaticamente traduzido para outros ISAs. Segundo, o ISA não é um ISA concreto nem um ISA virtual, mas um híbrido com a capacidade de admitir modificações nos opcodes sem afetar a compatibilidade retroativa. Este mecanismo permite que as futuras versões do ISA possam sofrer modificações em vez de extensões simples das versões anteriores, um problema comum com ISA concretos, como o x86. Em terceiro lugar, a utilização de uma licença permissiva permite o ISA ser usado livremente por qualquer parte interessada no projeto. Nesta tese de doutorado, concentramo-nos nas instruções de nível de usuário do OpenISA. A tese discute (1) alternativas para ISAs, alternativas para distribuição de programas e o impacto de cada opção, (2) características importantes de OpenISA para atingir seus objetivos e (3) fornece uma completa avaliação do ISA escolhido com respeito a emulação de desempenho em duas CPUs populares, uma projetada pela Intel e outra pela ARM. Concluímos que a versão do OpenISA apresentada aqui pode preservar desempenho próximo do nativo quando traduzida para outros hospedeiros, funcionando como um modelo promissor para ISAs flexíveis da próxima geração que podem ser facilmente estendidos preservando a compatibilidade. Ainda, também mostramos como isso pode ser usado como um formato de distribuição de programas no nível de usuárioAbstract: OpenISA is designed as the interface of processors that aim to be highly flexible. This is achieved by means of three strategies: first, the ISA is empirically chosen to be easily translated to others, providing software flexibility in case a physical OpenISA processor is not available. Second, the ISA is not a concrete ISA nor a virtual ISA, but a hybrid one with the capability of admitting modifications to opcodes without impacting backwards compatibility. This mechanism allows future versions of the ISA to have real changes instead of simple extensions of previous versions, a common problem with concrete ISAs such as the x86. Third, the use of a permissive license allows the ISA to be freely used by any party interested in the project. In this PhD. thesis, we focus on the user-level instructions of OpenISA. The thesis discusses (1) ISA alternatives, program distribution alternatives and the impact of each choice, (2) important features of OpenISA to achieve its goals and (3) provides a thorough evaluation of the chosen ISA with respect to emulation performance on two popular host CPUs, one from Intel and another from ARM. We conclude that the version of OpenISA presented here can preserve close-to-native performance when translated to other hosts, working as a promising model for next-generation, flexible ISAs that can be easily extended while preserving backwards compatibility. Furthermore, we show how this can also be a program distribution format at user-levelDoutoradoCiência da ComputaçãoDoutor em Ciência da Computação2011/09630-1FAPES

    C compiler retargeting based on instruction semantics models

    No full text
    Efficient architecture exploration and design of application specific instruction-set processors (ASIPs) requires retargetable software development tools, in particular C compilers that can be quickly adapted to new architectures. A widespread approach is to model the target architecture in a dedicated architecture description language (ADL) and to generate the tools automatically from the ADL specification. For C compiler generation, however, most existing systems are limited either by the manual retargeting effort or by redundancies in the ADL models that lead to potential inconsistencies. We present a new approach to retargetable compilation, based on the LISA 2.0 ADL with instruction semantics, that minimizes redundancies while simultaneously achieving a high degree of automation. The key of our approach is to generate the mapping rules needed in the compiler’s code selector from the instruction semantics information. We describe the required analysis and generation techniques, and present experimental results for several embedded processors. 1

    C Compiler Retargeting Based on Instruction Semantics Models

    No full text

    ADL based automatic compiler backend generation

    Get PDF
    Orientador: Paulo Cesar CentoducatteDissertação (mestrado) - Universidade Estadual de Campinas, Instituto de ComputaçãoResumo: O processo de automatização da criação de backends de compiladores, isto é, do componente responsável pela tradução final para código de máquina, é perseguido desde o surgimento dos primeiros compiladores. A separação entre os algoritmos empregados no backend e a descrição formal da máquina, que requer conhecimento sobre a arquitetura alvo, é uma característica bastante desejada, uma vez que propicia a criação de novos backends sem a necessidade de conhecer o projeto do compilador, mas apenas do processador. Por esse motivo, um esforço natural para manter o desenvolvimento simples e intuitivo é a concentração do conhecimento sobre a máquina alvo em uma forma concisa de descrição, a partir da qual seja possível especializar algoritmos genéricos de compilação para este alvo específico. Uma linguagem de descrição de arquiteturas (ADL) permite a especificação das características arquiteturais de processadores, incluindo o seu conjunto de instruções (ISA). Neste trabalho, um estudo de mecanismos para gerar backend de compiladores através de descrições arquiteturais de processadores é apresentado, com ênfase no estudo de caso da ADL ArchC com o compilador LLVM. Um protótipo de um gerador de backends para LLVM a partir de uma descrição em ArchC foi desenvolvido, e backends para as arquiteturas ARM, MIPS, SPARC e PowerPC foram gerados com sucesso. Para alcançar este objetivo, foi usado um algoritmo de busca para resolver o problema da programação automática e inferir como implementar fragmentos pré-selecionados da linguagem intermediária LLVM utilizando instruções de uma arquitetura alvo arbitrária. Quatro técnicas para aumentar a velocidade deste algoritmo são apresentadas, de forma a não somente viabilizar uma solução para a geração automática de backends, mas também concluir o processo em menos de 20 segundos para três das quatro arquiteturas testadas. Programas do benchmark Mibench foram compilados com os compiladores gerados, executados com simuladores ArchC e os resultados comparados com aqueles gerados a partir dos mesmos programas compilados com os compiladores gcc e LLVM original, validando os novos backends. A qualidade do código gerado pode ser comparada com a de compiladores consagrados, caso seja utilizado um otimizador peephole para realizar substituições simples de algumas sequências ineficientesAbstract: Researchers pursue the automation of compiler backend generation, the component responsible for final translation from intermediate language to machine code, since the begining of compilers theory creation. The separation between the algorithms used in the backend and formal machine description, which encompasses knowledge about the target architecture, is an important feature, since it facilitates the creation of new backends without the need for deep understanding of the compiler project. For this reason, an effort to maintain the development natural, simple and intuitive must concentrate the knowledge of the target machine in a concise description in a way it is possible to specialize generic algorithms to this target. An architecture description language (ADL) allows the specification of architectural features of processors, comprising the instruction set architecture available. This work presents a study of mechanisms for generating compiler backend through architectural descriptions of processors, with emphasis on a case study of the ArchC ADL with the LLVM compiler. We developed an automatic backend generator prototype for LLVM backends based on ArchC and successfully generated backends for the architectures ARM, MIPS, PowerPC and SPARC. To achieve this, we used a search algorithm to solve the problem of automatic programming and to infer how to implement pre-selected fragments of LLVM intermediate language using instructions of an arbitrary target architecture. We present four techniques to increase the speed of this algorithm which not only enables a solution for the automatic generation of backends, but also completes the process in less than 20 seconds for three of four architectures tested. Test compilation of Mibench benchmark programs attested the proper functioning of the backend and revealed that the quality of the generated code can compare with that of existing compilers, if a peephole optimizer were used to perform some simple substitutions of inefficient sequencesMestradoCiência da ComputaçãoMestre em Ciência da Computaçã

    MiADL : linguagem para geração automática de simuladores redireccionáveis

    Get PDF
    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

    Customising compilers for customisable processors

    Get PDF
    The automatic generation of instruction set extensions to provide application-specific acceleration for embedded processors has been a productive area of research in recent years. There have been incremental improvements in the quality of the algorithms that discover and select which instructions to add to a processor. The use of automatic algorithms, however, result in instructions which are radically different from those found in conventional, human-designed, RISC or CISC ISAs. This has resulted in a gap between the hardware’s capabilities and the compiler’s ability to exploit them. This thesis proposes and investigates the use of a high-level compiler pass that uses graph-subgraph isomorphism checking to exploit these complex instructions. Operating in a separate pass permits techniques to be applied that are uniquely suited for mapping complex instructions, but unsuitable for conventional instruction selection. The existing, mature, compiler back-end can then handle the remainder of the compilation. With this method, the high-level pass was able to use 1965 different automatically produced instructions to obtain an initial average speed-up of 1.11x over 179 benchmarks evaluated on a hardware-verified cycle-accurate simulator. This result was improved following an investigation of how the produced instructions were being used by the compiler. It was established that the models the automatic tools were using to develop instructions did not take account of how well the compiler could realistically use them. Adding additional parameters to the search heuristic to account for compiler issues increased the speed-up from 1.11x to 1.24x. An alternative approach using a re-designed hardware interface was also investigated and this achieved a speed-up of 1.26x while reducing hardware and compiler complexity. A complementary, high-level, method of exploiting dual memory banks was created to increase memory bandwidth to accommodate the increased data-processing bandwidth provided by extension instructions. Finally, the compiler was considered for use in a non-conventional role where rather than generating code it is used to apply source-level transformations prior to the generation of extension instructions and thus affect the shape of the instructions that are generated
    corecore