Presentation is loading. Please wait.

Presentation is loading. Please wait.

Generation of highly parallel code for TigerSHARC processors An introduction This presentation will probably involve audience discussion, which will create.

Similar presentations


Presentation on theme: "Generation of highly parallel code for TigerSHARC processors An introduction This presentation will probably involve audience discussion, which will create."— Presentation transcript:

1 Generation of highly parallel code for TigerSHARC processors An introduction This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation In Slide Show, click on the right mouse button Select “Meeting Minder” Select the “Action Items” tab Type in action items as they come up Click OK to dismiss this box This will automatically create an Action Item slide at the end of your presentation with your points entered.

2 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 2 / 45 + B14 Background assumed Familiarity with TigerSHARC architecture Familiarity with TigerSHARC programmer’s model for registers Some assembly experience An interest in beating the compiler in those special cases when you need the last drop of blood out of the CPU :-)

3 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 3 / 45 + B14 To be tackled What’s causing the problem –General limitations of instruction sets How to recognize when you might be coming up against TigerSHARC architecture limitations A process for optimizing the TigerSHARC parallelism –Example -- Temperature conversion –Bonus if time permits -- Average and instantaneous power

4 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 4 / 45 + B14 When are DSP instructions valid? You are going to customize –When can you use the DSP instructions? –Most -- From Monday to Friday –Some Only between 9:00 a.m. and 9:00 p.m. Check against architecture MIMD -- Parallel ops MUST be able to do this –Can it be fetched in one cycle (1 instruction line) –Can it be executed in one cycle (resource question) –Can it execute without conflicting with other instructions? –Then PROBABLY legal HOWEVER -- The designers had the final decision and you have to live by that decision!

5 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 5 / 45 + B14 Under best conditions If instruction described the right way –2 data memory access (in or out) with a REQUIRED post modification operation possibly with a modify register containing the value 0 –1 add compute operation on data registers –1 multiply compute operation on data registers –Ability to redo code using both X and Y –Sometimes – audio for example – do left channel in X and right channel in Y

6 Introduction to PPPPIC Professor’s Personal Process for Parallel Instruction Coding This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation In Slide Show, click on the right mouse button Select “Meeting Minder” Select the “Action Items” tab Type in action items as they come up Click OK to dismiss this box This will automatically create an Action Item slide at the end of your presentation with your points entered.

7 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 7 / 45 + B14 Basic code development -- any system Write the “C” code for the function void Convert(float *temperature, float *result, int N) which converts an array of temperatures measured in “Celsius” (Canadian Market) to “Fahrenheit” (Tourist Trade) Convert the code to TigerSHARC assembly code, following the standard coding and documentation practices, or just use the compiler to do the job for you

8 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 8 / 45 + B14 Standard “C” code void Convert(float *temperature, float *result, int N) { int count; for (count = 0; count < N; count++) { *result = (*temperature) * 9 / 5 + 32; temperature++; result++; }

9 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 9 / 45 + B14 Process for developing custom code Rewrite the “C” code using “LOAD/STORE” techniques TigerSHARC is essentially super- scaler RISC Write the assembly code using a hardware loop –Check that end of loop label is in the correct place REWRITE the assembly code using registers and instructions that COULD be used in parallel IF you could find the correct optimization approach Move algorithm to “Resource Usage Chart” Optimize (Attempt to) Compare and contrast time -- include set up and loop control time -- was it worth the effort?

10 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 10 / 45 + B14 TigerSHARD-style load/store “C” code void Convert( register float *temperature, register float * answer, register int N ) { register int count; register float scratch; for (count = 0; count < N; count++) { scratch = * temperature; scratch = scratch * (9 / 5); scratch = scratch + 32; *answer = scratch; temperature++; answer++; }

11 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 11 / 45 + B14

12 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 12 / 45 + B14

13 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 13 / 45 + B14

14 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 14 / 45 + B14

15 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 15 / 45 + B14

16 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 16 / 45 + B14

17 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 17 / 45 + B14

18 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 18 / 45 + B14

19 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 19 / 45 + B14

20 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 20 / 45 + B14

21 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 21 / 45 + B14

22 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 22 / 45 + B14

23 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 23 / 45 + B14

24 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 24 / 45 + B14

25 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 25 / 45 + B14

26 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 26 / 45 + B14

27 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 27 / 45 + B14

28 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 28 / 45 + B14

29 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 29 / 45 + B14

30 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 30 / 45 + B14

31 6/11/2015 Introduction to highly parallel TigerSHARC code Copyright M. Smith and S. Lei Contact smith@enel.ucalgary.ca 31 / 45 + B14


Download ppt "Generation of highly parallel code for TigerSHARC processors An introduction This presentation will probably involve audience discussion, which will create."

Similar presentations


Ads by Google