A framework for automatic generation of audio processing applications on a dual-core system

Similar documents
An Ultra Low-Power WOLA Filterbank Implementation in Deep Submicron Technology

Convention Paper 6202 Presented at the 117th Convention 2004 October San Francisco, CA, USA

Rapid Prototyping System for Teaching Real-Time Digital Signal Processing

Concurrent Testing with RF

Modeling of an MPEG Audio Layer-3 Encoder in Ptolemy

An introduction to DSP s. Examples of DSP applications Why a DSP? Characteristics of a DSP Architectures

The TMS320 DSP Algorithm Standard

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

Developing and Integrating FPGA Co-processors with the Tic6x Family of DSP Processors

ISSN (Online), Volume 1, Special Issue 2(ICITET 15), March 2015 International Journal of Innovative Trends and Emerging Technologies

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

FPGA-Based Embedded Systems for Testing and Rapid Prototyping

FPGA Co-Processing Architectures for Video Compression

Characterization of Native Signal Processing Extensions

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

High Performance Mixed-Signal Solutions from Aeroflex

REAL-TIME DIGITAL SIGNAL PROCESSING

Brief Introduction to MIPS32 M4K Core Shadow Registers for Microcontroller Applications

EMBEDDED SOPC DESIGN WITH NIOS II PROCESSOR AND VHDL EXAMPLES

MIPS Technologies MIPS32 M4K Synthesizable Processor Core By the staff of

Embedded Systems. 7. System Components

White Paper. The advantages of using a combination of DSP s and FPGA s. Version: 1.0. Author: Louis N. Bélanger. Date: May, 2004.

ECE 637 Integrated VLSI Circuits. Introduction. Introduction EE141

SSD ENDURANCE. Application Note. Document #AN0032 Viking SSD Endurance Rev. A

Hardware/Software Co-design

D Demonstration of disturbance recording functions for PQ monitoring

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

DSP Platforms Lab (AD-SHARC) Session 05

Classification of Semiconductor LSI

14th European Signal Processing Conference (EUSIPCO 2006), Florence, Italy, September 4-8, 2006, copyright by EURASIP

Modular code generation from synchronous models:

Model-Based Design for Large High Integrity Systems: A Discussion Regarding Model Architecture

Soft-Core Embedded Processor-Based Built-In Self- Test of FPGAs: A Case Study

Network protocols and. network systems INTRODUCTION CHAPTER

SDACCEL DEVELOPMENT ENVIRONMENT. The Xilinx SDAccel Development Environment. Bringing The Best Performance/Watt to the Data Center

Conclusions. Introduction. Objectives. Module Topics

Reference Frameworks. Introduction

Code Generation for TMS320C6x in Ptolemy

Reducing the cost of FPGA/ASIC Verification with MATLAB and Simulink

Final Exam Study Guide

Best Practices for Setting BIOS Parameters for Performance

Design Document. May Logging DC Wattmeter. Team Member: Advisor : Ailing Mei. Collin Christy. Andrew Kom. Client: Chongli Cai

WHITE PAPER: ENTERPRISE AVAILABILITY. Introduction to Adaptive Instrumentation with Symantec Indepth for J2EE Application Performance Management

Comprehensive AMS Verification using Octave, Real Number Modelling and UVM

Computer Hardware Requirements for Real-Time Applications

Simulink to Embedded Hardware Paul Peeling MathWorks

Optimal Porting of Embedded Software on DSPs

Modular Design of Embedded Software for Distributed Robot Control

FPGA BASED ADAPTIVE RESOURCE EFFICIENT ERROR CONTROL METHODOLOGY FOR NETWORK ON CHIP

Project Title: Design and Implementation of IPTV System Project Supervisor: Dr. Khaled Fouad Elsayed

Digital Signal Processor 2010/1/4

Embedded Systems: Hardware Components (part I) Todor Stefanov

Design and Verification of FPGA and ASIC Applications Graham Reith MathWorks

Addressing Verification Bottlenecks of Fully Synthesized Processor Cores using Equivalence Checkers

Synthesis of DSP Systems using Data Flow Graphs for Silicon Area Reduction

The Need for Speed: Understanding design factors that make multicore parallel simulations efficient

Understanding Basic DSP/BIOS Features

Blackfin Optimizations for Performance and Power Consumption

Texas Instruments ExpressDSP Algorithm Standard. Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin

A Complete Data Scheduler for Multi-Context Reconfigurable Architectures

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

RTL Coding General Concepts

THE BENEFITS OF MODEL-BASED ENGINEERING IN PRODUCT DEVELOPMENT FROM PCB TO SYSTEMS MENTOR GRAPHICS

Unlocking the Potential of Your Microcontroller

Generating the Control Unit

1. IEEE and ZigBee working model.

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

2008/12/23. System Arch 2008 (Fire Tom Wada) 1

AND8384/D. Using Block Floating-Point in the WOLA Filterbank Coprocessor APPLICATION NOTE

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

Digital Signal Processor Core Technology

REAL TIME DIGITAL SIGNAL PROCESSING

UNIT II PROCESSOR AND MEMORY ORGANIZATION

Further Studies of a FFT-Based Auditory Spectrum with Application in Audio Classification

A Matlab/Simulink Simulation Approach for Early Field-Programmable Gate Array Hardware Evaluation

Separating Reality from Hype in Processors' DSP Performance. Evaluating DSP Performance

Digital Control for Space Power Management Devices

Hardware/Software Partitioning for SoCs. EECE Advanced Topics in VLSI Design Spring 2009 Brad Quinton

Performance Analysis of Line Echo Cancellation Implementation Using TMS320C6201

Introduction to Test Driven Development (To be used throughout the course)

STM32 Journal. In this Issue:

Advanced Design System ISS Cosimulation

Performance of Virtual Desktops in a VMware Infrastructure 3 Environment VMware ESX 3.5 Update 2

Efficient FFT Algorithm and Programming Tricks

AN1881 APPLICATION NOTE G711 Speech Codec: Multichannel Implementation on the ST122 DSP-MCU

EC EMBEDDED AND REAL TIME SYSTEMS

Rapid Prototype with Field Gate (A Design and Implementation of Stepper Motor Using FPGA)

Tutorial Introduction

Automatic Code Generation Technology Adoption Lessons Learned from Commercial Vehicle Case Studies

Node Prefetch Prediction in Dataflow Graphs

Modelling and Simulation Made Easy with Simulink Tiffany Liang Application Engineer MathWorks

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi. Lecture - 10 System on Chip (SOC)

COPY RIGHT. To Secure Your Paper As Per UGC Guidelines We Are Providing A Electronic Bar Code

The PCMCIA DSP Card: An All-in-One Communications System

Communication Systems Design in Practice

Intel Research mote. Ralph Kling Intel Corporation Research Santa Clara, CA

AMS Behavioral Modeling

On Design and Implementation of Locomotive Video Monitoring System. Haifeng Yuan, Jie Peng

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

Transcription:

A framework for automatic generation of audio processing applications on a dual-core system Etienne Cornu, Tina Soltani and Julie Johnson etienne_cornu@amis.com, tina_soltani@amis.com, julie_johnson@amis.com AMI Semiconductor Canada Company, 611 Kumpf Drive, Waterloo, Ontario, N2V 1K8, Canada Abstract In this paper we describe an open framework for programming a dual-core system whose architecture is designed for ultra low-power audio processing applications. We show how the system s architecture leads to a model of computation, i.e. a formalism that describes the execution, scheduling and interaction between components in a system. We also show how applications can automatically be created from a set of components that are specifically architected for the dual-core system in terms of resource usage and performance using a set of complexity metrics associated with the model of computation. 1. Introduction There are many applications for ultra low-power audio signal processing. They include encoding, decoding and general quality enhancement of the audio signal in mobile phones, speakerphones, wireless headsets and a variety of medical devices. Fixed-function products are widely used in these applications, but fully programmable audio processing systems are used increasingly often due to the need for flexibility. As these systems need to match fixed function products in terms of performance and cost, this flexibility is often associated with complex programming as their architecture is optimized for specific applications. The audio processing system presented in this paper is an example of a dual-core system-on-a-chip (SoC) whose architecture is designed for ultra low-power audio signal processing applications. The signal processing system features dual digital signal processing units and one configurable DMA controller for sample management, plus a number of audio-specific mixed-signal components, such as analog-to-digital converters, digital-to-analog converters, filters, and pre-amplifiers. s deployed on the audio processing system share many common signal processing blocks, such as FIR and IIR filters, time/frequency domain transformations and vector multiplication. Systems deployed on the audio processing system also share different algorithms (assembled from blocks), such as noise reduction, dynamic range compression, feedback suppression and echo cancellation. As companies develop these signal processing blocks and algorithms, we observe an increasing desire to expand the lifetime of these blocks and algorithms and therefore to re-use them in other applications. This creates the need for a framework that facilitates modularity and the development of applications from existing components (blocks and algorithms). This framework should also provide the basis for future tools that will be able to generate code from a high-level description. Given the uniqueness of the audio processing system s architecture [1] and its parallel processing units, a formalism that describes the execution, scheduling and interaction between components had to be developed. The framework described in this paper was designed specifically for the audio processing system, as many of the existing concepts and tools, such as TI s expressdsp (see [2]), the Simulink Real-Time Workshop (from The MathWorks) ([3]) and Ptolemy (see [4]), do not directly address the parallelism issue. For example, they lack the complexity measures that allow the fine-tuning of software applications developed for the audio processing system. The framework not only specifies how programmers should develop components, but it also specifies a model of computation adapted to the parallel nature of the audio processing system. In addition, it provides a set of complexity measures that allow application developers to properly address trade-offs and thereby build complete applications that take maximum advantage of the resources available on the audio processing system. This paper begins with a description of the architecture of the dual-core audio processing system. It continues in section 3 with a description of the issues that need to be addressed by the programming framework. In section 4 we present a programming model that forms the basis for this framework. In section 5, we present a tool that brings together system code, a number of algorithms and complexity measures in order to demonstrate the mechanics behind application development and automatic code generation. Finally, in section 6 we present a set of conclusions and describe possible future work that could lead to high-level programming tool specific to the audio processing system. 1

2. System architecture The audio processing system, shown in Figure 1, is a DSPbased system optimized for low-power audio applications such as wireless headsets. The digital part of the audio processing system ([1]) consists of three major components: a weighted overlap-add (WOLA) filterbank coprocessor, a 16-bit fixed-point DSP core, and an input-output processor (IOP) that manages incoming and outgoing audio samples in a set of FIFOs. These three components run in parallel and communicate through shared memory. The parallel operation of these components allows for the implementation of complex signal processing algorithms with low system clock rates, low resource usage and low power consumption. The system is particularly efficient for subband processing in the frequency domain: the configurable WOLA coprocessor efficiently splits the fullband input signals into subbands, leaving the core free to perform the other algorithm calculations. The audio processing system also includes standard digital interfaces such as PCM, UART and I2S for communicating with other devices. The analog part of the audio processing system features two digital-to-analog converters and two analog-to-digital converters. Sampled Audio Signal Input/Output Processor In/Out FIFO UART General Purpose I/O Microcontroller or External Devices Window Microcode WOLA Filterbank Co-processor Timers Data Program Control Unit Address DSP Core Data 8K x 16 Program 12K x 16 Data ALU 16 x 16 -> 40 MAC Figure 1 Audio Processing System The signal flows through the audio processing system as follows. After input samples are digitized by the analog frontend, the IOP stores them in the input FIFO. The IOP generates an interrupt on the core every R samples. The rate at which these interrupts occur is also known as the IOP tick rate. At every IOP tick, algorithms running on the core can perform operations such as IIR or FIR filtering on the timedomain samples stored in the input FIFO. When this is done, the WOLA coprocessor is launched. It processes the timedomain signal through an analyis filterbank and transforms the samples into the frequency-domain. When the analysis operation is complete, algorithms running on the core can perform operations on the frequency-domain data. The WOLA coprocessor is then launched again to apply frequency-domain gains and transform the data back into the time domain using a synthesis filterbank. Samples are stored in the output FIFO by the WOLA coprocessor. They are read by the IOP at every tick and sent to the digital outputs or converted to analog by the analog output stage. 3. Programming patterns Although the system s architecture is designed for audio signal processing, the real benefits of this architecture can only be experienced when applications take full advantage of the system s features. These include efficient use of the system s parallelism, use of hardware support for efficient DSP calculations (e.g., the WOLA and built-in math functions), and frequency-domain processing approaches that utilize multi-rate techniques to reduce computation. An analysis of a large number of blocks, algorithms and applications has provided important information regarding the development methodology and program structure typically employed on the dual-core system. The drive for efficiency means that no operating system is available to perform context switching. Also, developers write as much code as possible in parallel to minimize the clock frequency used (which saves power). To accomplish this, developers typically use an event-based approach where algorithms and background tasks are broken down into blocks, possibly in parallel, which execute in a deterministic number of cycles. The individual blocks of several different algorithms are usually integrated into one application in such a way that the algorithms that compose the application are sometimes not easily separable. Thus, a large portion of the development effort is spent optimizing signal processing blocks and algorithms to operate in this environment. Given the cost of this optimization effort and the associated testing, re-useability is very important. In addition to being able to integrate individual components (blocks and algorithms) in different applications, different versions of a component that perform the same type of function but are optimized either for low power or for best performance can be made simultaneously available. The level of re-use also changes: sometimes source code is shared amongst integrators, and sometimes only object code can be shared because companies want to protect intellectual property. So it is important to be able to define re-useable components, to have information about the characteristics of these components available, and ultimately to be able to use these characteristics when a complete system is being built. When the system components are chosen, a wide range of design and implementation trade-offs are then made on the complete system to obtain the lowest possible power 2

consumption and best possible functionality and performance. The number of configuration parameters in the system is relatively high. Parameters such as sampling frequency, number of frequency bands, band-to-channel mappings, filter lengths, and so on can affect the system in many different ways. In summary, the following requirements for automatic application generation must be taken into consideration: (1) code shall be optimized for the specific dual-core architecture (taking into account parallelism), (2) modules will execute in a pre-determine number of cycles and have to be launched at precise moments, (3) different methods of performing the same function must be supported, (4) re-use at source or object code levels must be provided and (5), a large number of configuration parameters must be supported. Our first step towards achieving automatic application generation was to define a software development standard that specifies all aspects of modular, re-useable software, including coding standards, interfacing standards, systemlevel behaviour, publication of component characteristics and a suitable model of computation. After this standard was defined and a number of algorithms were ported to comply with the standard, a tool for automatic application generation and characterization was developed. The software development standard and the tool are described in the following two sections. 4. Development standard The result of the analysis of programming patterns is a software development standard ( Standard ) for the audio processing system. This document specifies the structures and interfaces that are to be used when designing algorithms and establishes guidelines for the integration of these algorithms into applications. Three levels of interfaces are covered by the standard: the application or system level, the algorithm level and the signal processing block level. In a typical algorithm, the WOLA filterbank coprocessor performs three functions every time a block of samples has been acquired: Analysis, Gain and Synthesis, all under the control of the DSP core which also performs its own tasks concurrently. These tasks can be grouped according to where they occur in relation to the WOLA filterbank s functions. These groupings are identified in Figure 2. Accordingly, the Standard specifies that all code written for the audio processing system, excluding initialization code and interrupt service routines (ISRs), must be included in one of the following seven routines: pre-analysis called after an IOP interrupt while-analysis called after Analysis is launched post-analysis called after an interrupt from the WOLA coprocessor indicates that Analysis has while-gain called after Gain is launched post-gain called after an interrupt from the WOLA coprocessor indicates that Gain has while-synthesis called after Synthesis is launched post-synthesis - called after an interrupt from the WOLA coprocessor indicates that Synthesis has This model of computation, related to Ptolemy s discrete events and process networks models of computation [4], promotes greater load balancing, parallelism and code readability when used in our context. It can also establish the relationship between a code block and the data it needs. WOLA Filterbank Coprocessor RCore IOP Tick Time Analysis Gain Synthesis Call Interrupt Call Interrupt Call Interrupt While- Pre-Analysis Post-Analysis While-Gain Post-Gain Analysis While- Synthesis Post- Synthesis IOP Tick Figure 2 - Structure of a Typical Algorithm That Uses the WOLA. In the Standard, algorithms are broken down into individual modules that will fit into these seven routines. Consider a typical algorithm operating on the Analysis results in order to calculate the gains to be applied during the coprocessor s gain application function; as such, a significant portion of the algorithm must be executed between Analysis and Gain. However, optimal parallelism is achieved if the majority of this algorithm is run in while-analysis, while-gains and whilesynthesis. A typical method is to spread the gain calculation so that it is performed in while-gains and while-synthesis for the current sample block and in while-analysis for the next sample block. The resulting gains are then ready to be applied to the next sample block. This method can be applied when it does not noticeably impact the performance of the algorithm. Thus, the structure provided by the Standard has helped to clarify when the elements of the algorithm should be executed for maximum efficiency. As well as signal processing operations, there are often system-level background processes that are not directly related to the signal path, such as power supply monitoring. The structure provided by the Standard allows the application integrator to see the critical path and thus schedule these background processes around it in such a way as to maximize 3

parallelism. The system integrator may therefore choose to perform background tasks in any of the functions whileanalysis, while-gains and while-synthesis. In addition to the topics described above, the development standard also addresses the following areas: Module interfaces Algorithm interfaces usage and allocation Documentation requirements for modules and algorithms, including timing information General coding standards (including file structure, naming conventions, etc.). The inclusion of each of these topics in the Standard results in code that is much easier to integrate. Although following the standard introduces a certain amount of overhead with respect to memory and cycle requirements, the benefits of following the Standard generally exceed such costs incurred. Depending on the system clock setting, the overhead in clock cycles can be as high as 20 percent. However, the overhead can be reduced by implementing shortcuts in the system code. For example, if no algorithm makes use of the post-gain function, the Synthesis operation can be launched directly when the Gain completes. 5. Automatic application generation tool The purpose of the automatic application generation tool was to investigate and demonstrate the feasibility of automatically generating applications with coding efficiency that would rival hand-generated code. Besides code generation, the prototype tool also gives an indication of the application s complexity in terms of memory usage, parallelism and core cycle usage. As was identified during our analysis of programming and system development patterns, this information is absolutely necessary to allow users to fine-tune application and system parameters. The operations involved in generating the application and complexity measures are described in Figure 3. In order to be properly referenced by the automatic application generation tool, algorithms are implemented in accordance with the Standard as explained in Section 4. Each algorithm is divided into seven routines, based on the use of the data provided by the IOP and the WOLA coprocessor. These seven routines can be used by tool in assembly format or in object code for IP protection purposes. measures such as the number of clock cycles needed by each routine and their memory usage are obtained, and a number of configuration parameters are defined. They will be used by the tool to characterize and fine-tune the entire application. A system-level module common to all applications performs the scheduling according to the defined model of computation. This module manages the interrupt signals generated by the three processors and calls the appropriate functions in the sequential manner illustrated in Figure 3. measures for this module are also determined. After algorithms and system-level modules are developed and characterized, their configuration parameters and complexity measures are entered into the automatic application generation tool. The tool allows the user to select desired algorithms, their configuration parameters, and system settings such as sampling frequency and WOLA filterbank configuration. When all configuration parameters and settings are specified, a file that includes all of the information necessary to compile the source code for the desired application is generated. usage for the entire application is also calculated by the tool. As explained earlier, the optimal use of system resources is crucial in order to obtain the best possible performance from the application. The tool uses its knowledge of the audio processing system s dual-core architecture to determine how busy the main processor is expected to be when running the final application. This allows the application developer to investigate the feasibility of integrating certain algorithms based on the number of required clock cycles and the number of the available clock cycles. Tool Parameters, Parameters, Parameters Algorithm 1 Algorithm 2 Algorithm N System Framework File or Object Figure 3 generation data flow. Object File The actual acoustic performance of the application can be immediately determined by compiling the algorithms, system code and application configuration file, and executing the resulting application object file on a real-time development platform. The process of selecting algorithms and configuration parameters, identifying resource usage, and testing on a real-time platform can then be repeated, as necessary. 6. Conclusions and future work In this paper we have described a standard for the development of applications on the dual-core audio processing system. We have also described the prototype of an automatic application generation tool based on a coding 4

standard. The Standard and the tool will provide significant advantages for both algorithm developers and system integrators. For example, they will allow algorithms to be shared without the need to expose important intellectual property in the source code, and they will allow applications to be generated and fine-tuned in significantly less time. Currently, the framework deals mostly with system integration at the algorithm level. Possible extensions in the future include adapting the framework to handle the integration at a lower level of abstraction, leading to reusability at that level and, ultimately, to the ability to implement applications at a high-level while still retaining the efficiency of low-level coding techniques. References [1] R. Brennan and T. Schneider, A Flexible Filterbank Structure for Extensive Signal Manipulations in Digital Hearing Aids, Proc. IEEE Int. Symp. Circuits and Systems, pp. 569-572, 1998. [2] Texas Instruments expressdsp Algorithm Standard Rules and Guidelines, SPRU352. [3] The MathWorks, Inc., SIMULINK Real-Time Workshop User s Guide. [4] Edward A. Lee, "Overview of the Ptolemy Project," Technical Memorandum UCB/ERL M03/25, July 2, 2003, University of California, Berkeley, CA, 94720, USA. 5