Tigersharc processor and evaluation board
Download
1 / 26

TigerSHARC processor and evaluation board - PowerPoint PPT Presentation


  • 107 Views
  • Uploaded on

TigerSHARC processor and evaluation board. Different capabilities Different functionality. Concepts tackled. Differences between “processor” and “evaluation board” Functionality present on TigerSHARC evaluation board Using the A/D and D/A during Lab. 1

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' TigerSHARC processor and evaluation board' - anne-sharpe


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Tigersharc processor and evaluation board

TigerSHARCprocessor and evaluation board

Different capabilitiesDifferent functionality


Concepts tackled
Concepts tackled

  • Differences between “processor” and “evaluation board”

  • Functionality present on TigerSHARC evaluation board

  • Using the A/D and D/A during Lab. 1

  • Developing the code for a C++ “Moving sound source” and a C++ FIR filter using a test driven development approach (TDD)

    • Assembly code and optimized assembly code versions of this code will be developed during Lab. 2 and Lab. 3 and validated using the tests developed during Lab. 1.

    • A dual core version of the FIR filter will be attempted during Lab. 4. This is a “very” new laboratory to me – we will see.

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Ts201s evaluation board contains 2 processors p0 dspa and p1 dspb
TS201S Evaluation board contains 2 processors P0 (DSPA) and P1 (DSPB)

TWO TS201S processors

Error messageswhen linking about P0 and P1 mean problems with

code on specific

processor

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Evaluation board link ports
Evaluation board – Link Ports P1 (DSPB)

Designed for “star”

Configuration –

Up to 8 processorsworking together

P0 to P7 (selectableby switches on backof evaluation board(Never tried – Don’tdestroy link ports)

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Audio connectors. P1 (DSPB)Max input voltage around 1 V p-pwith no DC.

Too great a voltage destroys the board

Use MPEG or other players and keep

Volume down

Damage and distortion issues

  • JTAG ONLY AVALIABLE IN 3rd floor labs

  • Higher speed communication rates than USB (factor of 20 - 100)

  • ICT318 TigerSHARC (some stations).

  • ICT320 Blackfin (some stations).

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Buttons and LEDs split P1 (DSPB)between processors

Much “stuff” on the boardshared between processors(but NOT all)

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Evaluation board architecture
Evaluation Board P1 (DSPB)Architecture

P0

P1

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Two processor operations in encm515
Two processor operations in ENCM515 P1 (DSPB)

  • Lab. 1, 2 and 3

    • During TESTS only 1 processor being used as we check the functionality of various functions written in C++ (lab1), partially optimized assembly (Lab. 2), highly optimized but not ultimate (Lab. 3). Other processor is halted

    • WARNING: Make sure that you “run” the processor that you loaded the code into

    • When running the code, one processor is “idle”

  • Lab. 4

    • Plans to have the work load split between two processors.

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Processors P1 (DSPB)can access each other’sINTERNALmemory

and registers

Processorscan shareEXTERNALmemory

Memory

allocationdepends on ID #

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Note – labeled processor A and B P1 (DSPB)rather than processor 0 and 1

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Note – labeled processor A and B P1 (DSPB)rather than processor 0 and 1

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


How to use the evaluation board capability
How to use the evaluation board capability P1 (DSPB)

  • Read a lot in the hardware manual

  • Modify some of the example programs provided in

    C:\Program Files\Analog Devices\VisualDSP 4.5\TS\Examples\ADSP-TS201 EZ-Kit Lite

    and then Read a lot in the hardware manual

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Laboratory 1
Laboratory 1 P1 (DSPB)

  • This makes use of the analog to digital converter and the digital to analogue converter to provide audio sound signals that we can process with the high speed algorithms we develop during the course

  • By the end of the course we will need to learn about

    • Interrupts – which, how many, why, how?

    • A2D, D2A – which, how many, why, how?

  • We need to learn about all this stuff before the end of the course – but not now – Now we just want to use it

    • The C++ programming environment provides functions (interrupt( ), interruptf( ), interrupts( ) that handle all the interrupt overhead, and then call our functions as a subroutine.

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Ece adi project
ECE-ADI-Project P1 (DSPB)

  • Was asked to develop (as part of Analog Devices University Ambassadorship) to develop demonstration programs and place on the web

  • Have now developed

    • SHARC – ADSP-21061 (Previous 515)

      • Audio project utilities

    • Blackfin – ADSP-BF533 (Current ENCM415 , ENCM417 in 2007)

      • Audio project utilities, Video Project utilities

    • Blackfin – ADSP-BF533 (Current ENCM491 – Nygren)

      • Real time operating systems

    • TigerSHARC – ADSP-TS201 (Current ENCM515, ENCM619.23)

    • Embedded Test Driven Development Environment (E-TDD)

      • Blackfin, TigerSHARC, SHARC, Microsoft studio

  • Find at http://www.enel.ucalgary.ca/People/Smith/ECE-ADI-Project/Index/index.htm

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Using the lab 1 code
Using the Lab. 1 code P1 (DSPB)

  • You should have already done the Familiarization exercise

  • Part of the Familiarization exercise involved loading the ENCM515Lab directory onto your U:Drive

  • An audio talk-through program is provided at Lab. 1

    • Audio-In signal is sampled (A/D) automatically and placed in known “input” location in memory

    • An interrupt is made to happen each time a sample occurs (44kHz)

    • During the interrupt, the input value is “processed” and the processed value is placed in a known “output” location in memory.

    • The “output” value is then automatically moved to the D/A for reconstruction.

  • WARNING: NEVER START THE PROCESSOR WITH YOUR EAR-PHONES ON YOUR EARS. IF YOU HAVE THE PROCESSING INCORRECT, YOU CAN GET AN INFINITELY LARGE SIGNAL COME OUT WHICH HURTS YOUR EARS

    • Start the processor with the earphones on the desk, then bring the earphones near your ears ONLY when it is safe to do so.

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 1 concept concept idea exact details inexact
Lab. 1 Task 1 – concept P1 (DSPB)Concept  idea exact, details inexact

  • Run the (modified) audio-talk-through program

  • Each time an interrupt occurs

    • ProcessData(INCBuffer  OUTCBuffer); // Four circular buffers.// Lab. 1 Task 1 – ProcessData( ) is “just a copy”

    • The “oldest” processed sound sample is send to the “D/A”. There is a sound sample from both left and right channels (circular buffers) leftOUT = leftOUTCBuffer[ leftOUTIndex - 128]; rightOUT = rightOUTCBuffer[ rightOUTIndex - 128 ];

    • The “newest” input sound sample (from A/D) overwrites the oldest sound sample.leftINCBuffer[ leftINputIndex++ ] = sample = (leftIN + rightIN) / 2; rightINCBuffer[ rightINputIndex++ ] = sample = (leftIN + rightIN) / 2;

  • RESULT – You hear a slightly delayed version of the sound in each ear (delay = 128 / 44000 seconds). It will sound “normal”

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 1 concept
Lab. 1 Task 1 -- concept P1 (DSPB)

  • Why “average the left and the right signals” rather than putting each signal into each own array.

  • The reason will be come obvious as we proceed through Labs. 1, 2 and 3

    • Basically the ProcessData( ) function gets too complicated to handle.

  • Current plan is, in Lab. 4, to finish with one TigerSHARC core doing ProcessData( ) for the left channel and the other TigerSHARC core doing all the processing on the right channel

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 2a in c left no delay right with delay
Lab. 1 Task 2A – In C++ P1 (DSPB)Left – no delay, right with delay

  • Run the (modified) audio-talk-through program

  • Each time an interrupt occurs

    • ProcessData(INCBuffer  OUTCBuffer); // Four circular buffers.// Lab. 1 Task 1 – ProcessData( ) is “just a copy”

    • The “oldest” processed sound sample is send to the “D/A”. There is a sound sample from both left and right channels (circular buffers)leftOUT = leftOUTCBuffer[ leftOUTIndex - 0] rightOUT = rightOUTCBuffer[ rightOUTIndex -256 ];

    • The “newest” input sound sample (from A/D) overwrites the oldest sound sample.leftINCBuffer[ leftINputIndex++ ] = sample = (leftIN + rightIN) / 2; rightINCBuffer[ rightINputIndex++ ] = sample = (leftIN + rightIN) / 2;

  • RESULT – With no delay on the sound going to the left ear , and delay on the sound going to the right ear, the brain “THINKS” the sound comes from close to the left ear

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 2b in c left delay right with no delay
Lab. 1 Task 2B – In C++ P1 (DSPB)Left –delay, right with no delay

  • Run the (modified) audio-talk-through program

  • Each time an interrupt occurs

    • ProcessData(INCBuffer  OUTCBuffer); // Four circular buffers.// Lab. 1 Task 1 – ProcessData( ) is “just a copy”

    • The “oldest” processed sound sample is send to the “D/A”. There is a sound sample from both left and right channels (circular buffers)leftOUT = leftOUTCBuffer[ leftOUTIndex - 256] rightOUT = rightOUTCBuffer[ rightOUTIndex - 0 ];

    • The “newest” input sound sample (from A/D) overwrites the oldest sound sample.leftINCBuffer[ leftINputIndex++ ] = sample = (leftIN + rightIN) / 2; rightINCBuffer[ rightINputIndex++ ] = sample = (leftIN + rightIN) / 2;

  • RESULT – With delay on the sound going to the leftear , and no delay on the sound going to the right ear, the brain “THINKS” the sound comes from close to the right ear

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 3 concept left right changing delays
Lab. 1 Task 3 – Concept P1 (DSPB)Left / right changing delays

  • The “oldest” processed sound sample is send to the “D/A”. There is a sound sample from both left and right channels (circular buffers)leftOUT = leftOUTCBuffer[ leftOUTIndex - 128 + LEFTIndex]rightOUT = leftOUTCBuffer[ rightOUTIndex – 128 + RIGHTIndex ];

    LEFTIndex = LEFTIndex – 1;

    RIGHTIndex = RIGHTIndex + 1;

  • RESULT

    • Sound seems to come from in front of you to start with

    • With changing delays, the left sound will get more delayed, and the right sound will get less delayed

    • The sound will move from in front of you, over to your right ear.

    • When the sound is at your right ear, the indexes “change direction” (right increases, left decreases) till the sound “comes” from left side, and so on

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 3 use tdd approach to develop c code
Lab. 1 Task 3. Use TDD approach to develop C++ code P1 (DSPB)

Work with customer to check that the tests properly express what the customer wants done. Iterative process with customer “heavily involved” – “Agile” methodology.

CUSTOMER

DEVELOPER

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 3 use tdd approach to develop c code1
Lab. 1 Task 3. Use TDD approach to develop C++ code P1 (DSPB)

void AdjustDelayOffsetCPP (long *IndexOffset, long *IndexOffsetDirection, long DelayLength);

You work in the “Lab1Tests DEVELOPERS” directory, with the code for AdjustDelayOffsetCPP( ) placed in the “LAB1 CUSTOMERS” directory.

  • The “customer” provides you information about how this function works to adjust the index so that the sound will move correctly

  • The information is in the form of a “case study” based on customer – developer consultation for a simple example.

  • The information is expressed as an “executable specification document”

  • You get the code to work for the simple example, and add additional tests (part of your report) as needed to confirm that the code will work

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 task 4 2 minutes maximum use adjustdelayoffsetcpp for real
Lab. 1 Task 4. P1 (DSPB)-- 2 minutes maximumUse AdjustDelayOffsetCPP( ) “for real”

void AdjustDelayOffsetCPP (long *IndexOffset, long *IndexOffsetDirection, long DelayLength);

If you did the testing correctly, then this task simple means

  • Recompiling the code in the “LAB1 CUSTOMERS” directory – 2 minutes

  • Demonstrate to T. A. and ask (politely) please give me full marks.

  • Note that the same tests will be used Lab. 2 for AdjustDelayOffsetASM andLab. 3 for AdjustDelayOffsetOPtimizedASM

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Lab 1 tasks 5 6 and 7 float firdebugmodecpp float coeffs float inputdata int index int coeff length
Lab. 1 Tasks 5, 6 and 7 P1 (DSPB)float FIRDebugModeCPP(float *coeffs, float *inputData, int index, int coeff_length);

  • Task 5: Work with the customer to set up some tests for the FIR operation with is essentially SUM (*coeffs++) * (*inputData++)

  • Task 6: Another “2 minute job” – recompile the code in the “Lab 1 CUSTOMER DIRECTORY” and demonstrate.

  • Task 7: Another “2 minute job”

    • The code will work with the arrays small (N <= 128) but not for larger arrays – chronic sound distortion

    • Recompile the code using the C++ optimizer and show your FIR filter works – no sound distortion

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Speed improvements when we use the c optimizer
Speed improvements when we use the “C++” optimizer P1 (DSPB)

  • Later we will need to modify the timing tests from the Familiarization Laboratory so we can check the speed of the filters, and delay adjustment algorithms

  • We may not “HEAR” a lot of distortion, but all the processing must be completed in 1 / 44000 s

  • We must have efficient code as we increase the length of the data being processed

  • As one exercise we will examine the code for the Analog Devices Reverb program which simulates the sound of an opera filter using discrete Fourier transforms on 64000 points at a time!

    • We will “look” at that code and say “oh my!” rather than writing it

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


Concepts tackled1
Concepts tackled P1 (DSPB)

  • Differences between “processor” and “evaluation board”

  • Functionality present on TigerSHARC evaluation board

  • Using the A/D and D/A during Lab. 1

  • Developing the code for a C++ “Moving sound source” and a C++ FIR filter using a test driven development approach (TDD)

    • Assembly code and optimized assembly code versions of this code will be developed during Lab. 2 and Lab. 3 and validated using the tests developed during Lab. 1.

    • A dual core version of the FIR filter will be attempted during Lab. 4. This is a “very” new laboratory to me – we will see.

TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada


ad