Automatic Floating-Point to Fixed-Point Transformations

Slides:



Advertisements
Similar presentations
Fakultät für informatik informatik 12 technische universität dortmund Optimizations - Compilation for Embedded Processors - Peter Marwedel TU Dortmund.
Advertisements

FINITE WORD LENGTH EFFECTS
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Hardware/Software Codesign.
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
CS6800 Advanced Theory of Computation
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
ISSPIT Ajman University of Science & Technology, UAE
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
Automating Transformations from Floating Point to Fixed Point for Implementing Digital Signal Processing Algorithms Prof. Brian L. Evans Embedded Signal.
- 1 - EE898-HW/SW co-design Hardware/Software Codesign “Finding right combination of HW/SW resulting in the most efficient product meeting the specification”
Ranga Rodrigo April 6, 2014 Most of the sides are from the Matlab tutorial. 1.
A Genetic Algorithms Approach to Feature Subset Selection Problem by Hasan Doğu TAŞKIRAN CS 550 – Machine Learning Workshop Department of Computer Engineering.
ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.
A Budget Constrained Scheduling of Workflow Applications on Utility Grids using Genetic Algorithms Jia Yu and Rajkumar Buyya Grid Computing and Distributed.
On comparison of different approaches to the stability radius calculation Olga Karelkina Department of Mathematics University of Turku MCDM 2011.
Floating-point to fixed-point code conversion with variable trade-off between computational complexity and accuracy loss Alexandru Bârleanu, Vadim Băitoiu.
Floating Point vs. Fixed Point for FPGA 1. Applications Digital Signal Processing -Encoders/Decoders -Compression -Encryption Control -Automotive/Aerospace.
HW/SW PARTITIONING OF FLOATING POINT SOFTWARE APPLICATIONS TO FIXED - POINTED COPROCESSOR CIRCUITS - Nalini Kumar Gaurav Chitroda Komal Kasat.
Genetic Algorithms Genetic algorithms imitate a natural optimization process: natural selection in evolution. Developed by John Holland at the University.
Low-Power Multipliers with Data Wordlength Reduction Kyungtae Han Brian L. Evans Earl E. Swartzlander, Jr.
1 Exploring Custom Instruction Synthesis for Application-Specific Instruction Set Processors with Multiple Design Objectives Lin, Hai Fei, Yunsi ACM/IEEE.
ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.
Fuzzy Genetic Algorithm
Computational Complexity Jang, HaYoung BioIntelligence Lab.
 Embedded Digital Signal Processing (DSP) systems  Specification with floating-point data types  Implementation in fixed-point architectures  Precision.
ESPL 1 Wordlength Optimization with Complexity-and-Distortion Measure and Its Application to Broadband Wireless Demodulator Design Kyungtae Han and Brian.
C OMPARING T HREE H EURISTIC S EARCH M ETHODS FOR F UNCTIONAL P ARTITIONING IN H ARDWARE -S OFTWARE C ODESIGN Theerayod Wiangtong, Peter Y. K. Cheung and.
Solving the Maximum Cardinality Bin Packing Problem with a Weight Annealing-Based Algorithm Kok-Hua Loh University of Maryland Bruce Golden University.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
Kanpur Genetic Algorithms Laboratory IIT Kanpur 25, July 2006 (11:00 AM) Multi-Objective Dynamic Optimization using Evolutionary Algorithms by Udaya Bhaskara.
Automatic Evaluation of the Accuracy of Fixed-point Algorithms Daniel MENARD 1, Olivier SENTIEYS 1,2 1 LASTI, University of Rennes 1 Lannion, FRANCE 2.
Digital Filter Realization
Alice E. Smith and Mehmet Gulsen Department of Industrial Engineering
FPGA CAD 10-MAR-2003.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Recursive Architectures for 2DLNS Multiplication RESEARCH CENTRE FOR INTEGRATED MICROSYSTEMS - UNIVERSITY OF WINDSOR 11 Recursive Architectures for 2DLNS.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Digital Signal Processor HANYANG UNIVERSITY 학기 Digital Signal Processor 조 성 호 교수님 담당조교 : 임대현
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Application of digital filter in engineering
Evolutionary Computation: Advanced Algorithms and Operators
Introduction to the FPGA and Labs
Genetic Algorithms.
Optimization Of Robot Motion Planning Using Genetic Algorithm
An Evolutionary Approach
Evolutionary Algorithms Jim Whitehead
Adnan Quadri & Dr. Naima Kaabouch Optimization Efficiency
UNIVERSITY OF MASSACHUSETTS Dept
CSC 380: Design and Analysis of Algorithms
Automating Transformations from Floating Point to Fixed Point for Implementing Digital Signal Processing Algorithms Kyungtae Han Ph.D. Defense Committee.
Topic 3d Representation of Real Numbers
Comparing Genetic Algorithm and Guided Local Search Methods
Matlab as a Development Environment for FPGA Design
Artificial Intelligence Chapter 4. Machine Evolution
CSE 370 – Winter 2002 – Comb. Logic building blocks - 1
Multi-Objective Optimization
HIGH LEVEL SYNTHESIS.
Dept. of Electrical and Computer Engineering
University of Texas at Austin
Artificial Intelligence Chapter 4. Machine Evolution
Data Wordlength Reduction for Low-Power Signal Processing Software
C Model Sim (Fixed-Point) -A New Approach to Pipeline FFT Processor
Introduction to Genetic Algorithm and Some Experience Sharing
Md. Tanveer Anwar University of Arkansas
Topic 3d Representation of Real Numbers
Beyond Classical Search
Scalable light field coding using weighted binary images
CSC 380: Design and Analysis of Algorithms
Presentation transcript:

Automatic Floating-Point to Fixed-Point Transformations Kyungtae Han, Alex G. Olson, Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin 2006 Asilomar Conference on Signals, Systems, and Computers October 30th, 2006

Outline Introduction Background Fixed-point wordlength optimizations Automate transformations of systems Conclusion

Implementing Digital Signal Processing Algorithms Hardware Price Power* Floating- Point Processor $ Floating-Point Program Code Conversion H L Digital Signal Processing Algorithms Fixed- Point Processor Fixed Point (Uniform Wordlength) $ Wordlength Optimization L H Fixed- Point ASIC Fixed Point (Optimized Wordlength) $ L H ASIC: Application Specific Integrated Circuit * Power consumption

Transformations to Fixed Point Advantages Lower hardware complexity Lower power consumption Faster speed in processing Disadvantages Introduces distortion due to quantization error Search for optimum wordlength by trial & error is time-consuming Research goals Automate transformations to fixed point Control distortion vs. complexity tradeoffs Floating-Point Program Code Conversion Transformation Wordlength Optimization Fixed Point (Optimized Wordlength)

Distortion vs. Complexity Tradeoffs Shorter wordlength may increase application distortion and decrease implementation complexity Application distortion d(w) c(w) Implementation cost function d(w) Application distortion function Feasible region Optimal tradeoff curve Implementation complexity c(w) Minimize implementation cost Minimize application distortion

Search for Optimum Wordlength Complete search Search whole space Impractical in systems with many variables Gradient-based search Utilizes gradient information to determine next candidates Complexity measure (CM) [Sung and Kum, 1995] Distortion measure (DM) [Han et al., 2001] Complexity-and-distortion measure (CDM) [Han and Evans, 2004] Guided random search Genetic algorithm for single objective [Leban and Tasic, 2000] Multiple objective genetic algorithm

Complexity-and-Distortion Measure Weighted combination of measures Single objective function: Gradient-based search Initialization Iterative greedy search based on complexity and distortion gradient information c(w) Complexity function d(w) Distortion function Dmax Constant for maximum distortion Cmax Constant for maximum complexity Wordlength lower bound upper bound

Genetic Algorithm Evolutionary algorithm Inspired by Holland 1975 New Gene Pool Function Evaluation Mutation Selection Mating Child Genes Parental Genes w/ Measure Evolutionary algorithm Inspired by Holland 1975 Mimic processes of plant and animal evolution Find optimum of a complex function [From Greg Rohling’s Ph.D Defense 2004]

Case Study: Filter Design Infinite impulse response (IIR) filter Complexity measure: Area model of field-programmable gate array (FPGA) [Constantinides, Cheung, and Luk 2003] Distortion measure: Root mean square (RMS) error Seven fixed-point variables (indicated by slashes) Delay b0 b1 -a1 x[n] y[n]

Case Study: Gradient-Based Search CDM could lead to lower complexity and lower number of simulations compared to DM and CM Search Method Gradient Measure Number of Simulations Complexity Estimate (LUT) Distortion (RMS)* Complete DM CDM CM - 316 145 417 167 ** 51.05 49.85 51.95 0.0981 0.0992 0.0986 * Maximum distortion measured by root mean square (RMS) error is 0.1 ** 167 = 268,435,456 (8.5 years, if 1 second per 1 simulation)

Case Study - IIR: Genetic Algorithm Search Pareto optimal set (nondominated) Handles multiple objectives: Error and Area Pareto Front 9,000 simulations 22,500 simulations 45,000 simulations 100th Generation 250th Generation 500th Generation * Population for one generation: 90 LUT: Lookup table

Case Study: Comparison Contribution #1 Case Study: Comparison Superpose gradient-based search (GS) results on GA results 50th Generation (4500 simulations) 500th Generation (45000 simulations) * Required RMSmax for gradient-based search are Dmax {0.12, 0.1, 0.08} GS methods can get stuck in a local minimum GS methods reduce running time (CDM: 145 simulations)

Automating Transformations from Floating Point to Fixed Point Existing fixed-point tools Support fixed-point simulation Convert floating-point code to raw fixed-point code Manually find optimum wordlength by trial and error Automating transformations Fully automate conversion and wordlength optimization process (Proposed) SNU gFix, Autoscaler CoWare SPW HDS Synopsys CoCentric MATLAB Fixed-point toolbox MATLAB Fixed-point blockset AccelChip DSP synthesis Catalytic RMS, MCS Fixed-point tools Floating-Point Program Code Conversion Wordlength Optimization Wordlength-Optimized Fixed-Point Program

Code Generation for Fixed-Point Program Adder function in MATLAB Function [c] = adder_fx(a, b) c = 0; a = fi (a, 1,32,16); b = fi (b, 1,32,16); c = fi (c, 1,32,16); c(:) = a + b; Function [c] = adder(a, b) c = 0; c = a + b; Determined by designers with trial and error (a) Floating point program for adder (b) Raw fixed-point program Function [c] = adder_fx(a, b, numtype) c = 0; a = fi (a, numtype.a); b = fi (b, numtype.b); c = fi (c, numtype.c); c(:) = a + b; WL S FWL fi(a, S,WL,FWL) is a constructor function for a fixed-point object in fixed-point toolbox [S: Signed, WL: Wordlength, FWL: Fraction length] (c) Converted fixed-point program for automating optimization (Proposed)

Automating Transformation Environment for Wordlength Optimization Input Data Top Program Floating-Point Program Optimum Wordlength Evaluation Program (Objectives) Search Engine Fixed-Point Program Gradient-based or Genetic algorithm Range Estimation Complexity Estimation Error Estimation Given floating-point program and options, auxiliary programs are automatically generated Given input data, optimum wordlength is searched

Demo of Released Software

Conclusion Search for optimum wordlength Gradient-based search reduces execution time with complexity-and-distortion measure method while solutions could be trapped in local optimum Genetic algorithm can find distortion vs. complexity tradeoff curve, but it requires longer execution time Automate transformations from floating-point programs to fixed-point programs Free software release is available at www.ece.utexas.edu/~bevans/projects/wordlength/converter/

End Thank you!

Backup Slides Backup Slides

Case Study- Receiver: Gradient-Based Search Demodulate Integrate & Dump Search Method Gradient Measure Number of Simulations Complexity Estimate (LUT) Distortion (RMS)* Complete DM CDM CM - 66 65 195 164 40.65 43.65 41.95 0.083 0.085 0.081 * Maximum distortion measured by bit error rate (BER) is 0.1

Case Study - Receiver: Genetic Algorithm Population for one generation: 90 25th Generation 50th Generation 100th Generation 200th Generation

Fixed-Point Data Format Integer wordlength (IWL) Number of bits assigned to integer representation Fractional wordlength (FWL) Number of bits assigned to fraction Wordlength (WL) SystemC format www.systemc.org S X Wordlength Integer wordlength Fractional (Binary point) π = 3.14159…(10) [Floating Point] 3.140625(10) = 011.001001(2) [WL=9; IWL=3; FWL=6] 3.141479492(10) = 011.00100100001110(2) [WL=16; IWL=3; FWL=13]

Wordlength Optimization Constraints Distortion constraint Complexity constraint Application-specific distortion d(w) Application-specific distortion d(w) Dmax Cmax Implementation Complexity c(w) Implementation Complexity c(w) Enforcing both constraints bounds the search to a finite area region

Wordlength Optimization Wordlengths of signals (variables) in digital system as vector Single objective optimization Multiple objective optimization

Pareto Optimality Pareto optimality: “best that could be achieved without disadvantaging at least one group” [Allan Schick 1970] Pareto optimal set is set of nondominated solutions E is dominated by C as all objectives for C are less than corresponding objectives for E Solutions A, B, C, D are nondominated (not dominated by any solution) Pareto front is boundary (tradeoff curve) that connects Pareto optimal set solutions Pareto Front I A G Objective 2 H B E C F D Objective 1 : Nondominated : Dominated

Comparison of Proposed Methods Gradient-based search Genetic algorithm Type of Solution One point Family of points Tradeoff Curve Found No Yes Execution Time Short Long Amount of Computation Low High Parallelism

Automatic Transformation Flow Code generation Parse floating-point program Generate a raw fixed-point program and auxiliary programs (top, objective, cost, etc.) Range estimation Estimate range to avoid overflow (Analytical/Simulation) Determine integer wordlength (IWL) Wordlength optimization Optimize wordlength according to given input, and error specification (Analytical/Simulation) Determine fractional wordlength (FWL) Code Generation Range Estimation Wordlength Optimization

Code Generations <Run Code Generation> <Floating-point Program>