Tiger SHARC processor and evaluation board Different capabilities
Tiger. SHARC processor and evaluation board Different capabilities Different functionality Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Concepts tackled l l l 2 Differences between “processor” and “evaluation board” Functionality present of Tiger. SHARC evaluation board Accessing the A 2 D and D 2 A in an easy way – needed for all Labs. 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Evaluation board – P 0 and P 1 TWO TS 201 S processors Error messages about P 0 and P 1 mean code on specific processor 3 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Evaluation board – Link Ports Designed for “star” Configuration – Up to 8 processors working together P 0 to P 7 (selectable by switches on back of evaluation board (Never tried – Don’t destroy link ports) 4 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
JTAG ONLY AVALIABLE IN 3 rd floor labs Higher speed communication rates than USB (factor of 20 - 100) • ICT 320 Tiger. SHARC • ICT 318 Blackfin (some stations). 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 5 12/30/2021 Tiger. SHARC 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) 6 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Evaluation Board Architecture P 0 P 1 7 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Processors can share memory Memory allocation depends on ID # Tiger. SHARC Evaluation Board, 8 12/30/2021 M. Smith, ECE, University of Calgary, Canada
Note – labelled processor A and B rather than processor 0 and 1 9 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Note – labelled processor A and B rather than processor 0 and 1 10 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
How to use the evaluation board capability l Read a lot in the hardware manual Modify some of the example programs provided in C: Program FilesAnalog DevicesVisual. DSP 3. 5 32 -BitTSEZ-KITs and then Read a lot in the hardware manual l 11 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Laboratory 1 Part 2 l l 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 – – l 12 Interrupts – which, how many, why, how? A 2 D, D 2 A – which, how many, why, how? We need to learn about all this stuff before the end of the course – but now – Now we just want to use it 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
ECE-ADI-Project l l 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) l – Blackfin – ADSP-BF 533 (Current ENCM 415 Lec. 01) l – – 13 Audio project utilities, Video Project utilities Tiger. SHARC – ADSP-TS 201 (Current ENCM 515) Embedded Test Driven Development Environment (E-TDD) l l Audio project utilities Blackfin, Tiger. SHARC, Microsoft studio Find at http: //www. enel. ucalgary. ca/People/Smith/ ECE-ADI-Project/Index/index. htm 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Using the code Files need – See Lab. 1 Part 2 l You will need to build a project file Audio. dpj l Also link in you code from assignment 1 -- my. Assignment 1. cpp l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/Known. Location 1 Nov 04. cpp l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/main_Sound 1 Jan 05. cpp l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/processsound 1 Jan 05. cpp l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/examinesignal. cpp l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/processorspecific 1 Nov 04. h l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/soundsource. Class 1 Nov 04. h l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/student_adiprocessor 1 Jan 05. h l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/TS 201 Online. Lib 1 Jan 05_CHAR 8. dlb l 05 Labs/05 Files. Needed/05 Lab 1 Audio. Project/TSXXXprocessorspecific 1 Nov 04. h 14 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
ADISound. Source sounddemo(processor, which_soundsource, processing_options); l Does all the hard stuff – – – l 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 D 2 A which__soundsource = CODEC_AUDIOSOURCE | MONO"; Uses the CODEC as sound source – input A 2 D and output A 2 D 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 15 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
sounddemo. Read. Source(&channel 1_in, &channel 2_in) l Read. Source ( ) – – 16 Provides the input sound signal from the two channels of the A/D This function will “wait” for an audio interrupt to place the A 2 D 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 Read. Source( ) will return immediately. There is NO WAY to recover missed samples. You will hear sound distortion if many samples are missed 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
sounddemo. Write. Source(leftchannel_out, rightchannel_out); Write. Source( ) simply places your values into a known location. When an interrupt occurs, these values will be sent to the D 2 A automatically. l NOTE there is no check to see whether the previous values have been sent to the D 2 A. Therefore we need to write code of the form while (Read. Source (&left, &Right)) { Process. Sound(&left, &right); Write. Source(left, right); } l Write. Source( ) will be used during Lab. 1 Part 1 l 17 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Volume. Control(&channel 1_in, &channel 2_in, &sounddemo); l l l 18 You will need earphones for the labs. WARNING: - Depending on the quality of your earphones, 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 Volume. Control( ) is a simply way of adjusting the output sound volume 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
Interrupt Handling l sounddemo. Stop_Audio. Interrupts( ); – l sounddemo. Start_Audio. Interrupts( ); l You can’t single step (debug) your code when the interrupts are running. Note – these functions are not working at the moment on the Tiger. SHARC. 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 l l – – 19 Your code here 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 – Board, then Tiger. SHARC Evaluation consider using the equivalent of rm *. * and M. start again Smith, ECE, University of 12/30/2021 Calgary, Canada
Is anything actually happening? if (!sounddemo. Do. Not. Process()) Process. Sound(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, &sounddemo); else { leftchannel_out = channel 1_in; rightchannel_out = channel 2_in; } By pressing button FLAG 1 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 FLAG 1 -A or FLAG 1 -B depending on which processor your code is running Note – loading the code, holding FLAG 1 down while the code starts up automatically switches between LOCAL and CODEC input modes, so you can switch without having to recompile each time 20 12/30/2021 Tiger. SHARC 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) Audio. Source. Demo( ); else if (source_selection == INTERNAL_SOFTWARE_RADIO_SOURCE_DEMO) Internal. Software. Radio. Source. Demo( ); else { puts ("Unknown source selection"); } return 0; } Tiger. SHARC Evaluation Board, 21 12/30/2021 M. Smith, ECE, University of Calgary, Canada
Software Radio Demo while (Wait. AMSignal(&AMsignal, &sounddemo)) { (!sounddemo. Do. Not. Process()) { Examine. Signal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear Multiply. By. Reference(&AMsignal, carrier_frequency[0]); Examine. Signal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); Examine. Signal(AMsignal, 0, 4000); Rectify. Signal(&channel 1_in, &channel 2_in, AMsignal); Examine. Signal(channel 1_in, 0, 4000); if // // // Audio_low_pass_filter(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, FILTER_LENGTH); Examine. Signal(leftchannel_out, 0, 4000); // // DCremoval(&leftchannel_out, &rightchannel_out); Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Examine. Signal(leftchannel_out, 0, 4000); 22 } 12/30/2021 Calgary, Canada
Software Radio Demo if // while (Wait. AMSignal(&AMsignal, &sounddemo)) { (!sounddemo. Do. Not. Process()) { Examine. Signal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear Multiply. By. Reference(&AMsignal, carrier_frequency[0]); Examine. Signal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); Examine. Signal(AMsignal, 0, 4000); Rectify. Signal(&channel 1_in, &channel 2_in, AMsignal); Examine. Signal(channel 1_in, 0, 4000); // // Audio_low_pass_filter(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, FILTER_LENGTH); Examine. Signal(leftchannel_out, 0, 4000); // // DCremoval(&leftchannel_out, &rightchannel_out); Tiger. SHARC Evaluation Board, Examine. Signal(leftchannel_out, 0, 4000); M. Smith, ECE, University of 23 } 12/30/2021 Calgary, Canada
Software Radio Demo if // while (Wait. AMSignal(&AMsignal, &sounddemo)) { (!sounddemo. Do. Not. Process()) { Examine. Signal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear Multiply. By. Reference(&AMsignal, carrier_frequency[0]); Examine. Signal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); Examine. Signal(AMsignal, 0, 4000); Rectify. Signal(&channel 1_in, &channel 2_in, AMsignal); Examine. Signal(channel 1_in, 0, 4000); // // // Audio_low_pass_filter(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, FILTER_LENGTH); Examine. Signal(leftchannel_out, 0, 4000); // // DCremoval(&leftchannel_out, &rightchannel_out); Tiger. SHARC Evaluation Board, Examine. Signal(leftchannel_out, 0, 4000); M. Smith, ECE, University of 24 } 12/30/2021 Calgary, Canada
Software Radio Demo while (Wait. AMSignal(&AMsignal, &sounddemo)) { (!sounddemo. Do. Not. Process()) { Examine. Signal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear Multiply. By. Reference(&AMsignal, carrier_frequency[0]); Examine. Signal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); Examine. Signal(AMsignal, 0, 4000); Rectify. Signal(&channel 1_in, &channel 2_in, AMsignal); Examine. Signal(channel 1_in, 0, 4000); Audio_low_pass_filter(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, FILTER_LENGTH); Examine. Signal(leftchannel_out, 0, 4000); if // // // 25 } DCremoval(&leftchannel_out, &rightchannel_out); Examine. Signal(leftchannel_out, 0, 4000); Tiger. SHARC Evaluation Board, 12/30/2021 M. Smith, ECE, University of Calgary, Canada
Software Radio Demo while (Wait. AMSignal(&AMsignal, &sounddemo)) { (!sounddemo. Do. Not. Process()) { Examine. Signal(AMsignal, 0, 4000); // Incoming signal // Choose which "radio station" you want to hear Multiply. By. Reference(&AMsignal, carrier_frequency[0]); Examine. Signal(AMsignal, 0, 4000); IFstage_low_pass_filter(&AMsignal, filter_coefficients, FILTER_LENGTH); Examine. Signal(AMsignal, 0, 4000); Rectify. Signal(&channel 1_in, &channel 2_in, AMsignal); Examine. Signal(channel 1_in, 0, 4000); Audio_low_pass_filter(channel 1_in, channel 2_in, &leftchannel_out, &rightchannel_out, filter_coefficients, FILTER_LENGTH); Examine. Signal(leftchannel_out, 0, 4000); if // // // 26 } DCremoval(&leftchannel_out, &rightchannel_out); Examine. Signal(leftchannel_out, 0, 4000); Tiger. SHARC Evaluation Board, 12/30/2021 M. Smith, ECE, University of Calgary, Canada
Concepts tackled l l l 27 Differences between “processor” and “evaluation board” Functionality present of Tiger. SHARC evaluation board Accessing the A 2 D and D 2 A in an easy way – needed for all Labs. 12/30/2021 Tiger. SHARC Evaluation Board, M. Smith, ECE, University of Calgary, Canada
- Slides: 27