DSPRelated.com
Forums

LDF question

Started by tio tio February 8, 2004
I am working on the implementation of FIR filter with adsp-2191. My VisualDSP++ is 3.0.
The ldf file, which I created for this project is:
 
// define architecture's processor
ARCHITECTURE(ADSP-2191)
// assign directory where can search for object and library files
SEARCH_DIR ($ADI_DSP\219x\lib; Work\FIR)
// include all of library and object files in assigned directory
$OBJECTS = $COMMAND_LINE_OBJECTS;
// output the map file
MAP(FIR.map)
// define the memory model
MEMORY

   mem_ivt    { TYPE(PM RAM) START(0x000000) END(0x000239) WIDTH(24) }
   mem_pmcode { TYPE(PM RAM) START(0x000240) END(0x007f38) WIDTH(24) }
   mem_pmdata { TYPE(PM RAM) START(0x007f39) END(0x007fff) WIDTH(24) }
   mem_dmdata { TYPE(DM RAM) START(0x008000) END(0x00ffff) WIDTH(16) }
}

// specify the processor of DSP system
PROCESSOR p0
{
// specify the name of dxe file
   OUTPUT ( $COMMAND_LINE_OUTPUT_FILE )
// specify the placement of input sections into output sections
// and the placement of output sections into memory
   SECTIONS
      { dxe_ivt     {INPUT_SECTIONS($OBJECTS(seg_ivt))}    > mem_ivt
        dxe_pmcode  {INPUT_SECTIONS($OBJECTS(seg_pmcode))} > mem_pmcode
        dxe_pmdata  {INPUT_SECTIONS($OBJECTS(seg_pmdata))} > mem_pmdata
        dxe_dmdata  {INPUT_SECTIONS($OBJECTS(seg_dmdata))} > mem_dmdata
      }
}
 

When I link the project everithing looks fine and complete, but the map file show
that the width of memory segments are different from those which I desire. The follow is map file:
 

PROCESSOR PROJECT: C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\FIR.dxe

Memory Map of LinkProject  "p0"
Name            Start Address  End Address   Type  Qualifier       Width  Memory-Words-Used   Memory-Words-Unused
mem_ivt         0x0            0x239         PM    RAM             0x18   0x2c                0x20e             
mem_pmcode      0x240          0x7f38        PM    RAM             0x18   0x1d                0x7cdc            
mem_pmdata      0x7f39         0x7fff        PM    RAM             0x18   0xc6                0x1               
mem_dmdata      0x8000         0xffff        DM    RAM             0x10   0xc8                0x7f38            

Memory usage information
The following output sections have been located in the following memory 'mem_ivt'
Output Section           Type           StartAddress   Size in words 
dxe_ivt                  SHT_PROGBITS   0x0              0x2c            
Total free space available in memory 'mem_ivt' is 0x20e words
The following output sections have been located in the following memory 'mem_pmcode'
Output Section           Type           StartAddress   Size in words 
dxe_pmcode               SHT_PROGBITS   0x240            0x1d            
Total free space available in memory 'mem_pmcode' is 0x7cdc words
The following output sections have been located in the following memory 'mem_pmdata'
Output Section           Type           StartAddress   Size in words 
dxe_pmdata               SHT_PROGBITS   0x7f39           0xc6            
Total free space available in memory 'mem_pmdata' is 0x1 words
The following output sections have been located in the following memory 'mem_dmdata'
Output Section           Type           StartAddress   Size in words 
dxe_dmdata               SHT_PROGBITS   0x8000           0xc8            
Total free space available in memory 'mem_dmdata' is 0x7f38 words
 

Input objects used to create the executable image are
 Input file C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj

Name                          Demangled Name                 Address     Size        Binding     Filename                                                    Section       
seg_ivt                                                      0x00000000  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 3             
.debug_line                                                  0x00000000  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 8             
.debug_info                                                  0x00000000  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 9             
.debug_abbrev                                                0x00000000  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 7             
start                                                        0x00000240  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 4             
seg_pmcode                                                   0x00000240  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 4             
initialization                                               0x0000024d  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 4             
input_sample                                                 0x0000024e  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 4             
filter                                                       0x00000253  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 4             
seg_pmdata                                                   0x00007f39  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 5             
Coeff_FIR                                                    0x00007f39  0xc6        STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 5             
seg_dmdata                                                   0x00008000  0x0         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 6             
Delay_Line                                                   0x00008000  0xc6        STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 6             
Current_Input                                                0x000080c6  0x1         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 6             
New_Sample                                                   0x000080c7  0x1         STB_LOCAL   C:\Documents and Settings\Zlatko Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj 6             

Input sections that map into the given output sections
(Note that an Address of zero usually implies that the section could not be mapped)
Output Section dxe_ivt
Input section                  Address      Size        Input file                                       
seg_ivt                        0x0          0x2c        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section dxe_pmcode
Input section                  Address      Size        Input file                                       
seg_pmcode                     0x240        0x1d        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section dxe_pmdata
Input section                  Address      Size        Input file                                       
seg_pmdata                     0x7f39       0xc6        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section dxe_dmdata
Input section                  Address      Size        Input file                                       
seg_dmdata                     0x8000       0xc8        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section .debug_abbrev
Input section                  Address      Size        Input file                                       
.debug_abbrev                  0x0          0x31        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section .debug_line
Input section                  Address      Size        Input file                                       
.debug_line                    0x0          0xf9        C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
Output Section .debug_info
Input section                  Address      Size        Input file                                       
.debug_info                    0x0          0x182       C:\Documents and Settings\Tio\My Documents\Project DSP\Work\FIR\Debug\fir.doj
 
 
 
What is wrong and if everything about my ldf file is fine, because this is my first dsp project?
Best Regards,
Tio



Hi,
Map file shows the width in Hex (0x18 in hex - 24 in decimal)
rgds
ajith
--- In , tio tio <tioenrique7@y...> wrote:
> I am working on the implementation of FIR filter with adsp-2191. My
VisualDSP++ is 3.0.
> The ldf file, which I created for this project is:
>
> // define architecture's processor
> ARCHITECTURE(ADSP-2191)
> // assign directory where can search for object and library files
> SEARCH_DIR ($ADI_DSP\219x\lib; Work\FIR)
> // include all of library and object files in assigned directory
> $OBJECTS = $COMMAND_LINE_OBJECTS;
> // output the map file
> MAP(FIR.map)
> // define the memory model
> MEMORY
> {
> mem_ivt { TYPE(PM RAM) START(0x000000) END(0x000239) WIDTH
(24) }
> mem_pmcode { TYPE(PM RAM) START(0x000240) END(0x007f38) WIDTH
(24) }
> mem_pmdata { TYPE(PM RAM) START(0x007f39) END(0x007fff) WIDTH
(24) }
> mem_dmdata { TYPE(DM RAM) START(0x008000) END(0x00ffff) WIDTH
(16) }
> }
>
> // specify the processor of DSP system
> PROCESSOR p0
> {
> // specify the name of dxe file
> OUTPUT ( $COMMAND_LINE_OUTPUT_FILE )
> // specify the placement of input sections into output sections
> // and the placement of output sections into memory
> SECTIONS
> { dxe_ivt {INPUT_SECTIONS($OBJECTS(seg_ivt))} > mem_ivt
> dxe_pmcode {INPUT_SECTIONS($OBJECTS(seg_pmcode))} >
mem_pmcode
> dxe_pmdata {INPUT_SECTIONS($OBJECTS(seg_pmdata))} >
mem_pmdata
> dxe_dmdata {INPUT_SECTIONS($OBJECTS(seg_dmdata))} >
mem_dmdata
> }
> } > When I link the project everithing looks fine and complete, but the
map file show
> that the width of memory segments are different from those which I
desire. The follow is map file:
>
>
> PROCESSOR PROJECT: C:\Documents and Settings\Tio\My
Documents\Project DSP\Work\FIR\Debug\FIR.dxe
>
> Memory Map of LinkProject "p0"
> Name Start Address End Address Type Qualifier
Width Memory-Words-Used Memory-Words-Unused
> mem_ivt 0x0 0x239 PM RAM
0x18 0x2c 0x20e
> mem_pmcode 0x240 0x7f38 PM RAM
0x18 0x1d 0x7cdc
> mem_pmdata 0x7f39 0x7fff PM RAM
0x18 0xc6 0x1
> mem_dmdata 0x8000 0xffff DM RAM
0x10 0xc8 0x7f38
>
> Memory usage information
> The following output sections have been located in the following
memory 'mem_ivt'
> Output Section Type StartAddress Size in
words
> dxe_ivt SHT_PROGBITS 0x0
0x2c
> Total free space available in memory 'mem_ivt' is 0x20e words
> The following output sections have been located in the following
memory 'mem_pmcode'
> Output Section Type StartAddress Size in
words
> dxe_pmcode SHT_PROGBITS 0x240
0x1d
> Total free space available in memory 'mem_pmcode' is 0x7cdc words
> The following output sections have been located in the following
memory 'mem_pmdata'
> Output Section Type StartAddress Size in
words
> dxe_pmdata SHT_PROGBITS 0x7f39
0xc6
> Total free space available in memory 'mem_pmdata' is 0x1 words
> The following output sections have been located in the following
memory 'mem_dmdata'
> Output Section Type StartAddress Size in
words
> dxe_dmdata SHT_PROGBITS 0x8000
0xc8
> Total free space available in memory 'mem_dmdata' is 0x7f38 words > Input objects used to create the executable image are
> Input file C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
>
> Name Demangled Name
Address Size Binding
Filename
Section
> seg_ivt
0x00000000 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
3
> .debug_line
0x00000000 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
8
> .debug_info
0x00000000 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
9
> .debug_abbrev
0x00000000 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
7
> start
0x00000240 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
4
> seg_pmcode
0x00000240 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
4
> initialization
0x0000024d 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
4
> input_sample
0x0000024e 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
4
> filter
0x00000253 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
4
> seg_pmdata
0x00007f39 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
5
> Coeff_FIR
0x00007f39 0xc6 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
5
> seg_dmdata
0x00008000 0x0 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
6
> Delay_Line
0x00008000 0xc6 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
6
> Current_Input
0x000080c6 0x1 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
6
> New_Sample
0x000080c7 0x1 STB_LOCAL C:\Documents and Settings\Zlatko
Petroff\My Documents\Project DSP\Work\FIR\Debug\fir.doj
6
>
> Input sections that map into the given output sections
> (Note that an Address of zero usually implies that the section
could not be mapped)
> Output Section dxe_ivt
> Input section Address Size Input
file
> seg_ivt 0x0 0x2c
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section dxe_pmcode
> Input section Address Size Input
file
> seg_pmcode 0x240 0x1d
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section dxe_pmdata
> Input section Address Size Input
file
> seg_pmdata 0x7f39 0xc6
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section dxe_dmdata
> Input section Address Size Input
file
> seg_dmdata 0x8000 0xc8
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section .debug_abbrev
> Input section Address Size Input
file
> .debug_abbrev 0x0 0x31
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section .debug_line
> Input section Address Size Input
file
> .debug_line 0x0 0xf9
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> Output Section .debug_info
> Input section Address Size Input
file
> .debug_info 0x0 0x182
C:\Documents and Settings\Tio\My Documents\Project
DSP\Work\FIR\Debug\fir.doj
> What is wrong and if everything about my ldf file is fine, because
this is my first dsp project?
> Best Regards,
> Tio >
> ---------------------------------
>