TigerSHARC processor and evaluation board

Slides:



Advertisements
Similar presentations
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.
Advertisements

Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
TigerSHARC processor and evaluation board Different capabilities Different functionality.
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
6/2/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
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.
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.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
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.
VisualDSP++ and Test Driven Development Prelaboratory assignment information.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
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.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
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.
TigerSHARC processor and evaluation board Different capabilities Different functionality.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
TigerSHARC processor and evaluation board Different capabilities Different functionality.
TigerSHARC Laboratory Setting up the HPP-ICE environment ICT 318 / 320 Running versions of the Audio-talk-through program.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Lab. 4 Demonstrating and understanding multi-processor boot TigerSHARC multi-processor system.
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.
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
Over-view of Lab. 1 See the Lab. 1 web-site and latter lecture notes for more details.
Microprocessor or Microcontroller
See the Lab. 1 web-site and later lecture notes for more details
ENCM415 Textbook information
Lab. 2 Overview – Earlier Tasks Prelaboratory T1, T3, T4 and T5
TigerSHARC processor General Overview.
Lab. 2 Overview.
A Play Core Timer Interrupts
Post-Lab 1 Quiz Digital Thermometer Digital Storage Oscilloscope
Introduction to Test Driven Development
Automated Testing Environment
Thermal arm-wrestling
Overview of SHARC processor ADSP Program Flow and other stuff
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
Chapter 21b Reference Frameworks
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
A Play Lab. 2 Task 8 Core Timer Interrupts
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.
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
Getting serious about “going fast” on the TigerSHARC
Thermal arm-wrestling
Concept of TDD Test Driven Development
Explaining issues with DCremoval( )
Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
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.
Overview of SHARC processor ADSP-2106X Memory Operations
Setting up VisualDSP environment Lab. 0
A first attempt at learning about optimizing the TigerSHARC code
Working with the Compute Block
Presentation transcript:

TigerSHARC processor and evaluation board Different capabilities Different functionality

Concepts tackled Differences between “processor” and “evaluation board” Functionality present of TigerSHARC evaluation board Accessing the A2D and D2A in an easy way – needed for all Labs. 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Evaluation board – P0 and P1 TWO TS201S processors Error messages about P0 and P1 mean code on specific processor 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Evaluation board – Link Ports Designed for “star” Configuration – Up to 8 processors working together P0 to P7 (selectable by switches on back of evaluation board (Never tried – Don’t destroy link ports) 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Audio connectors. Max input voltage around 1 V p-p with 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) ICT320 TigerSHARC ICT318 Blackfin (some stations). 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Buttons and LEDs split between processors Much “stuff” on the board shared between processors (but NOT all) 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Evaluation Board Architecture P0 P1 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Processors can share memory allocation depends on ID # 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Note – labelled processor A and B rather than processor 0 and 1 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Note – labelled processor A and B rather than processor 0 and 1 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

How to use the evaluation board capability Read a lot in the hardware manual Modify some of the example programs provided in C:\Program Files\Analog Devices\VisualDSP 3.5 32-Bit\TS\EZ-KITs and then Read a lot in the hardware manual 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Laboratory 1 Part 2 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 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 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

ECE-ADI-Project 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 Lec. 01) Audio project utilities, Video Project utilities TigerSHARC – ADSP-TS201 (Current ENCM515) 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 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Using the code Files need – See Lab. 1 Part 2 You will need to build a project file Audio.dpj Also link in you code from assignment 1 -- myAssignment1.cpp 05Labs/05FilesNeeded/05Lab1AudioProject/KnownLocation1Nov04.cpp 05Labs/05FilesNeeded/05Lab1AudioProject/main_Sound1Jan05.cpp 05Labs/05FilesNeeded/05Lab1AudioProject/processsound1Jan05.cpp 05Labs/05FilesNeeded/05Lab1AudioProject/examinesignal.cpp 05Labs/05FilesNeeded/05Lab1AudioProject/processorspecific1Nov04.h 05Labs/05FilesNeeded/05Lab1AudioProject/soundsourceClass1Nov04.h 05Labs/05FilesNeeded/05Lab1AudioProject/student_adiprocessor1Jan05.h 05Labs/05FilesNeeded/05Lab1AudioProject/TS201OnlineLib1Jan05_CHAR8.dlb 05Labs/05FilesNeeded/05Lab1AudioProject/TSXXXprocessorspecific1Nov04.h 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

ADISoundSource sounddemo(processor, which_soundsource, processing_options); Does all the hard stuff Sets up interrupts Sets up interrupt service routine Sets up variety of options Useful things to know which__soundsource = LOCAL_AUDIOSOURCE | MONO"; Generate a local sound source – output D2A which__soundsource = CODEC_AUDIOSOURCE | MONO"; Uses the CODEC as sound source – input A2D and output A2D processing_options allow you to switch quickly between a variety of versions of functions (Probably not used this year as the E-TDD environment does a better job 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

sounddemo.ReadSource(&channel1_in, &channel2_in) Provides the input sound signal from the two channels of the A/D This function will “wait” for an audio interrupt to place the A2D values into a known location, and then returns those values to you In LOCAL_AUDIOSOURCE mode, This function will “wait” for an audio interrupt then return audio samples from an internal generated tune. Note – if your code to process the audio signal is too slowly, then an interrupt (or many interrupts) will have already occurred, and ReadSource( ) will return immediately. There is NO WAY to recover missed samples. You will hear sound distortion if many samples are missed 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

sounddemo.WriteSource(leftchannel_out, rightchannel_out); WriteSource( ) simply places your values into a known location. When an interrupt occurs, these values will be sent to the D2A automatically. NOTE there is no check to see whether the previous values have been sent to the D2A. Therefore we need to write code of the form while (ReadSource (&left, &Right)) { ProcessSound(&left, &right); WriteSource(left, right); } WriteSource( ) will be used during Lab. 1 Part 1 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

VolumeControl(&channel1_in, &channel2_in, &sounddemo); You will need earphones for the labs. WARNING: - Depending on the quality of your ear-phones, and the quality of your coding, it is very simply to have a sound that is too loud and potentially damaging to your ears. DON’T start running the code with the ear-phones on your ears. Run the code, adjust the volume, and then place the earphones on your ears VolumeControl( ) is a simply way of adjusting the output sound volume 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Interrupt Handling sounddemo.Stop_AudioInterrupts( ); Your code here sounddemo.Start_AudioInterrupts( ); You can’t single step (debug) your code when the interrupts are running. Note – these functions are not working at the moment on the TigerSHARC. However this is not a real issue as the Test Driven Development environment provides an easier way to test your code without the necessity of having interrupts Once your functions have been proven to work (e.g. Lab. 1, Part 1), then you can add them to the audio program (e.g. Lab. 1, Part 2). If your code is so bad that you have to single step through it – then consider using the equivalent of rm *.* and start again 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Is anything actually happening? if (!sounddemo.DoNotProcess()) ProcessSound(channel1_in, channel2_in, &leftchannel_out, &rightchannel_out, &sounddemo); else { leftchannel_out = channel1_in; rightchannel_out = channel2_in; } By pressing button FLAG1 you can cause the sound to be passed directly to the audio output without processing (e.g. Lab. 1 Tutorial 1) Since the evaluation board has two processors then you will need to use FLAG1-A or FLAG1-B depending on which processor your code is running Note – loading the code, holding FLAG1 down while the code starts up automatically switches between LOCAL and CODEC input modes, so you can switch without having to recompile each time 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software radio part of Lab 1 Modified main( ) int main () { // int source_selection = AUDIO_SOURCE_DEMO; int source_selection INTERNAL_SOFTWARE_RADIO_SOURCE_DEMO; if (source_selection == AUDIO_SOURCE_DEMO) AudioSourceDemo( ); else if (source_selection == INTERNAL_SOFTWARE_RADIO_SOURCE_DEMO) InternalSoftwareRadioSourceDemo( ); else { puts ("Unknown source selection"); } return 0; 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software Radio Demo while (WaitAMSignal(&AMsignal, &sounddemo)) { if (!sounddemo.DoNotProcess()) { ExamineSignal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear // MultiplyByReference(&AMsignal, carrier_frequency[0]); // ExamineSignal(AMsignal, 0, 4000); // IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); // RectifySignal(&channel1_in, &channel2_in, AMsignal); // ExamineSignal(channel1_in, 0, 4000); // Audio_low_pass_filter(channel1_in, channel2_in, &leftchannel_out, // &rightchannel_out, filter_coefficients, filter_coefficients, FILTER_LENGTH); // ExamineSignal(leftchannel_out, 0, 4000); // DCremoval(&leftchannel_out, &rightchannel_out); } 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software Radio Demo while (WaitAMSignal(&AMsignal, &sounddemo)) { if (!sounddemo.DoNotProcess()) { // ExamineSignal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear MultiplyByReference(&AMsignal, carrier_frequency[0]); ExamineSignal(AMsignal, 0, 4000); // IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); // ExamineSignal(AMsignal, 0, 4000); // RectifySignal(&channel1_in, &channel2_in, AMsignal); // ExamineSignal(channel1_in, 0, 4000); // Audio_low_pass_filter(channel1_in, channel2_in, &leftchannel_out, // &rightchannel_out, filter_coefficients, filter_coefficients, FILTER_LENGTH); // ExamineSignal(leftchannel_out, 0, 4000); // DCremoval(&leftchannel_out, &rightchannel_out); } 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software Radio Demo while (WaitAMSignal(&AMsignal, &sounddemo)) { if (!sounddemo.DoNotProcess()) { // ExamineSignal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear MultiplyByReference(&AMsignal, carrier_frequency[0]); // ExamineSignal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); ExamineSignal(AMsignal, 0, 4000); // RectifySignal(&channel1_in, &channel2_in, AMsignal); // ExamineSignal(channel1_in, 0, 4000); // Audio_low_pass_filter(channel1_in, channel2_in, &leftchannel_out, // &rightchannel_out, filter_coefficients, filter_coefficients, FILTER_LENGTH); // ExamineSignal(leftchannel_out, 0, 4000); // DCremoval(&leftchannel_out, &rightchannel_out); } 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software Radio Demo while (WaitAMSignal(&AMsignal, &sounddemo)) { if (!sounddemo.DoNotProcess()) { // ExamineSignal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear MultiplyByReference(&AMsignal, carrier_frequency[0]); // ExamineSignal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); RectifySignal(&channel1_in, &channel2_in, AMsignal); // ExamineSignal(channel1_in, 0, 4000); Audio_low_pass_filter(channel1_in, channel2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, filter_coefficients, FILTER_LENGTH); ExamineSignal(leftchannel_out, 0, 4000); // DCremoval(&leftchannel_out, &rightchannel_out); // ExamineSignal(leftchannel_out, 0, 4000); } 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Software Radio Demo while (WaitAMSignal(&AMsignal, &sounddemo)) { if (!sounddemo.DoNotProcess()) { // ExamineSignal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear MultiplyByReference(&AMsignal, carrier_frequency[0]); // ExamineSignal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); RectifySignal(&channel1_in, &channel2_in, AMsignal); // ExamineSignal(channel1_in, 0, 4000); Audio_low_pass_filter(channel1_in, channel2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, filter_coefficients, FILTER_LENGTH); // ExamineSignal(leftchannel_out, 0, 4000); DCremoval(&leftchannel_out, &rightchannel_out); ExamineSignal(leftchannel_out, 0, 4000); } 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada

Concepts tackled Differences between “processor” and “evaluation board” Functionality present of TigerSHARC evaluation board Accessing the A2D and D2A in an easy way – needed for all Labs. 12/8/2018 TigerSHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada