15 views

Uploaded by sjpritchard

an347

- PISO
- AI 04 s5 s8 Syllabus-CALICUT UNIVERSITY 2004 ADMISSION
- University of Californi Irvine DSP Engineering
- 5989-7309EN
- 1 Brochure (Technova-2016)
- Multimedia Technology Ch 5
- Me_electronics Digital System
- DSP Project
- lu2005
- Abstract about the person
- S2 Bidang Keahlian Elektronika.pdf
- M.Tech
- DSP
- Power-System-Prote
- PACS Portal News
- Designing a Modular DSP Core for Real-Time Audio Performance
- (Applied and Numerical Harmonic Analysis) Roberto a. Macías, José L. Torrea (Auth.), Carlos Cabrelli, Jose Luis Torrea (Eds.)-Recent Developments in Real and Harmonic Analysis_ in Honor of Carlos Sego (2)
- Chapter 16 -DSP
- SYL DSP
- Digital Signal Processing Laboratory

You are on page 1of 8

AN-347-1.0

Application Note

Introduction

The Farrow-based decimating sample rate converter demonstrates a Farrow resampler. The converter is supplied with the Altera DSP Builder version 2.2.0. You can simulate its performance in MATLAB, change it as required for your application, generate a VHDL version and synthesize it to Altera devices. The converter is designed for an input clock rate identical to the system clock. For applications where the input rate is much lower than the system clock, time sharing should be implemented to get a cost effective solution. The DSP Buillder-example file is FarrowResamp.mdl. For more information on DSP Builder, refer to the Altera website, www.altera.com. Many integrated systems, such as software defined radios (SDR), require data to be resampled so that a unit can comply with different communication standards, where the sample rates are different. In some cases, where one clock rate is a simple integer multiple of another clock rate, resampling can be accomplished using interpolating and decimating FIR filters. However, in most cases the interpolation and decimation factors are so high that this approach is impractical. Farrow resamplers offer an efficient way to resample a data stream at a different sample rate. The underlying principle is that the phase difference between the current input and wanted output is determined on a sample by sample basis. This phase difference is then used to combine the phases of a polyphase filter in such a way that a sample for the wanted output phase is generated. Figure 1 shows the Farrow-based decimating sample rate converter block diagram.

Background

Functional Description

Figure 1. Block Diagram

Input Symmetric Rounding

1 Preliminary

Functional Description

The Farrow-based decimating sample rate converter comprises the following blocks:

Symmetric Rounding

Symmetric rounding ensures that no DC offset is introduced through the rounding operation.

Parabolic Filter

The parabolic filter is a low-pass filter with a passband = 0.25 and a stopband = 0.75 . The filter coefficients for this polyphase filter are suitable for a parabolic farrow combiner, and have been calculated based on a low-pass filter with cutoff at 0.25, and a passband at 0.75. The filter coefficients are: h = [[0 1 0 0] [-0.37102969585002 -0.65524639874618 1.34475360125379 -0.37102969585000] [0.37102969585001 -0.34475360125381 -0.34475360125381 0.37102969585001]] For efficient hardware implementation it is desirable to have the minimum number of multiplications. The filter can be rewritten as: h = [[0 1 0 0] [-0.37102969585002 -1+0.34475360125381 1+0.34475360125379 -0.37102969585000] [0.37102969585001 -0.34475360125381 -0.34475360125381 0.37102969585001]] This way the filter can be implemented using just two multipliers. The samples are fed into both multipliers, and the output of the multipliers is fed into two delay chains. A third delay chain contains delayed versions of the samples. Adders and subtractors are used to combine the elements of the three delay chains to perform the filtering operation.

2 Preliminary

Altera Corporation

Functional Description

Generator

The generator calculates the phase difference between the current input sample and the desired output sample and generates the values for . describes the normalised phase difference between the current input sample and the wanted output sample. Figure 2 shows the generator schematic. Figure 2. Generator Schematic

One way to generate the values for is to use two counters. Assume the clock ratios can be described as a ratio of slow_clock/fast_clock. The lower counter increments by slow_clock until it reaches the value slow_clock fast_clock and then falls back to 0 again. The second counter is similar. It increments by fast_clock until it reaches the value slow_clock fast_clock. However, it only increments if its current value is smaller than the current value of the other counter.

Altera Corporation

3 Preliminary

Getting Started

If this is not the case, the counter pauses and flag the count value as invalid. Value can be generated by taking the difference between the count values. Because the counting is done in integer logic, the difference must be scaled to produce the normalized value between 0 and 1. This scaling is done using a constant gain multiplier, which multiplies with the inverse of slow_clock.

Farrow Combiner

The Farrow combiner replaces the polyphase selector in traditional polyphase filters. It weighs the individual polyphases before adding them.

FIFO Buffer

The farrow combiner works at the input clock rate. This means it generates more samples than it should. The task of the FIFO is to remove invalid samples, and also allows the transfer between the clock domains. While the write side works at input clock rate, the read side works at output clock rate.

Testbench

This testbench provides the following three stimuli:

The sinewave generator is useful to analyse the effect of the resampling on the frequency spectrum. You can change the frequency by double-clicking the Sine Wave block, and changing the Samples per Period parameter The impulse generator generates a single impulse and is 0 for the rest of the simulation. This is a useful tool for investigating the filter, which is part of the farrow resampler The addition of two sinewaves

Getting Started

This section involves the following steps: 1. 2. 3. System Requirements Install the Design Run the Design

4 Preliminary

Altera Corporation

Getting Started

4. 5.

System Requirements

The design requires the following hardware and software:

A PC running the Windows 98/2000/XP software Quartus II version 4.0 or higher DSP Builder version 2.2.0 MATLAB version 6.5 Simulink version 5.0.2 DSP Blockset version 5.0

The design is only shipped with DSP Builder version 2.2.0

To run the design, follow these steps: 1. 2. 3. Open the MATLAB software. At the command prompt, type demo. Choose DSP Builder version 2.2.0 Altera Corporation > Farrow Based Resampler (see Figure 3).

Altera Corporation

5 Preliminary

Getting Started

4. 5.

At the bottom of the right-hand window, click Run this Demo. Choose Start (Simulation menu).

Four waveforms are displayed, which show the spectrum at the following places:

The input The input, quantized The input, if it had been just resampled by registering it in a flip-flop running at the output clock rate (the simplest way of changing sample rate) The output of the Farrow resampler

You can change the stimuli by connecting the input to a different source. You can change the ratio of input clock to output clock, from the MATLAB command prompt, by setting the variables slow_clock and fast_clock to the required numbers. By default the variables are set to 9 and 10 respectively, to provide a ratio of 9/10, i.e., the output rate is 90% of the input clock rate. The variables fast_clock and slow_clock are used in a number of instances throughout the design. Use the following rules for setting the variables:

The slow_clock output, i.e., the output clock, must be slower than fast_clock for a decimating Farrow filter

6 Preliminary

Altera Corporation

Getting Started

slow_clock fast_clock must be less than 214. This is a restriction of this particular implementation. You can work with ratios where this is not the case, but you then need to change the bit width in the accumulators in the mu_gen block If slow_clock is less than half of fast_clock, the filter works, but the results are sub-optimal. In this case it is better to double slow_clock, which should then still be less than fast_clock, and decimate at the output by rejecting every other sample

You can generate VHDL and synthesize the same way as any other DSP Builder design using the SignalCompiler block.

For more information on DSP Builder, refer to the DSP Builder User Guide. To generate VHDL and synthesize, follow these steps: 1 You must simulate the design before you can synthesize the design. Double click on the Signal Compiler icon in the schematic. Click Convert MDL to VHDL (see Figure 4).

1. 2.

Altera Corporation

7 Preliminary

3. 4.

Performance

4 DSP block 9-bit elements 2 M512 RAM block 1 M4K RAM block 1,867 LEs 1 PLL

Copyright 2004 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. Altera products are protected under numerous U.S. and foreign patents and pending applications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera Corporation. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services. Printed on recycled paper

8 Preliminary

- PISOUploaded byAmit
- AI 04 s5 s8 Syllabus-CALICUT UNIVERSITY 2004 ADMISSIONUploaded byJoy George
- University of Californi Irvine DSP EngineeringUploaded byShoaib Hussain
- 5989-7309ENUploaded byTung A Nguyen
- 1 Brochure (Technova-2016)Uploaded bySunil Sharma
- Multimedia Technology Ch 5Uploaded bySyed Fateh Ali Shah
- Me_electronics Digital SystemUploaded byabhijit_jamdade
- DSP ProjectUploaded byFatima Adly
- lu2005Uploaded byfranchisca9999
- Abstract about the personUploaded bydestro29
- S2 Bidang Keahlian Elektronika.pdfUploaded byRegi Satria
- M.TechUploaded bySathis Kumar
- DSPUploaded byShashi Kant Sharma
- Power-System-ProteUploaded byswapnabetech
- PACS Portal NewsUploaded byOnkar Shinde
- Designing a Modular DSP Core for Real-Time Audio PerformanceUploaded byahmed
- (Applied and Numerical Harmonic Analysis) Roberto a. Macías, José L. Torrea (Auth.), Carlos Cabrelli, Jose Luis Torrea (Eds.)-Recent Developments in Real and Harmonic Analysis_ in Honor of Carlos Sego (2)Uploaded byJuan Diego Cutipa Loayza
- Chapter 16 -DSPUploaded byMaira Haider
- SYL DSPUploaded bydhanishj
- Digital Signal Processing LaboratoryUploaded bynagaraj
- DSP LAB Handout 5Uploaded byManuGear
- 332 LabUploaded bySaurabhSingh
- b.tech.Sem 7 Ee Nov-Dec-2017 DspUploaded byHiren Parmar
- A Recursive Park Transformation to Improve the Performance of Synchronous Reference Frame Controllers in Shunt Active Power FiltersUploaded byphoenix226
- lec23Uploaded byKhajavali Shaik
- SY Lecture019.Signal Processing CircuitsUploaded bygtgreat
- UNIT4Uploaded bySelva Kumar
- 16670.pdfUploaded byCrystal King
- Syll_SIT_15-17Uploaded byAkshayRMishra
- CHE576NOTE1Uploaded bysudharini

- Introduction to TRIZUploaded bysjpritchard
- PLL DesignUploaded bysjpritchard
- Speedy PCIe FPL FinalUploaded bysjpritchard
- Open Source FPGA_GPU DMAUploaded bysjpritchard
- WP EthernetRedncyUploaded bysjpritchard
- Ethernet TeoriaUploaded byCarlos Pereira
- tms320dm6467Uploaded bysjpritchard
- Elixir 5 Service Manual Rev bUploaded byЛиснисе Моягоро
- AVID_BrakeSetUp1Uploaded bySaverio Trotta
- ANALYSIS OF CASCADED FILTERS WITH DECIMATIONUploaded bysjpritchard
- Design and Implementation of Sampling Rate Converters for Conversions between Arbitrary Sampling RatesUploaded bysjpritchard
- FPGA Implementation of a Multimode TransmultiplexerUploaded bysjpritchard
- FPGA Implementation of Flexible Interpolators and DecimatorsUploaded bysjpritchard
- 03.Dmst12 TimUploaded bysjpritchard
- Getting StartedUploaded byXenogenic Medusa
- creativeukaudiov2011Uploaded bysjpritchard

- Commander SK DriveUploaded bymanmathancellam
- Plain Truth 1964 (Vol XXIX No 04) Apr_wUploaded byTheTruthRestored
- English for Workplce 1 (LST)Uploaded byMarcia Patterson
- dli_v18Uploaded byGavril Mikhailovich Pryedveshtin
- Rubric PresentationUploaded byEDSEL ALAPAG
- AXON(A1R) English User ManualUploaded bykyawzinmon
- Functional CalculusUploaded byDharmendra Kumar
- ANSYS Advantage Vol3 Iss1Uploaded byfaycalby1
- ProjectMekonnenUploaded byAhmed Hassan
- winters2007 (1).pdfUploaded bySusi Rutmalem
- August-September 2009 Appalachian Voice NewsletterUploaded byAppalachian Voice
- horn antennaUploaded byprashant4455
- TPM SeminarUploaded byVishnu Nair
- Admission March 2017 is Open Now! 1Uploaded byCOME STUDY IN UKRAINE, STUDY ABROAD
- 75126579-Lecture-6-The-Engineer-s-Transit-and-Theodolite.pdfUploaded byBryle James Nanglegan
- 819-4208-10-v240 admin guideUploaded byAsoka Hapu
- a1Uploaded byEduardo Barbaresco Melo
- Focus on Vocabulary 1 AnswersUploaded byamirmaafi
- OrbUploaded byසුපුන් ජයවීර
- ARITMATIC_ALUUploaded byMaya Kinanty
- [IJIT-V3I3P13]:Saptarshi BhattacharyyaUploaded byIJITJournals
- Basic Nuclear Physics.pdfUploaded bygabe1989
- WS Security Implementation Using Apache CXF and WSS4JUploaded byYogeshwar Vajravelu
- manney leann assignment7 ppe310Uploaded byapi-377080545
- States of Concern: An Analysis of U.S. States with High Rates of School-Based Violent ThreatsUploaded by13News Now
- Digitizing the Video SignalUploaded byHarini Rao
- HSSE PlanUploaded byLegend Anbu
- 1-s2.0-S0378720614000020-mainUploaded byAnonymous BdH65yhF
- Ucat 2015 DraftUploaded byAnonymous yUzNDxVJd
- Basic Simulation Lab ManualUploaded byshiva4105