ECE 587 Hardware/Software Co- Design Lecture 23 LLVM and xPilot Professor Jia Wang Department of Electrical and Computer Engineering Illinois Institute.

Slides:



Advertisements
Similar presentations
ECOE 560 Design Methodologies and Tools for Software/Hardware Systems Spring 2004 Serdar Taşıran.
Advertisements

ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
High Level Languages: A Comparison By Joel Best. 2 Sources The Challenges of Synthesizing Hardware from C-Like Languages  by Stephen A. Edwards High-Level.
Evolution and History of Programming Languages Software/Hardware/System.
Program Representations. Representing programs Goals.
Lecture 01 - Introduction Eran Yahav 1. 2 Who? Eran Yahav Taub 734 Tel: Monday 13:30-14:30
SSP Re-hosting System Development: CLBM Overview and Module Recognition SSP Team Department of ECE Stevens Institute of Technology Presented by Hongbing.
Extensible Processors. 2 ASIP Gain performance by:  Specialized hardware for the whole application (ASIC). −  Almost no flexibility. −High cost.  Use.
Representing programs Goals. Representing programs Primary goals –analysis is easy and effective just a few cases to handle directly link related things.
1 HW/SW Partitioning Embedded Systems Design. 2 Hardware/Software Codesign “Exploration of the system design space formed by combinations of hardware.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
Zephyr By Shannon Poskus. What is Zephyr? Zephyr is one of two components of the National Compiler Infrastructure (NCI) project Co-funded by DARPA and.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
From Cooper & Torczon1 Implications Must recognize legal (and illegal) programs Must generate correct code Must manage storage of all variables (and code)
Trend towards Embedded Multiprocessors Popular Examples –Network processors (Intel, Motorola, etc.) –Graphics (NVIDIA) –Gaming (IBM, Sony, and Toshiba)
Center for Embedded Computer Systems University of California, Irvine and San Diego SPARK: A Parallelizing High-Level Synthesis.
1 Chapter 7 Design Implementation. 2 Overview 3 Main Steps of an FPGA Design ’ s Implementation Design architecture Defining the structure, interface.
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
(1) Introduction © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Computer Architecture ECE 4801 Berk Sunar Erkay Savas.
Chap. 1 Overview of Digital Design with Verilog. 2 Overview of Digital Design with Verilog HDL Evolution of computer aided digital circuit design Emergence.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
CS-2710 Computer Organization Dr. Mark L. Hornick web: faculty-web.msoe.edu/hornick – CS-2710 info syllabus, homework, labs… –
Chapter 1. Introduction.
CAD Techniques for IP-Based and System-On-Chip Designs Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan, R.O.C {
Automated Design of Custom Architecture Tulika Mitra
Section 10: Advanced Topics 1 M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi.
Compiler course 1. Introduction. Outline Scope of the course Disciplines involved in it Abstract view for a compiler Front-end and back-end tasks Modules.
ASIP Architecture for Future Wireless Systems: Flexibility and Customization Joseph Cavallaro and Predrag Radosavljevic Rice University Center for Multimedia.
High Performance Embedded Computing © 2007 Elsevier Lecture 3: Design Methodologies Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte Based.
CST320 - Lec 11 Why study compilers? n n Ties lots of things you know together: –Theory (finite automata, grammars) –Data structures –Modularization –Utilization.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
High Performance Embedded Computing © 2007 Elsevier Chapter 1, part 2: Embedded Computing High Performance Embedded Computing Wayne Wolf.
Configurable, reconfigurable, and run-time reconfigurable computing.
1 Towards Optimal Custom Instruction Processors Wayne Luk Kubilay Atasu, Rob Dimond and Oskar Mencer Department of Computing Imperial College London HOT.
ESL and High-level Design: Who Cares? Anmol Mathur CTO and co-founder, Calypto Design Systems.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
Compilers for Embedded Systems Ram, Vasanth, and VJ Instructor : Dr. Edwin Sha Synthesis and Optimization of High-Performance Systems.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
System-level power analysis and estimation September 20, 2006 Chong-Min Kyung.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
Full and Para Virtualization
System-on-Chip Design Hao Zheng Comp Sci & Eng U of South Florida 1.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 2 Computer Organization.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Presented by : A best website designer company. Chapter 1 Introduction Prof Chung. 1.
Objective of the course Understanding the fundamentals of the compilation technique Assist you in writing you own compiler (or any part of compiler)
EMT 351/4 DIGITAL IC DESIGN Week # 1 EDA & HDL.
Chapter 1. Introduction.
System-on-Chip Design
Advanced Computer Systems
Andreas Hoffmann Andreas Ropers Tim Kogel Stefan Pees Prof
Chapter 1 Introduction.
Introduction to Compiler Construction
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
SOFTWARE DESIGN AND ARCHITECTURE
Chapter 1 Introduction.
课程名 编译原理 Compiling Techniques
Compiler Construction
Paper by D.L Parnas And D.P.Siewiorek Prepared by Xi Chen May 16,2003
Professor Jia Wang Department of Electrical and Computer Engineering
Presentation transcript:

ECE 587 Hardware/Software Co- Design Lecture 23 LLVM and xPilot Professor Jia Wang Department of Electrical and Computer Engineering Illinois Institute of Technology April 11, 2016 ECE 587 Hardware/Software Co-DesignSpring 20161

Hardware Acceleration Provide (much) better performance, performance per cost, and/or performance per power/energy than general purpose processors. On specific applications: data analytics, deep learning, bioinformatics, etc. In specific environments: cell phone, cloud, data center, etc. (Much) less NRE cost and shorter time-to-market than ASIC designs. Use commercial off-the-shelf hardware platform. Provide flexibility in functionality via software. What hardware platforms are available? What language(s) should designers use? ECE 587 Hardware/Software Co-DesignSpring 20162

LLVM Chris Lattner, Chapter 11 LLVM, The Architecture of Open Source Applications ECE 587 Hardware/Software Co-DesignSpring 20163

Start as a project (Low Level Virtual Machine) to modernize open source compiler development. At then (early 2000) most open source compilers like GCC are of monolithic architecture, making reusing part of their code almost impossible. Huge obstacle if you want to try new ideas on compilers for real world impact. Now an umbrella project for a set low-level compiler toolchain components. Notably Clang. Also closely related to many new development of programming languages like OpenCL and Swift. ECE 587 Hardware/Software Co-DesignSpring The LLVM Compiler Infrastructure

Frontend: parse source code to build Abstract Syntax Tree (AST), and then into Intermediate Representation (IR). Optimizer: perform language/target-independent transformations. Backend: generate binary code good for particular target. ECE 587 Hardware/Software Co-DesignSpring Classical Three-Phase Compiler Design

Sharing of code makes it easier for people to contribute: no need to implement everything by themselves upfront. ECE 587 Hardware/Software Co-DesignSpring Architecture Implications

Observations Many language implementations don’t share code. Some language implementations may retarget to multiple processors in very language-specific ways. There are needs to build compilers for specific application domains. Successful stories Java and.NET virtual machines, translation to C code: good retargetability only if programming model matches. GCC: though it is extremely difficult to reuse its code as frontend and backend are tightly coupled. ECE 587 Hardware/Software Co-DesignSpring The Reality (before LLVM)

LLVM IR ECE 587 Hardware/Software Co-DesignSpring 20168

LLVM IR (Cont.) ECE 587 Hardware/Software Co-DesignSpring 20169

ECE 587 Hardware/Software Co-DesignSpring LLVM IR Optimization

ECE 587 Hardware/Software Co-DesignSpring Compiler Design with LLVM

Both in textual form for easy exchanging and as data structure for easy algorithmic manipulation. Frontend and backend developers can work independently, without the need to knowing much from the other group. As LLVM IR is very similar to CDFG, one may build HW/SW co-design tools for popular languages without a lot of knowledge of compiler frontend design, as long as one is familiar with CDFG/LLVM IR. Not the case for many other compilers like GCC. ECE 587 Hardware/Software Co-DesignSpring LLVM IR as the Only Interface between Phases

Each optimization pass reads LLVM IR in, performs certain transformations, then emits LLVM IR as the output. Hopefully the output LLVM IR will execute faster than the input. To optimize LLVM IR is then to choose a set of passes that will be applied sequentially. Can be easily extended. Can be application and target specific. ECE 587 Hardware/Software Co-DesignSpring LLVM IR as I/O of Optimization Passes

ECE 587 Hardware/Software Co-DesignSpring LLVM IR Optimization Example

Similar to optimization passes, code generation is also divided into passes to promote code sharing. Instruction selection Register allocation Scheduling Code layout optimization Assembly emission All can be replaced or customized for flexibility. ECE 587 Hardware/Software Co-DesignSpring LLVM Target Code Generation

Optimization across the boundary of languages. ECE 587 Hardware/Software Co-DesignSpring Interesting Capabilities

Code generation after target is known. ECE 587 Hardware/Software Co-DesignSpring Interesting Capabilities (Cont.)

xPilot Chen et al., xPilot: A Platform-Based Behavioral Synthesis System, SRC Techcon Conference 2005 ECE 587 Hardware/Software Co-DesignSpring

Why did previous HLS tools fail (commercially)? Design complexity was still manageable at the RT level in 90’s. Lack of dependable RTL to GDSII flow due to the timing closure problem. HLS tools then were often inferior to manual designs. Advantages of HLS tools Better complexity management: 300K lines of code for typical RTL design vs. 40K lines of code of behavioral description. Shorter verification/simulation cycle Rapid system exploration Higher quality of results ECE 587 Hardware/Software Co-DesignSpring HLS Trend

Provide platform-based behavior synthesis technologies to optimize logic, interconnects, performance, and power simultaneously. Features Applicable to a wide range of application domains Amenable to a rich set of synthesis constraints Platform-based synthesis and optimization Extensible to consider physical information ECE 587 Hardware/Software Co-DesignSpring xPilot System Overview

Support SystemC and C LLVM GCC front-end first compiles SystemC/C into IR. Then high-level constructs, e.g. processes, ports, channels, are recovered from IR. Perform platform characterization Characterize the delay, area, and power for each type of available resource under different input/output count and bit width configurations. ECE 587 Hardware/Software Co-DesignSpring xPilot Frontend

Use linear programming based scheduling algorithm to support a variety of optimization techniques for both data-flow-intensive and control intensive applications. Perform simultaneous functional units and register binding Allow to consider the impacts from interconnects. Allow to explore the design space based on realistic platform-based measurements. ECE 587 Hardware/Software Co-DesignSpring Synthesis Engine

ECE 587 Hardware/Software Co-DesignSpring Experimental Results