Building Project On C6416 DSK
Building Project On C6416 DSK
Building Project On C6416 DSK
The required libraries are csl6416.lib (C:\ti\C6000\cgtools\lib), dsk6416bsl.lib
(C:\ti\C6000\bios\lib), dsp64x.lib (C:\ti\C6400\dsplib\lib), img64x.lib
(C:\ti\C6400\imglib\lib), rts6400.lib (C:\ti\C6000\rts\lib). A linker is always required to
allocate the memory and define memory address locations.
Figure 2.(a) (b) Adding files to project
3) Click on Project >> Scan All File Dependencies. This step will locate all the required
header files.
2
Figure 3.
4) Configure the Build Options
Figure 4.
5) Follow the below figure for the configurations. As the chip we are using is C6416, select
the target version as C64xx. Under the preprocessor section, add the include paths for the
imglib, dsplib, libraries as the required header files have to be located. Define the
symbols here as CHIP_6416.
3
Figure 5.(a) (b) (c) (d) (e) Steps showing the configurations for a C6416 DSP
6) Build the project. An .out file is created in Debug folder if the compilation is successful
with no errors.
4
Figure 6.
7) Locate and Load the .out file.
Figure 7.(a) (b) Loading the .out files
5
8) Run the program by pushing the button as shown in the Fig 8 or use the hot key F5.
Figure 8. Executing the program
6
*/
I MG_conv_3x3( &i n_i mg[ ( i r ow- BOUNDARY) *Y_SI ZE] ,
p,
Y_SI ZE,
H,
SHI FT) ;
/ * l ast BOUNDARY col s ar e zer o */
p += N_COLS_FI LTERED;
f or ( i i =0; i i <BOUNDARY; ++i i ) *p++ = 0;
}
/ * l ast BOUNDARY r ows ar e zer o */
memcl ear ( out _i mg+( X_SI ZE- BOUNDARY) *Y_SI ZE, BOUNDARY*Y_SI ZE) ;
}
i nt mai n( voi d)
{
TI MER_Handl e hTi mer ;
unsi gned i nt st ar t , st op, over head, t ot al = 0, t ; / * t i mi ng */
const i nt N = 10; / * how many t i mes t o pr of i l e */
i nt i i = 0;
DSK6416_i ni t ( ) ; / * i ni t i al i ze t he DSK boar d suppor t l i br ar y */
/ * conf i gur e t i mer */
hTi mer = TI MER_open( TI MER_DEVANY, 0) ;
TI MER_conf i gAr gs( hTi mer , 0x000002C0, 0xFFFFFFFF, 0x00000000) ;
/ * comput e over head of cal l i ng t he t i mer . */
st ar t = TI MER_get Count ( hTi mer ) ; / * cal l ed t wi ce t o avoi d L1D mi ss. */
st ar t = TI MER_get Count ( hTi mer ) ;
st op = TI MER_get Count ( hTi mer ) ;
over head = st op - st ar t ;
f or ( ; i i <N; ++i i ) {
st ar t = TI MER_get Count ( hTi mer ) ; / * begi n " pr of i l e ar ea" */
f i l t er _i mage( ) ;
st op = TI MER_get Count ( hTi mer ) ; / * end " pr of i l e ar ea" */
t = ( st op- st ar t - over head) * 8;
t ot al += t ;
pr i nt f ( " # cycl es t o f i l t er i mage: %d\ n" , t ) ;
}
pr i nt f ( " avg t i me i s %. 2f cycl es. \ n" , ( f l oat ) t ot al / ( f l oat ) N) ;
}
9
VIEWING THE IMAGE USING CCS
CCS offers simple ways of viewing the data as a graph, histogram, or even as an image.
Below steps illustrate a walkthrough for displaying an image.
1) Click View >> Graph >> Image
2) Select the RGB color space to select the R,G,B plane. A gray scale image can be viewed
if all the planes, i.e., R,G,B planes have same arrays. Enter the address location of the
image located or a HEX address where the image data have to be read.
10
3) Select the Lines per Display as #rows in the image and Pixels per Line as #columns in the
image. Please Select Image Origin as Top Left, else you have an inverted image.
11
4) Now you can see the image displayed in a new window as shown below. A pointer
(crosswire) is provided to view the pixel intensities and the locations.
12
40