Cpr E 488 Laboratory

Lab 5: Software Refinement Techniques (Digital Camera, Part II)


Lab Description

In the previous lab, you profiled the JPEG application and analyzed its performance.  Now you will use the profile information you collected to improve the performance of the digital camera application. In many designs, adding hardware to speed up performance is not an option because of monetary or manufacturing concerns - making software techniques the only option to increase performance. Learning to recognize performance enhancements in software will help you write better embedded software and, in turn, create more valuable embedded systems.

 

The first refinement technique you will see is called integer refinement. Integer refinement reduces the number of floating point operations by transforming the algorithm into its integer version. During this transformation, you will lose accuracy in the calculation because of the missing floating-point digits. Depending on the algorithm, you will have to determine an acceptable trade-off between losing accuracy and keeping calculations from overflowing.

 

Pre-computation is the second technique you will see. This is when you use tables of pre-computed values instead of spending CPU time computing them on the fly. The trade-off with this technique is that tables will require memory. It is important to choose the function that will be moved into a table correctly so that it takes an acceptable amount of memory. This technique is very popular in communication systems where several periods of a sine wave are stored in a table and used when needed instead of calculating the sin() function. Pre-computation is preferred over computation on the fly, because the computation of a sine wave often involves floating point multiplications and divisions.

Prelab

No Prelab this week.

Lab Files

The following files are necessary for doing this lab.

File

Description

CPRE488_LAB05.pdf

Lab 5 Instructions

eval_form_lab_5.pdf

Lab 5 Evaluation Form

lab_5.zip

Lab 5 Project Files

gen_rgb2yuv_tables.m

Pre-Computation Script