Lab. 4 Demonstrating and understanding multi-processor boot TigerSHARC multi-processor system.

Slides:



Advertisements
Similar presentations
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Advertisements

Lab 2 – DSP software architecture and the real life DSP characteristics of signals that make it necessary.
Over-view of Lab. 1 For more details – see the Lab. 1 web-site There will be a 20 min prelab quiz (based on Assignment 1 and 2) at the start of the lab.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
My attempt to multi-thread an audio talk-though program using batches of data M. Smith Electrical and Computer Engineering University of Calgary, Smithmr.
TigerSHARC processor and evaluation board Different capabilities Different functionality.
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
Over-view of Lab. 1 For more details – see the Lab. 1 web-site There will be a 20 min prelab quiz (based on Assignment 1 and 2) at the start of the lab.
Review of Blackfin Syntax Moves and Adds 1) What we already know and have to remember to apply 2) What we need to learn.
Lab. 2 – More details – Tasks 4 to 6 1. What concepts are you expected to understand after the Lab. 2 is finished? 2. How do you demonstrate that you have.
A Play Core Timer Interrupts Acted by the Human Microcontroller Ensemble from ENCM415.
TigerSHARC Laboratory Setting up the HPP-ICE environment ICT 318 / 320 Running versions of the Audio-talk-through program.
Over-view of Lab. 1 For more details – see the Lab. 1 web-site There will be a 20 min prelab quiz (based on Assignment 1 and 2) at the start of the lab.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter.
VisualDSP++ and Test Driven Development Prelaboratory assignment information.
TigerSHARC CLU Closer look at the XCORRS M. Smith, University of Calgary, Canada
TigerSHARC processor General Overview. 6/28/2015 TigerSHARC processor, M. Smith, ECE, University of Calgary, Canada 2 Concepts tackled Introduction to.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Laboratory 1 – ENCM415 Familiarization with the Analog Devices’ VisualDSP++ Integrated Development Environment.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Just enough information to program a Blackfin Familiarization assignment for the Analog Devices’ VisualDSP++ Integrated Development Environment.
7/14/20151 Introduction toVisual DSP Kernel VDK for Multi-threaded environment ENCM491 – Real Time (in 1 hour) M. Smith, Electrical and Computer Engineering,
Later tasks of Lab. 1 For more details – see the Lab. 1 web-site There will be a 20 min prelab quiz (based on Assignment 1 and 2) at the start of the lab.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
Over-view of Lab. 1 See the Lab. 1 web-site and later lecture notes for more details.
Understanding the TigerSHARC ALU pipeline Determining the speed of one stage of IIR filter – Part 3 Understanding the memory pipeline issues.
Averaging Filter Comparing performance of C++ and ‘our’ ASM Example of program development on SHARC using C++ and assembly Planned for Tuesday 7 rd October.
TigerSHARC Laboratory Setting up the HPP-ICE environment ICT 318 / 320 Running versions of the Audio-talk-through program.
A Play Core Timer Interrupts Acted by the Human Microcontroller Ensemble from ENCM511.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Lab. 2 Overview. Echo Switches to LED Lab1 Task 7 12/4/2015 TDD-Core Timer Library, Copyright M. Smith, ECE, University of Calgary, Canada 2 / 28.
Over-view of Lab. 1 See the Lab. 1 web-site and the lecture notes for more details.
Multi-threaded projects Services and Drivers Alternate ways of doing Labs 1, 2, 3 and 4.
12/14/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
A first attempt at learning about optimizing the TigerSHARC code TigerSHARC assembly syntax.
A Play Core Timer Interrupts Acted by the Human Microcontroller Ensemble from ENCM415.
“Lab. 5” – Updating Lab. 3 to use DMA Test we understand DMA by using some simple memory to memory DMA Make life more interesting, since hardware is involved,
Over-view of Lab. 1 See the Lab. 1 web-site and latter lecture notes for more details.
See the Lab. 1 web-site and later lecture notes for more details
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Lab. 2 Overview – Earlier Tasks Prelaboratory T1, T3, T4 and T5
Lab. 2 Overview.
Post-Lab 1 Quiz Digital Thermometer Digital Storage Oscilloscope
Introduction to Test Driven Development
Automated Testing Environment
Developing a multi-thread product -- Introduction
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
ENCM515 Standard and Custom FIR filters for Lab. 4
Developing a multi-thread product -- Introduction
TigerSHARC processor and evaluation board
Setting up VisualDSP environment Lab. 1
VisualDSP++ and Test Driven Development What happened last lecture?
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Lab. 4 – Part 1 Demonstrating and understanding multi-processor boot
See the Lab. 1 web-site and later lecture notes for more details
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
* M. R. Smith 07/16/96 This presentation will probably involve audience discussion, which will create action items. Use PowerPoint.
Getting serious about “going fast” on the TigerSHARC
Explaining issues with DCremoval( )
Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system.
Setting up VisualDSP environment Lab. 0
M. Smith Electrical and Computer Engineering University of Calgary,
Working with the Compute Block
Building tests and code for a “software radio”
ENCM515 Standard and Custom FIR filters
Presentation transcript:

Lab. 4 Demonstrating and understanding multi-processor boot TigerSHARC multi-processor system

What we want to do  Design, develop, test and demonstrate a stand- alone real-time multi-processor system running on a TigerSHARC cluster  Audio processing with DSP A performing A/D and D/A control, passing information to DSP B which is performing FIR filter operations on left and right channel Passes L + R audio values Receives processed values Passes push-button information on what filter to use 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 2

What we have available  Lab. 1 – TigerSHARC libraries that will set up and use the push-buttons on TigerSHARC. Find notes on how to use  Lab. 3 – Optimized assembly code for FIR filter Write tests so can make sure that code can handle processing of two channels at once 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 3

What we have available  Analog Devices multiprocessor audio demo project with DSP-A performing audio processing under interrupt control and DSP-B idle How do we add new files and functions to this project – handling of LDF (loader descriptor file) is critical? How do we pass (any) information between DSP A and DSP B? How do we “properly” pass information between DSP A and DSP B? 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 4

Lab. 4  What is not demoed by the end of the laboratory is not going to be marked  Come in prepared to go 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 5

Step 1 – Get Audio Demo to run  Remember to bring “head-phones” and iPod equivalent to the lab.  Find audio demo project in TS examples and make copy in ENCM515 directory  Demonstrate operation 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 6

Step 2 – Demonstrate that can add functionality to DSP-A and DSP-B code  Build file Hello-DSPa.cpp with function Hell0-DSPA( ) and add to project  Build file Hello-DSPb.cpp and add to project  Modify mainA.cpp (ditto mainB.cpp) from Setup-Code; while (1); to Setup code; Hello-DSPA( ); // Hello-DSPB( ); while( 1) ; 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 7

Step 3 – Demonstrate stand-alone system  Burn Step 2 code into TigerSHARC flash memory  Power-down VDSP  Power-down TigerSHARC board  Power-up TigerSHARC board The system should boot and run Step 2 code – does it? 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 8

Step 4 – Demonstrate button reading and light flashing  Modify MainA.cpp from main( ) { … while (1) { }; } to int buttonA; main( ) { … while (1) { }; buttonA = ReadButton( ); WriteLED(buttonA) } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 9

Ditto for MainB  Modify MainB.cpp int buttonB; main( ) { … while (1) { }; buttonB = ReadButton( ); WriteLED(buttonB) } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 10

Step 6 – Try simple communication between DSP A and B  Can the linker handle this sort of code where buttons on A control lights on “B” via semaphore in processor ‘A’s memory extern int buttonA; int buttonB; main( ) { … while (1) { }; buttonB = ReadButton( ); WriteLED(buttonA) } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 11

Step 7 – Problems with Step 6  Processor B is directly accessing Processor A memory at the same time processor A is trying to read processor B memory  Sounds ripe for bus clashes, especially as later we want to pass lots of data  Would this be better? 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 12

Step 7 – Try simple communication between DSP A and B  Can the linker handle this sort of code where buttons on A control lights on “B” via semaphores in sdram extern int buttonA; section (“SDRAM”) int buttonB; main( ) { … while (1) { }; buttonB = ReadButton( ); WriteLED(buttonA) } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 13

Step  Can we get “DSPB” to do something with the DSP A audio stream  Example – press button on DSP B turns off sound on DSP-A – release button on DSP B turns on sound 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 14

Audio interrupt  From our understanding of TigerSHARC interrupts, we know that “C++ interrupt handler” will call a “call-back function”  Call back-function will probably look something like this extern left_in, left_out, right_in, right_out; void CallBack(int callbackValue) { if (callbackValue != audioInterrupt) HandleError( ); leftout = left_in; right_out = right_in; } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 15

Modified Audio interrupt  Call back-function needs to be modified to something like this extern left_in, left_out, right_in, right_out; extern B_button void CallBack(int callbackValue) { if (callbackValue != audioInterrupt) HandleError( ); if (!B_button) { leftout = left_in; right_out = right_in; } } 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 16

Lab 4 Marking  Demonstrate Step 8 code 30%  Burn step 8 code into Flash memory to create a stand-alone system 20%  Demonstrate FIR filter running on DSP B controlling audio signal on DSP A with buttons on DSP A controlling which FIR filter to run on DSP B 40%  Burn multi-processor code into FLASH 10%  Information on how to burn the code into flash memory is available on ENCM515 web  A cheat sheet is available to help you through the stages of Lab. 4, but using the cheat sheet costs your lab. Group 20% of the laboratory 4 marks. 11/9/2015TigerSHARC Lab. 4, Copyright M. Smith, ECE, University of Calgary, Canada 17