Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
|
Hi all, I would like to know if the design tools for ADSP 21060 can be used for ADSP 14060 (14060 has 4 ADSP 21060) ? Or I need to go for another set of design tools ? Regards, pinaki |
|
|
|
ADI's VisualDSP++ works fine with the the Quad-SHARC AD14060. Keep in mind the Simulator does not support multiprocessing, but target emulator sessions support multiprocessor functions nicely. My experience has been positive using VisualDSP++ 2.0 with the Summit-ICE (PCI-based) emulator, although there were some startup pains to overcome (such as defining the DSPs in reverse order using the JTAG ICE configurator). Don Waldron > -----Original Message----- > From: Pinaki Chanda [SMTP:] > Sent: Thursday, May 01, 2003 2:50 AM > To: > Subject: [adsp] ADSP 14060 > > Hi all, > I would like to know if the design tools > for ADSP 21060 can be used for ADSP 14060 (14060 > has 4 ADSP 21060) ? Or I need to go for another > set of design tools ? > > Regards, > pinaki > > > _____________________________________ > /groups.php3 |
|
|
|
On 1 May 2003, Pinaki Chanda wrote: > I would like to know if the design tools > for ADSP 21060 can be used for ADSP 14060 (14060 > has 4 ADSP 21060) ? Or I need to go for another > set of design tools ? > Yes, the data sheet shows that it looks like 4 21060's on one jtag chain, so standard tools that can handle multiple devices should work fine. I haven't done it myself, but it looks like it should work. Patience, persistence, truth, Dr. mike |
|
Hi all, I had tried some multiprocessing code written in assmebly on adsp-14060, which works fine. Lately I have switched to C. I am encountering few problems. I have two C files (ID1.c and ID2.c) and 1 asm file (shared.asm). I have include above three file to the same project in vdsp++2.0. id1.c=====> #include<stdio.h> extern int arr_id1[3] = {1,2,3}; main() { printf("%d",arr_id1[0]); while(1); } id2.c=====> #include<stdio.h> extern int arr_id2[3] = {1,2,3}; main() { printf("%d",arr_id2[0]); while(1); } shared.asm======> #define N 10 .section/dm seg_share; // source in external SBSRAM .var ext_mem_data[N] = "shared_data.dat"; .global ext_mem_data; On buliding, I get the following error [Error li2523] '_main': Multiply defined symbol. When I rename main function of ID2.c to some other name I don't get that error. I guess, two C file with main function cannot be added to same project. What is the solution for that? After doing the above thing I get the following error: [Error li2007] symbol '___lib_prog_term' referenced in file 'C:\PROGRAM FILES\ANALOG DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' could not be resolved How to remove this error? Regards Liyju ______________________________________________ Everything is difficult before it becomes easy. --- "Waldron, Donald M" <> wrote: > ADI's VisualDSP++ works fine with the the Quad-SHARC > AD14060. Keep in mind > the Simulator does not support multiprocessing, but > target emulator sessions > support multiprocessor functions nicely. > > My experience has been positive using VisualDSP++ > 2.0 with the Summit-ICE > (PCI-based) emulator, although there were some > startup pains to overcome > (such as defining the DSPs in reverse order using > the JTAG ICE > configurator). > > Don Waldron > > > -----Original Message----- > > From: Pinaki Chanda [SMTP:] > > Sent: Thursday, May 01, 2003 2:50 AM > > To: > > Subject: [adsp] ADSP 14060 > > > > Hi all, > > I would like to know if the design tools > > for ADSP 21060 can be used for ADSP 14060 (14060 > > has 4 ADSP 21060) ? Or I need to go for another > > set of design tools ? > > > > Regards, > > pinaki > > > > > > > > > > > > > > > > _____________________________________ > > /groups.php3 > > > > > > > > > > _____________________________________ > /groups.php3 __________________________________ |
|
It is a standard C constraint to require that only one main() function be included in the link. One thing you may try with the asm file is to turn it into a C file by embedding the assembly code within a C function and enclosing each assembly instruction within a C asm("AssemblyInstruction;"); statement. For example: asm("r8 = dm(i4, 0);"); /* *fpga_mem_ptr = start marker */ > From: Liyju Janardhan [SMTP:] > > Hi all, > > I had tried some multiprocessing code written in > assmebly on adsp-14060, which works fine. > > Lately I have switched to C. I am encountering few > problems. > I have two C files (ID1.c and ID2.c) and 1 asm file > (shared.asm). > I have include above three file to the same project in > vdsp++2.0. > > id1.c=====> > #include<stdio.h> > > extern int arr_id1[3] = {1,2,3}; > > main() > { > printf("%d",arr_id1[0]); > > while(1); > > } > id2.c=====> > #include<stdio.h> > > extern int arr_id2[3] = {1,2,3}; > > main() > { > printf("%d",arr_id2[0]); > > while(1); > > } > shared.asm======> > #define N 10 > > .section/dm seg_share; // source in external SBSRAM > .var ext_mem_data[N] = "shared_data.dat"; > .global ext_mem_data; > On buliding, I get the following error > [Error li2523] '_main': Multiply defined symbol. > > When I rename main function of ID2.c to some other > name I don't get that error. > I guess, two C file with main function cannot be added > to same project. > What is the solution for that? > > After doing the above thing I get the following error: > [Error li2007] symbol '___lib_prog_term' referenced > in file 'C:\PROGRAM FILES\ANALOG > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' could > not be resolved > How to remove this error? > > Regards > > Liyju > ______________________________________________ > Everything is difficult before it becomes easy. > --- "Waldron, Donald M" > <> wrote: > > ADI's VisualDSP++ works fine with the the Quad-SHARC > > AD14060. Keep in mind > > the Simulator does not support multiprocessing, but > > target emulator sessions > > support multiprocessor functions nicely. > > > > My experience has been positive using VisualDSP++ > > 2.0 with the Summit-ICE > > (PCI-based) emulator, although there were some > > startup pains to overcome > > (such as defining the DSPs in reverse order using > > the JTAG ICE > > configurator). > > > > Don Waldron > > > > > -----Original Message----- > > > From: Pinaki Chanda [SMTP:] > > > Sent: Thursday, May 01, 2003 2:50 AM > > > To: > > > Subject: [adsp] ADSP 14060 > > > > > > Hi all, > > > I would like to know if the design tools > > > for ADSP 21060 can be used for ADSP 14060 (14060 > > > has 4 ADSP 21060) ? Or I need to go for another > > > set of design tools ? > > > > > > Regards, > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > /groups.php3 > > > > > > > > > > > > > > > > _____________________________________ > > /groups.php3 > > > > > > > > > > __________________________________ > _____________________________________ > /groups.php3 |
|
Thanks for the reply. Well Bhaskar I have already rename the main of one C file to some other function. That has resolved the conflict. But now I the following error: [Error li2007] symbol '___lib_prog_term' referenced in file 'C:\PROGRAM FILES\ANALOG DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' could not be resolved How to remove this error. Paul I can use inline assembly to convert the assmebly file to C, But what about the main. Will it create two dxe file one for each processor. Right know it get the above error. So no dxe is created. Regards Liyju --- Bhaskar Das <> wrote: > Hey, how do u exepct 2 main enteries under 1 > project? So first u rename > either of ur main() by some other func. name that > suits u. That should > resolve the conflict. > Bhaskar Das > > ----- Original Message ----- > From: "Liyju Janardhan" <> > To: <> > Sent: Friday, May 02, 2003 2:18 PM > Subject: RE: [adsp] ADSP 14060 > > Hi all, > > > > I had tried some multiprocessing code written in > > assmebly on adsp-14060, which works fine. > > > > Lately I have switched to C. I am encountering few > > problems. > > I have two C files (ID1.c and ID2.c) and 1 asm > file > > (shared.asm). > > I have include above three file to the same > project in > > vdsp++2.0. > > > > id1.c=====> > > #include<stdio.h> > > > > extern int arr_id1[3] = {1,2,3}; > > > > main() > > { > > printf("%d",arr_id1[0]); > > > > while(1); > > > > } > > > > > > id2.c=====> > > #include<stdio.h> > > > > extern int arr_id2[3] = {1,2,3}; > > > > main() > > { > > printf("%d",arr_id2[0]); > > > > while(1); > > > > } > > > > > > shared.asm======> > > #define N 10 > > > > .section/dm seg_share; // source in external > SBSRAM > > .var ext_mem_data[N] = "shared_data.dat"; > > .global ext_mem_data; > > > > > > On buliding, I get the following error > > [Error li2523] '_main': Multiply defined symbol. > > > > When I rename main function of ID2.c to some other > > name I don't get that error. > > I guess, two C file with main function cannot be > added > > to same project. > > What is the solution for that? > > > > After doing the above thing I get the following > error: > > [Error li2007] symbol '___lib_prog_term' > referenced > > in file 'C:\PROGRAM FILES\ANALOG > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > could > > not be resolved > > How to remove this error? > > > > Regards > > > > Liyju > > ______________________________________________ > > Everything is difficult before it becomes easy. > > > > > > --- "Waldron, Donald M" > > <> wrote: > > > ADI's VisualDSP++ works fine with the the > Quad-SHARC > > > AD14060. Keep in mind > > > the Simulator does not support multiprocessing, > but > > > target emulator sessions > > > support multiprocessor functions nicely. > > > > > > My experience has been positive using > VisualDSP++ > > > 2.0 with the Summit-ICE > > > (PCI-based) emulator, although there were some > > > startup pains to overcome > > > (such as defining the DSPs in reverse order > using > > > the JTAG ICE > > > configurator). > > > > > > Don Waldron > > > > > > > -----Original Message----- > > > > From: Pinaki Chanda > [SMTP:] > > > > Sent: Thursday, May 01, 2003 2:50 AM > > > > To: > > > > Subject: [adsp] ADSP 14060 > > > > > > > > Hi all, > > > > I would like to know if the design > tools > > > > for ADSP 21060 can be used for ADSP 14060 > (14060 > > > > has 4 ADSP 21060) ? Or I need to go for > another > > > > set of design tools ? > > > > > > > > Regards, > > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > _____________________________________ > > /groups.php3 > > > > > > > > ______________________________________ > Scanned and protected by Email scanner __________________________________ |
|
I believe you need to include 060_hdr.doj in your build (via the LDF file). I think the default LDF file has this. Don Waldron > -----Original Message----- > From: Liyju Janardhan [SMTP:] > Sent: Friday, May 02, 2003 11:24 AM > To: > Subject: Re: [adsp] ADSP 14060 > > Thanks for the reply. > > Well Bhaskar I have already rename the main of one > C file to some other function. That has resolved the > conflict. But now I the following error: > > [Error li2007] symbol '___lib_prog_term' > referenced in file 'C:\PROGRAM FILES\ANALOG > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > could not be resolved > > How to remove this error. > Paul I can use inline assembly to convert the assmebly > > file to C, But what about the main. Will it create two > > dxe file one for each processor. > Right know it get the above error. So no dxe is > created. > > Regards > > Liyju > --- Bhaskar Das <> wrote: > > Hey, how do u exepct 2 main enteries under 1 > > project? So first u rename > > either of ur main() by some other func. name that > > suits u. That should > > resolve the conflict. > > > > > > Bhaskar Das > > > > ----- Original Message ----- > > From: "Liyju Janardhan" <> > > To: <> > > Sent: Friday, May 02, 2003 2:18 PM > > Subject: RE: [adsp] ADSP 14060 > > > > > > > Hi all, > > > > > > I had tried some multiprocessing code written in > > > assmebly on adsp-14060, which works fine. > > > > > > Lately I have switched to C. I am encountering few > > > problems. > > > I have two C files (ID1.c and ID2.c) and 1 asm > > file > > > (shared.asm). > > > I have include above three file to the same > > project in > > > vdsp++2.0. > > > > > > id1.c=====> > > > #include<stdio.h> > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > main() > > > { > > > printf("%d",arr_id1[0]); > > > > > > while(1); > > > > > > } > > > > > > > > > id2.c=====> > > > #include<stdio.h> > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > main() > > > { > > > printf("%d",arr_id2[0]); > > > > > > while(1); > > > > > > } > > > > > > > > > shared.asm======> > > > #define N 10 > > > > > > .section/dm seg_share; // source in external > > SBSRAM > > > .var ext_mem_data[N] = "shared_data.dat"; > > > .global ext_mem_data; > > > > > > > > > On buliding, I get the following error > > > [Error li2523] '_main': Multiply defined symbol. > > > > > > When I rename main function of ID2.c to some other > > > name I don't get that error. > > > I guess, two C file with main function cannot be > > added > > > to same project. > > > What is the solution for that? > > > > > > After doing the above thing I get the following > > error: > > > [Error li2007] symbol '___lib_prog_term' > > referenced > > > in file 'C:\PROGRAM FILES\ANALOG > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > could > > > not be resolved > > > How to remove this error? > > > > > > Regards > > > > > > Liyju > > > ______________________________________________ > > > Everything is difficult before it becomes easy. > > > > > > > > > --- "Waldron, Donald M" > > > <> wrote: > > > > ADI's VisualDSP++ works fine with the the > > Quad-SHARC > > > > AD14060. Keep in mind > > > > the Simulator does not support multiprocessing, > > but > > > > target emulator sessions > > > > support multiprocessor functions nicely. > > > > > > > > My experience has been positive using > > VisualDSP++ > > > > 2.0 with the Summit-ICE > > > > (PCI-based) emulator, although there were some > > > > startup pains to overcome > > > > (such as defining the DSPs in reverse order > > using > > > > the JTAG ICE > > > > configurator). > > > > > > > > Don Waldron > > > > > > > > > -----Original Message----- > > > > > From: Pinaki Chanda > > [SMTP:] > > > > > Sent: Thursday, May 01, 2003 2:50 AM > > > > > To: > > > > > Subject: [adsp] ADSP 14060 > > > > > > > > > > Hi all, > > > > > I would like to know if the design > > tools > > > > > for ADSP 21060 can be used for ADSP 14060 > > (14060 > > > > > has 4 ADSP 21060) ? Or I need to go for > > another > > > > > set of design tools ? > > > > > > > > > > Regards, > > > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > _____________________________________ > > > /groups.php3 > > > > > > > > > > > > > > > > > > ______________________________________ > > Scanned and protected by Email scanner > __________________________________ > _____________________________________ > /groups.php3 |
|
|
|
Thanks Don, including 060_hdr.doj to the objects in ldf file solved the problem. Now on buliding it create two dxe files ID1.dxe and ID2.dxe which get loaded to p0 and p1 processor respectively. But, on excuting code on simulator (cntrl F11) it only steps through ID1.c, the code in p1(ID2.c) dosen't run. That's because it doen't have a main function. The code is as given below: ID1.c======> #include<stdio.h> int arr_id1[3] = {1,2,3}; extern int arr_id2[3]; extern void man(); main() { printf("%d",arr_id2[0]); while(1); } ID2.c======> #include<stdio.h> int arr_id2[3] = {12,23,35}; extern int arr_id1[3]; void man() { printf("%d",arr_id1[0]); while(1); } As soon as the processors boot P0 will start executing the code because it has main function. How to make P1 execute its code. Is there any direct solution to it? The other way round is to issue an VIRPT interrupt by writing the address of man() to the VIRPT register of P1. So when the processor P0 write to the VIRPT register of P1, P1 gets an interrupt and will execute the void man() function. Correct me if I am wrong. But the point is how to get the address of man() fuction. Functions like interrupt(SIG_XXX,man) write the address of isr to the interrupt vector address. How can use this? Thanks again Bhaskar,Paul, Don for the reply. Regards Liyju --- "Waldron, Donald M" <> wrote: > I believe you need to include 060_hdr.doj in your > build (via the LDF file). > I think the default LDF file has this. > > Don Waldron > > > -----Original Message----- > > From: Liyju Janardhan [SMTP:] > > Sent: Friday, May 02, 2003 11:24 AM > > To: > > Subject: Re: [adsp] ADSP 14060 > > > > Thanks for the reply. > > > > Well Bhaskar I have already rename the main of one > > C file to some other function. That has resolved > the > > conflict. But now I the following error: > > > > [Error li2007] symbol '___lib_prog_term' > > referenced in file 'C:\PROGRAM FILES\ANALOG > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > could not be resolved > > > > How to remove this error. > > Paul I can use inline assembly to convert the > assmebly > > > > file to C, But what about the main. Will it create > two > > > > dxe file one for each processor. > > Right know it get the above error. So no dxe is > > created. > > > > Regards > > > > Liyju > > > > > > > > > > > > --- Bhaskar Das <> wrote: > > > Hey, how do u exepct 2 main enteries under 1 > > > project? So first u rename > > > either of ur main() by some other func. name > that > > > suits u. That should > > > resolve the conflict. > > > > > > > > > Bhaskar Das > > > > > > ----- Original Message ----- > > > From: "Liyju Janardhan" <> > > > To: <> > > > Sent: Friday, May 02, 2003 2:18 PM > > > Subject: RE: [adsp] ADSP 14060 > > > > > > > > > > Hi all, > > > > > > > > I had tried some multiprocessing code written > in > > > > assmebly on adsp-14060, which works fine. > > > > > > > > Lately I have switched to C. I am encountering > few > > > > problems. > > > > I have two C files (ID1.c and ID2.c) and 1 asm > > > file > > > > (shared.asm). > > > > I have include above three file to the same > > > project in > > > > vdsp++2.0. > > > > > > > > id1.c=====> > > > > #include<stdio.h> > > > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > > > main() > > > > { > > > > printf("%d",arr_id1[0]); > > > > > > > > while(1); > > > > > > > > } > > > > > > > > > > > > id2.c=====> > > > > #include<stdio.h> > > > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > > > main() > > > > { > > > > printf("%d",arr_id2[0]); > > > > > > > > while(1); > > > > > > > > } > > > > > > > > > > > > shared.asm======> > > > > #define N 10 > > > > > > > > .section/dm seg_share; // source in external > > > SBSRAM > > > > .var ext_mem_data[N] = "shared_data.dat"; > > > > .global ext_mem_data; > > > > > > > > > > > > On buliding, I get the following error > > > > [Error li2523] '_main': Multiply defined > symbol. > > > > > > > > When I rename main function of ID2.c to some > other > > > > name I don't get that error. > > > > I guess, two C file with main function cannot > be > > > added > > > > to same project. > > > > What is the solution for that? > > > > > > > > After doing the above thing I get the > following > > > error: > > > > [Error li2007] symbol '___lib_prog_term' > > > referenced > > > > in file 'C:\PROGRAM FILES\ANALOG > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > could > > > > not be resolved > > > > How to remove this error? > > > > > > > > Regards > > > > > > > > Liyju > > > > ______________________________________________ > > > > Everything is difficult before it becomes > easy. > > > > > > > > > > > > --- "Waldron, Donald M" > > > > <> wrote: > > > > > ADI's VisualDSP++ works fine with the the > > > Quad-SHARC > > > > > AD14060. Keep in mind > > > > > the Simulator does not support > multiprocessing, > > > but > > > > > target emulator sessions > > > > > support multiprocessor functions nicely. > > > > > > > > > > My experience has been positive using > > > VisualDSP++ > > > > > 2.0 with the Summit-ICE > > > > > (PCI-based) emulator, although there were > some > > > > > startup pains to overcome > > > > > (such as defining the DSPs in reverse order > > > using > > > > > the JTAG ICE > > > > > configurator). > > > > > > > > > > Don Waldron > > > > > > > > > > > -----Original Message----- > > > > > > From: Pinaki Chanda > > > [SMTP:] > > > > > > Sent: Thursday, May 01, 2003 2:50 AM > > > > > > To: > > > > > > Subject: [adsp] ADSP 14060 > > > > > > > > > > > > Hi all, > > > > > > I would like to know if the > design > > > tools > > > > > > for ADSP 21060 can be used for ADSP 14060 > > > (14060 > > > > > > has 4 ADSP 21060) ? Or I need to go for > > > another > > > > > > set of design tools ? > > > > > > > > > > > > Regards, > > > > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > _____________________________________ > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________ > > > Scanned and protected by Email scanner > > > > > > __________________________________ > > > > > > _____________________________________ > > /groups.php3 > > > > > > > __________________________________ |
|
|
|
> From: Vanbellinghen, Paul > > It is a standard C constraint to require that only one main() function be > included in the link. One thing you may try with the asm file is to turn > it into a C file by embedding the assembly code within a C function and > enclosing each assembly instruction within a C > asm("AssemblyInstruction;"); statement. > > For example: > > asm("r8 = dm(i4, 0);"); /* *fpga_mem_ptr = start marker */ > > From: Liyju Janardhan [SMTP:] > > Hi all, > > I had tried some multiprocessing code written in > assmebly on adsp-14060, which works fine. > > Lately I have switched to C. I am encountering few > problems. > I have two C files (ID1.c and ID2.c) and 1 asm file > (shared.asm). > I have include above three file to the same project in > vdsp++2.0. > > id1.c=====> > #include<stdio.h> > > extern int arr_id1[3] = {1,2,3}; > > main() > { > printf("%d",arr_id1[0]); > > while(1); > > } > id2.c=====> > #include<stdio.h> > > extern int arr_id2[3] = {1,2,3}; > > main() > { > printf("%d",arr_id2[0]); > > while(1); > > } > shared.asm======> > #define N 10 > > .section/dm seg_share; // source in external SBSRAM > .var ext_mem_data[N] = "shared_data.dat"; > .global ext_mem_data; > On buliding, I get the following error > [Error li2523] '_main': Multiply defined symbol. > > When I rename main function of ID2.c to some other > name I don't get that error. > I guess, two C file with main function cannot be added > to same project. > What is the solution for that? > > After doing the above thing I get the following error: > [Error li2007] symbol '___lib_prog_term' referenced > in file 'C:\PROGRAM FILES\ANALOG > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' could > not be resolved > How to remove this error? > > Regards > > Liyju > ______________________________________________ > Everything is difficult before it becomes easy. > --- "Waldron, Donald M" > <> wrote: > > ADI's VisualDSP++ works fine with the the Quad-SHARC > > AD14060. Keep in mind > > the Simulator does not support multiprocessing, but > > target emulator sessions > > support multiprocessor functions nicely. > > > > My experience has been positive using VisualDSP++ > > 2.0 with the Summit-ICE > > (PCI-based) emulator, although there were some > > startup pains to overcome > > (such as defining the DSPs in reverse order using > > the JTAG ICE > > configurator). > > > > Don Waldron > > > > > -----Original Message----- > > > From: Pinaki Chanda [SMTP:] > > > Sent: Thursday, May 01, 2003 2:50 AM > > > To: > > > Subject: [adsp] ADSP 14060 > > > > > > Hi all, > > > I would like to know if the design tools > > > for ADSP 21060 can be used for ADSP 14060 (14060 > > > has 4 ADSP 21060) ? Or I need to go for another > > > set of design tools ? > > > > > > Regards, > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > /groups.php3 > > > > > > > > > > > > > > > > _____________________________________ > > /groups.php3 > > > > > > > > > > __________________________________ > _____________________________________ > /groups.php3 |
|
Liyju, What you need is a main for both .dxe's. Use the LDF file to specify which main() function .doj's gets loaded into what processor. See Analog Device's "Linker and Utilities Manual" especially the section "Linking for Multiprocessor and Shared Memory". I have four processors, and elected to not use a shared memory image. Instead, I used the LINK_AGAINST macro, and linked each DSP against all others (this allws globals to be shared between processors). I've read VisualDSP++ 3.0 provides an LDF wizard, but I was able to do everything with VisualDSP++ 2.0. Keep in mind, the Simulator only supports one .dse at a time. You can load ps1.dxe or ps2.dxe, but not both at the same time. Don Waldron > -----Original Message----- > From: Liyju Janardhan [SMTP:] > Sent: Saturday, May 03, 2003 8:16 AM > To: > Subject: RE: [adsp] ADSP 14060 -- Multiprocessing using C > > Thanks Don, including 060_hdr.doj to the objects in > ldf file solved the problem. > > Now on buliding it create two dxe files ID1.dxe and > ID2.dxe which get loaded to p0 and p1 processor > respectively. > > But, on excuting code on simulator (cntrl F11) it only > > steps through ID1.c, the code in p1(ID2.c) dosen't > run. > > That's because it doen't have a main function. > > The code is as given below: > > ID1.c======> > #include<stdio.h> > > int arr_id1[3] = {1,2,3}; > extern int arr_id2[3]; > extern void man(); > > main() > { > printf("%d",arr_id2[0]); > > while(1); > > } > > ID2.c======> > #include<stdio.h> > > int arr_id2[3] = {12,23,35}; > extern int arr_id1[3]; > > void man() > { > printf("%d",arr_id1[0]); > > while(1); > > } > As soon as the processors boot P0 will start executing > > the code because it has main function. > How to make P1 execute its code. > Is there any direct solution to it? > > The other way round is to issue an VIRPT interrupt by > writing the address of man() to the VIRPT register of > P1. > So when the processor P0 write to the VIRPT > register of P1, P1 gets an interrupt and will execute > the void man() function. > > Correct me if I am wrong. > > But the point is how to get the address of man() > fuction. > Functions like interrupt(SIG_XXX,man) write the > address of isr to the interrupt vector address. > > How can use this? > > Thanks again Bhaskar,Paul, Don for the reply. > > Regards > > Liyju > > > --- "Waldron, Donald M" > <> wrote: > > I believe you need to include 060_hdr.doj in your > > build (via the LDF file). > > I think the default LDF file has this. > > > > Don Waldron > > > > > -----Original Message----- > > > From: Liyju Janardhan [SMTP:] > > > Sent: Friday, May 02, 2003 11:24 AM > > > To: > > > Subject: Re: [adsp] ADSP 14060 > > > > > > Thanks for the reply. > > > > > > Well Bhaskar I have already rename the main of one > > > C file to some other function. That has resolved > > the > > > conflict. But now I the following error: > > > > > > [Error li2007] symbol '___lib_prog_term' > > > referenced in file 'C:\PROGRAM FILES\ANALOG > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > could not be resolved > > > > > > How to remove this error. > > > Paul I can use inline assembly to convert the > > assmebly > > > > > > file to C, But what about the main. Will it create > > two > > > > > > dxe file one for each processor. > > > Right know it get the above error. So no dxe is > > > created. > > > > > > Regards > > > > > > Liyju > > > > > > > > > > > > > > > > > > --- Bhaskar Das <> wrote: > > > > Hey, how do u exepct 2 main enteries under 1 > > > > project? So first u rename > > > > either of ur main() by some other func. name > > that > > > > suits u. That should > > > > resolve the conflict. > > > > > > > > > > > > Bhaskar Das > > > > > > > > ----- Original Message ----- > > > > From: "Liyju Janardhan" <> > > > > To: <> > > > > Sent: Friday, May 02, 2003 2:18 PM > > > > Subject: RE: [adsp] ADSP 14060 > > > > > > > > > > > > > Hi all, > > > > > > > > > > I had tried some multiprocessing code written > > in > > > > > assmebly on adsp-14060, which works fine. > > > > > > > > > > Lately I have switched to C. I am encountering > > few > > > > > problems. > > > > > I have two C files (ID1.c and ID2.c) and 1 asm > > > > file > > > > > (shared.asm). > > > > > I have include above three file to the same > > > > project in > > > > > vdsp++2.0. > > > > > > > > > > id1.c=====> > > > > > #include<stdio.h> > > > > > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > > > > > main() > > > > > { > > > > > printf("%d",arr_id1[0]); > > > > > > > > > > while(1); > > > > > > > > > > } > > > > > > > > > > > > > > > id2.c=====> > > > > > #include<stdio.h> > > > > > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > > > > > main() > > > > > { > > > > > printf("%d",arr_id2[0]); > > > > > > > > > > while(1); > > > > > > > > > > } > > > > > > > > > > > > > > > shared.asm======> > > > > > #define N 10 > > > > > > > > > > .section/dm seg_share; // source in external > > > > SBSRAM > > > > > .var ext_mem_data[N] = "shared_data.dat"; > > > > > .global ext_mem_data; > > > > > > > > > > > > > > > On buliding, I get the following error > > > > > [Error li2523] '_main': Multiply defined > > symbol. > > > > > > > > > > When I rename main function of ID2.c to some > > other > > > > > name I don't get that error. > > > > > I guess, two C file with main function cannot > > be > > > > added > > > > > to same project. > > > > > What is the solution for that? > > > > > > > > > > After doing the above thing I get the > > following > > > > error: > > > > > [Error li2007] symbol '___lib_prog_term' > > > > referenced > > > > > in file 'C:\PROGRAM FILES\ANALOG > > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > > could > > > > > not be resolved > > > > > How to remove this error? > > > > > > > > > > Regards > > > > > > > > > > Liyju > > > > > ______________________________________________ > > > > > Everything is difficult before it becomes > > easy. > > > > > > > > > > > > > > > --- "Waldron, Donald M" > > > > > <> wrote: > > > > > > ADI's VisualDSP++ works fine with the the > > > > Quad-SHARC > > > > > > AD14060. Keep in mind > > > > > > the Simulator does not support > > multiprocessing, > > > > but > > > > > > target emulator sessions > > > > > > support multiprocessor functions nicely. > > > > > > > > > > > > My experience has been positive using > > > > VisualDSP++ > > > > > > 2.0 with the Summit-ICE > > > > > > (PCI-based) emulator, although there were > > some > > > > > > startup pains to overcome > > > > > > (such as defining the DSPs in reverse order > > > > using > > > > > > the JTAG ICE > > > > > > configurator). > > > > > > > > > > > > Don Waldron > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Pinaki Chanda > > > > [SMTP:] > > > > > > > Sent: Thursday, May 01, 2003 2:50 AM > > > > > > > To: > > > > > > > Subject: [adsp] ADSP 14060 > > > > > > > > > > > > > > Hi all, > > > > > > > I would like to know if the > > design > > > > tools > > > > > > > for ADSP 21060 can be used for ADSP 14060 > > > > (14060 > > > > > > > has 4 ADSP 21060) ? Or I need to go for > > > > another > > > > > > > set of design tools ? > > > > > > > > > > > > > > Regards, > > > > > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > > > > _____________________________________ > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________ > > > > Scanned and protected by Email scanner > > > > > > > > > __________________________________ > > > > > > > > > _____________________________________ > > > /groups.php3 > > > > > > > > > > > > __________________________________ > > _____________________________________ > /groups.php3 |
|
|
|
I am using vsdp++2.0. The project, when build create two dxe files ID1.dxe and ID2.dxe which get loaded to P0 and P1 respectively. But ID2.c doesn't contain main(). Don, do you mean that I have to create two different project with source file id1.c in one project, and id2.c with other project.(both C file containing main) And build two different dxe's. I have tried that, but the variable's defined in one C file cannot be called on other using extern keywords. May be I am messing up somewhere. I better read the linker manual. Meanwhile if you have any suggestion please forward it to my mailbox. Thanks for your replies. Regards Liyju --- "Waldron, Donald M" <> wrote: > Liyju, > > What you need is a main for both .dxe's. Use the > LDF file to specify which > main() function .doj's gets loaded into what > processor. See Analog Device's > "Linker and Utilities Manual" especially the section > "Linking for > Multiprocessor and Shared Memory". > > I have four processors, and elected to not use a > shared memory image. > Instead, I used the LINK_AGAINST macro, and linked > each DSP against all > others (this allws globals to be shared between > processors). I've read > VisualDSP++ 3.0 provides an LDF wizard, but I was > able to do everything with > VisualDSP++ 2.0. > > Keep in mind, the Simulator only supports one .dse > at a time. You can load > ps1.dxe or ps2.dxe, but not both at the same time. > > Don Waldron > > > -----Original Message----- > > From: Liyju Janardhan [SMTP:] > > Sent: Saturday, May 03, 2003 8:16 AM > > To: > > Subject: RE: [adsp] ADSP 14060 -- Multiprocessing > using C > > > > Thanks Don, including 060_hdr.doj to the objects > in > > ldf file solved the problem. > > > > Now on buliding it create two dxe files ID1.dxe > and > > ID2.dxe which get loaded to p0 and p1 processor > > respectively. > > > > But, on excuting code on simulator (cntrl F11) it > only > > > > steps through ID1.c, the code in p1(ID2.c) dosen't > > run. > > > > That's because it doen't have a main function. > > > > The code is as given below: > > > > ID1.c======> > > #include<stdio.h> > > > > int arr_id1[3] = {1,2,3}; > > extern int arr_id2[3]; > > extern void man(); > > > > main() > > { > > printf("%d",arr_id2[0]); > > > > while(1); > > > > } > > > > ID2.c======> > > #include<stdio.h> > > > > int arr_id2[3] = {12,23,35}; > > extern int arr_id1[3]; > > > > void man() > > { > > printf("%d",arr_id1[0]); > > > > while(1); > > > > } > > > > > > As soon as the processors boot P0 will start > executing > > > > the code because it has main function. > > How to make P1 execute its code. > > Is there any direct solution to it? > > > > The other way round is to issue an VIRPT interrupt > by > > writing the address of man() to the VIRPT register > of > > P1. > > So when the processor P0 write to the VIRPT > > register of P1, P1 gets an interrupt and will > execute > > the void man() function. > > > > Correct me if I am wrong. > > > > But the point is how to get the address of man() > > fuction. > > Functions like interrupt(SIG_XXX,man) write the > > address of isr to the interrupt vector address. > > > > How can use this? > > > > Thanks again Bhaskar,Paul, Don for the reply. > > > > Regards > > > > Liyju > > > > > > > > > > --- "Waldron, Donald M" > > <> wrote: > > > I believe you need to include 060_hdr.doj in > your > > > build (via the LDF file). > > > I think the default LDF file has this. > > > > > > Don Waldron > > > > > > > -----Original Message----- > > > > From: Liyju Janardhan [SMTP:] > > > > Sent: Friday, May 02, 2003 11:24 AM > > > > To: > > > > Subject: Re: [adsp] ADSP 14060 > > > > > > > > Thanks for the reply. > > > > > > > > Well Bhaskar I have already rename the main of > one > > > > C file to some other function. That has > resolved > > > the > > > > conflict. But now I the following error: > > > > > > > > [Error li2007] symbol '___lib_prog_term' > > > > referenced in file 'C:\PROGRAM FILES\ANALOG > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > > could not be resolved > > > > > > > > How to remove this error. > > > > Paul I can use inline assembly to convert the > > > assmebly > > > > > > > > file to C, But what about the main. Will it > create > > > two > > > > > > > > dxe file one for each processor. > > > > Right know it get the above error. So no dxe > is > > > > created. > > > > > > > > Regards > > > > > > > > Liyju > > > > > > > > > > > > > > > > > > > > > > > > --- Bhaskar Das <> > wrote: > > > > > Hey, how do u exepct 2 main enteries under 1 > > > > > project? So first u rename > > > > > either of ur main() by some other func. > name > > > that > > > > > suits u. That should > > > > > resolve the conflict. > > > > > > > > > > > > > > > Bhaskar Das > > > > > > > > > > ----- Original Message ----- > > > > > From: "Liyju Janardhan" <> > > > > > To: <> > > > > > Sent: Friday, May 02, 2003 2:18 PM > > > > > Subject: RE: [adsp] ADSP 14060 > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > I had tried some multiprocessing code > written > > > in > > > > > > assmebly on adsp-14060, which works fine. > > > > > > > > > > > > Lately I have switched to C. I am > encountering > > > few > > > > > > problems. > > > > > > I have two C files (ID1.c and ID2.c) and 1 > asm > > > > > file > > > > > > (shared.asm). > > > > > > I have include above three file to the > same > > > > > project in > > > > > > vdsp++2.0. > > > > > > > > > > > > id1.c=====> > > > > > > #include<stdio.h> > > > > > > > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > > > > > > > main() > > > > > > { > > > > > > printf("%d",arr_id1[0]); > > > > > > > > > > > > while(1); > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > id2.c=====> > > > > > > #include<stdio.h> > > > > > > > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > > > > > > > main() > > > > > > { > > > > > > printf("%d",arr_id2[0]); > > > > > > > > > > > > while(1); > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > shared.asm======> > > > > > > #define N 10 > > > > > > > > > > > > .section/dm seg_share; // source in > external > > > > > SBSRAM > > > > > > .var ext_mem_data[N] = "shared_data.dat"; > > > > > > .global ext_mem_data; > > > > > > > > > > > > > > > > > > On buliding, I get the following error > > > > > > [Error li2523] '_main': Multiply defined > > > symbol. > > > > > > > > > > > > When I rename main function of ID2.c to > some > > > other > > > > > > name I don't get that error. > > > > > > I guess, two C file with main function > cannot > > > be > > > > > added > > > > > > to same project. > > > > > > What is the solution for that? > > > > > > > > > > > > After doing the above thing I get the > > > following > > > > > error: > > > > > > [Error li2007] symbol '___lib_prog_term' > > > > > referenced > > > > > > in file 'C:\PROGRAM FILES\ANALOG > > > > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > > > could > > > > > > not be resolved > > > > > > How to remove this error? > > > > > > > > > > > > Regards > > > > > > > > > > > > Liyju > > > > > > > ______________________________________________ > > > > > > Everything is difficult before it becomes > > > easy. > > > > > > > > > > > > > > > > > > --- "Waldron, Donald M" > > > > > > <> wrote: > > > > > > > ADI's VisualDSP++ works fine with the > the > > > > > Quad-SHARC > > > > > > > AD14060. Keep in mind > > > > > > > the Simulator does not support > > > multiprocessing, > > > > > but > > > > > > > target emulator sessions > > > > > > > support multiprocessor functions nicely. > > > > > > > > > > > > > > My experience has been positive using > > > > > VisualDSP++ > > > > > > > 2.0 with the Summit-ICE > > > > > > > (PCI-based) emulator, although there > were > > > some > > > > > > > startup pains to overcome > > > > > > > (such as defining the DSPs in reverse > order > > > > > using > > > > > > > the JTAG ICE > > > > > > > configurator). > > > > > > > > > > > > > > Don Waldron > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Pinaki Chanda > > > > > [SMTP:] > > > > > > > > Sent: Thursday, May 01, 2003 2:50 AM > > > > > > > > To: > > > > > > > > Subject: [adsp] ADSP 14060 > > > > > > > > > > > > > > > > Hi all, > > > > > > > > I would like to know if the > > > design > > > > > tools > > > > > > > > for ADSP 21060 can be used for ADSP > 14060 > > > > > (14060 > > > > > > > > has 4 ADSP 21060) ? Or I need to go > for > > > > > another > > > > > > > > set of design tools ? > > > > > > > > > > > > > > > > Regards, > > > > > > > > pinaki > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > > > > > > > > > > > > > _____________________________________ > > > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________ > > > > > Scanned and protected by Email scanner > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > _____________________________________ > > > > /groups.php3 > > > > > > > > > > > > > > > > > > > > > > __________________________________ > > > > _____________________________________ > > /groups.php3 > > > > > > > > > > _____________________________________ > /groups.php3 __________________________________ |
|
|
|
When working with multiple processors, each running a different executable, I found it easier to create a single executable containing code for both processors. By "easier," I mean from a development/build/maintenance standpoint. It's easy to get confused when building and loading a bunch of different executables. Load the same executable onto all the processors. Inside the main(), a switch statement determines which processor it is running on, then executes the appropriate entrypoint to the actual code. You can put a "processor ID" value in non-volatile memory. --- "Waldron, Donald M" <> wrote: > Liyju, > > What you need is a main for both .dxe's. Use the LDF file to specify which > main() function .doj's gets loaded into what processor. See Analog Device's > "Linker and Utilities Manual" especially the section "Linking for > Multiprocessor and Shared Memory". > > I have four processors, and elected to not use a shared memory image. > Instead, I used the LINK_AGAINST macro, and linked each DSP against all > others (this allws globals to be shared between processors). I've read > VisualDSP++ 3.0 provides an LDF wizard, but I was able to do everything with > VisualDSP++ 2.0. > > Keep in mind, the Simulator only supports one .dse at a time. You can load > ps1.dxe or ps2.dxe, but not both at the same time. > > Don Waldron > > > -----Original Message----- > > From: Liyju Janardhan [SMTP:] > > Sent: Saturday, May 03, 2003 8:16 AM > > To: > > Subject: RE: [adsp] ADSP 14060 -- Multiprocessing using C > > > > Thanks Don, including 060_hdr.doj to the objects in > > ldf file solved the problem. > > > > Now on buliding it create two dxe files ID1.dxe and > > ID2.dxe which get loaded to p0 and p1 processor > > respectively. > > > > But, on excuting code on simulator (cntrl F11) it only > > > > steps through ID1.c, the code in p1(ID2.c) dosen't > > run. > > > > That's because it doen't have a main function. > > > > The code is as given below: > > > > ID1.c======> > > #include<stdio.h> > > > > int arr_id1[3] = {1,2,3}; > > extern int arr_id2[3]; > > extern void man(); > > > > main() > > { > > printf("%d",arr_id2[0]); > > > > while(1); > > > > } > > > > ID2.c======> > > #include<stdio.h> > > > > int arr_id2[3] = {12,23,35}; > > extern int arr_id1[3]; > > > > void man() > > { > > printf("%d",arr_id1[0]); > > > > while(1); > > > > } > > > > > > As soon as the processors boot P0 will start executing > > > > the code because it has main function. > > How to make P1 execute its code. > > Is there any direct solution to it? > > > > The other way round is to issue an VIRPT interrupt by > > writing the address of man() to the VIRPT register of > > P1. > > So when the processor P0 write to the VIRPT > > register of P1, P1 gets an interrupt and will execute > > the void man() function. > > > > Correct me if I am wrong. > > > > But the point is how to get the address of man() > > fuction. > > Functions like interrupt(SIG_XXX,man) write the > > address of isr to the interrupt vector address. > > > > How can use this? > > > > Thanks again Bhaskar,Paul, Don for the reply. > > > > Regards > > > > Liyju > > > > > > > > > > --- "Waldron, Donald M" > > <> wrote: > > > I believe you need to include 060_hdr.doj in your > > > build (via the LDF file). > > > I think the default LDF file has this. > > > > > > Don Waldron > > > > > > > -----Original Message----- > > > > From: Liyju Janardhan [SMTP:] > > > > Sent: Friday, May 02, 2003 11:24 AM > > > > To: > > > > Subject: Re: [adsp] ADSP 14060 > > > > > > > > Thanks for the reply. > > > > > > > > Well Bhaskar I have already rename the main of one > > > > C file to some other function. That has resolved > > > the > > > > conflict. But now I the following error: > > > > > > > > [Error li2007] symbol '___lib_prog_term' > > > > referenced in file 'C:\PROGRAM FILES\ANALOG > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > > could not be resolved > > > > > > > > How to remove this error. > > > > Paul I can use inline assembly to convert the > > > assmebly > > > > > > > > file to C, But what about the main. Will it create > > > two > > > > > > > > dxe file one for each processor. > > > > Right know it get the above error. So no dxe is > > > > created. > > > > > > > > Regards > > > > > > > > Liyju > > > > > > > > > > > > > > > > > > > > > > > > --- Bhaskar Das <> wrote: > > > > > Hey, how do u exepct 2 main enteries under 1 > > > > > project? So first u rename > > > > > either of ur main() by some other func. name > > > that > > > > > suits u. That should > > > > > resolve the conflict. > > > > > > > > > > > > > > > Bhaskar Das > > > > > > > > > > ----- Original Message ----- > > > > > From: "Liyju Janardhan" <> > > > > > To: <> > > > > > Sent: Friday, May 02, 2003 2:18 PM > > > > > Subject: RE: [adsp] ADSP 14060 > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > I had tried some multiprocessing code written > > > in > > > > > > assmebly on adsp-14060, which works fine. > > > > > > > > > > > > Lately I have switched to C. I am encountering > > > few > > > > > > problems. > > > > > > I have two C files (ID1.c and ID2.c) and 1 asm > > > > > file > > > > > > (shared.asm). > > > > > > I have include above three file to the same > > > > > project in > > > > > > vdsp++2.0. > > > > > > > > > > > > id1.c=====> > > > > > > #include<stdio.h> > > > > > > > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > > > > > > > main() > > > > > > { > > > > > > printf("%d",arr_id1[0]); > > > > > > > > > > > > while(1); > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > id2.c=====> > > > > > > #include<stdio.h> > > > > > > > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > > > > > > > main() > > > > > > { > === message truncated === ===== __________________________________ |
|
|
|
--On Monday, May 05, 2003 8:36 AM -0700 Liyju Janardhan <> wrote: > I have tried that, but the variable's defined in one C > file cannot be called on other using extern keywords. This is to be expected. You really have two binaries running on two completely separate CPU's with different address spaces. If you want a variable to be visible to both, you either put it in external memory where both CPU's see it at the same address, or you put it in one processor's internal memory and the other processor will see it in its multiprocessor memory space, clearly a different address. (If the variable is multi-word, you also have all the problems of concurrent access that require locking or other MP mechanisms to get a coherent view of the variable.) So you need two builds, and both builds need to have machinery to identify their view of the common variable. |
|
Hi all, Thanks for your replies. Running the single executable for all processor is a good solution for the multiple main() error. But what about inter-processor communication. There won't be any variable local to a particular processor. So all the variable defined will belong to the bus master. How can a salve access these variable. I didn't get what you mean by putting the processorID value in non-volatile memory. I am reading the processor id this way: int sys,pro_id; ...... sys = getIOP(SYSTAT); pro_id = getID(sys); Though the above code will be running in all the proccesors, pro_id will contain the id of the bus master, I guess. So, How can I determine that this particular code is running on processor 2, and execute a routine specific to processor 2 using switch/case.(because pro_id will contain id of bus master) If I use two different build and create two differnet dxe's, how to call a variable of one code in other code, using C. In assembly it is possible. Refer ffton2pe example in C:\Program Files\Analog Devices\VisualDSP\21k\Examples\ASM_Examples\FFTON2PE But note that all the asm files are there in same build. I can't put all the C files in same bulid because it gives multiple main() error. Please help Regards Liyju --- "R. Yu" <> wrote: > > When working with multiple processors, each running > a different executable, I found it easier to create > a > single executable containing code for both > processors. > By "easier," I mean from a > development/build/maintenance > standpoint. It's easy to get confused when building > and loading a bunch of different executables. > > Load the same executable onto all the processors. > Inside the main(), a switch statement determines > which > processor it is running on, then executes the > appropriate > entrypoint to the actual code. > > You can put a "processor ID" value in non-volatile > memory. > --- "Waldron, Donald M" > <> wrote: > > Liyju, > > > > What you need is a main for both .dxe's. Use the > LDF file to specify which > > main() function .doj's gets loaded into what > processor. See Analog Device's > > "Linker and Utilities Manual" especially the > section "Linking for > > Multiprocessor and Shared Memory". > > > > I have four processors, and elected to not use a > shared memory image. > > Instead, I used the LINK_AGAINST macro, and linked > each DSP against all > > others (this allws globals to be shared between > processors). I've read > > VisualDSP++ 3.0 provides an LDF wizard, but I was > able to do everything with > > VisualDSP++ 2.0. > > > > Keep in mind, the Simulator only supports one .dse > at a time. You can load > > ps1.dxe or ps2.dxe, but not both at the same time. > > > > Don Waldron > > > > > -----Original Message----- > > > From: Liyju Janardhan [SMTP:] > > > Sent: Saturday, May 03, 2003 8:16 AM > > > To: > > > Subject: RE: [adsp] ADSP 14060 -- > Multiprocessing using C > > > > > > Thanks Don, including 060_hdr.doj to the objects > in > > > ldf file solved the problem. > > > > > > Now on buliding it create two dxe files ID1.dxe > and > > > ID2.dxe which get loaded to p0 and p1 processor > > > respectively. > > > > > > But, on excuting code on simulator (cntrl F11) > it only > > > > > > steps through ID1.c, the code in p1(ID2.c) > dosen't > > > run. > > > > > > That's because it doen't have a main function. > > > > > > The code is as given below: > > > > > > ID1.c======> > > > #include<stdio.h> > > > > > > int arr_id1[3] = {1,2,3}; > > > extern int arr_id2[3]; > > > extern void man(); > > > > > > main() > > > { > > > printf("%d",arr_id2[0]); > > > > > > while(1); > > > > > > } > > > > > > ID2.c======> > > > #include<stdio.h> > > > > > > int arr_id2[3] = {12,23,35}; > > > extern int arr_id1[3]; > > > > > > void man() > > > { > > > printf("%d",arr_id1[0]); > > > > > > while(1); > > > > > > } > > > > > > > > > As soon as the processors boot P0 will start > executing > > > > > > the code because it has main function. > > > How to make P1 execute its code. > > > Is there any direct solution to it? > > > > > > The other way round is to issue an VIRPT > interrupt by > > > writing the address of man() to the VIRPT > register of > > > P1. > > > So when the processor P0 write to the VIRPT > > > register of P1, P1 gets an interrupt and will > execute > > > the void man() function. > > > > > > Correct me if I am wrong. > > > > > > But the point is how to get the address of man() > > > fuction. > > > Functions like interrupt(SIG_XXX,man) write the > > > address of isr to the interrupt vector address. > > > > > > How can use this? > > > > > > Thanks again Bhaskar,Paul, Don for the reply. > > > > > > Regards > > > > > > Liyju > > > > > > > > > > > > > > > --- "Waldron, Donald M" > > > <> wrote: > > > > I believe you need to include 060_hdr.doj in > your > > > > build (via the LDF file). > > > > I think the default LDF file has this. > > > > > > > > Don Waldron > > > > > > > > > -----Original Message----- > > > > > From: Liyju Janardhan > [SMTP:] > > > > > Sent: Friday, May 02, 2003 11:24 AM > > > > > To: > > > > > Subject: Re: [adsp] ADSP 14060 > > > > > > > > > > Thanks for the reply. > > > > > > > > > > Well Bhaskar I have already rename the main > of one > > > > > C file to some other function. That has > resolved > > > > the > > > > > conflict. But now I the following error: > > > > > > > > > > [Error li2007] symbol '___lib_prog_term' > > > > > referenced in file 'C:\PROGRAM FILES\ANALOG > > > > > > DEVICES\VISUALDSP\21K\LIB\LIBC.DLB(EXIT.DOJ)' > > > > > could not be resolved > > > > > > > > > > How to remove this error. > > > > > Paul I can use inline assembly to convert > the > > > > assmebly > > > > > > > > > > file to C, But what about the main. Will it > create > > > > two > > > > > > > > > > dxe file one for each processor. > > > > > Right know it get the above error. So no dxe > is > > > > > created. > > > > > > > > > > Regards > > > > > > > > > > Liyju > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Bhaskar Das <> > wrote: > > > > > > Hey, how do u exepct 2 main enteries under > 1 > > > > > > project? So first u rename > > > > > > either of ur main() by some other func. > name > > > > that > > > > > > suits u. That should > > > > > > resolve the conflict. > > > > > > > > > > > > > > > > > > Bhaskar Das > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: "Liyju Janardhan" > <> > > > > > > To: <> > > > > > > Sent: Friday, May 02, 2003 2:18 PM > > > > > > Subject: RE: [adsp] ADSP 14060 > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > I had tried some multiprocessing code > written > > > > in > > > > > > > assmebly on adsp-14060, which works > fine. > > > > > > > > > > > > > > Lately I have switched to C. I am > encountering > > > > few > > > > > > > problems. > > > > > > > I have two C files (ID1.c and ID2.c) and > 1 asm > > > > > > file > > > > > > > (shared.asm). > > > > > > > I have include above three file to the > same > > > > > > project in > > > > > > > vdsp++2.0. > > > > > > > > > > > > > > id1.c=====> > > > > > > > #include<stdio.h> > > > > > > > > > > > > > > extern int arr_id1[3] = {1,2,3}; > > > > > > > > > > > > > > main() > > > > > > > { > > > > > > > printf("%d",arr_id1[0]); > > > > > > > > > > > > > > while(1); > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > id2.c=====> > > > > > > > #include<stdio.h> > > > > > > > > > > > > > > extern int arr_id2[3] = {1,2,3}; > > > > > > > > > > > > > > main() > > > > > > > { > > > === message truncated === > ===== > __________________________________ > _____________________________________ > /groups.php3 __________________________________ |
|
On our system, processors had 2 options for sharing data via memory: through a large block of SDRAM, which all processors shared, or through the SHARC's multi-processor interface. I don't remember exactly how the bus master/slave issues affected the architecture, but I do remember that it was necessary to implement a mutex using test-set-lock. The SHARC's instruction set included an instruction which seemed specifically designed for this. Refer to Tanenbaum's book on OSs. As for visibility of variables: if you define your data structure X globally, outside main() etc, then X will be located at the same address on each processor. each processor knows address(X), and can access another processor's X via multi-processor memory at address(X)+offset. This assumes that each processor can identify itself and sadly, I don't remember how this feature was implemented. Unfortunately, I do not have an ADSP system in front of me, and I'm trying to recall from memory how the system worked. hope this help, -Rob --- Liyju Janardhan <> wrote: > Hi all, > Thanks for your replies. > > Running the single executable for all processor is a > good solution for the multiple main() error. > > But what about inter-processor communication. There > won't be any variable local to a particular processor. > > So all the variable defined will belong to the bus > master. How can a salve access these variable. > > I didn't get what you mean by putting the processorID > value in non-volatile memory. > I am reading the processor id this way: > > int sys,pro_id; > ...... > sys = getIOP(SYSTAT); > pro_id = getID(sys); > > Though the above code will be running in all the > proccesors, pro_id will contain the id of the bus > master, I guess. > > So, How can I determine that this particular code is > running on processor 2, and execute a routine specific > > to processor 2 using switch/case.(because pro_id will > contain id of bus master) > > If I use two different build and create two differnet > dxe's, how to call a variable of one code in other > code, using C. > In assembly it is possible. Refer ffton2pe example > in C:\Program Files\Analog > Devices\VisualDSP\21k\Examples\ASM_Examples\FFTON2PE > > But note that all the asm files are there in same > build. I can't put all the C files in same bulid > because it gives multiple main() error. > Please help > > Regards > > Liyju > > > --- "R. Yu" <> wrote: > > > > When working with multiple processors, each running > > a different executable, I found it easier to create > > a > > single executable containing code for both > > processors. > > By "easier," I mean from a > > development/build/maintenance > > standpoint. It's easy to get confused when building > > and loading a bunch of different executables. > > > > Load the same executable onto all the processors. > > Inside the main(), a switch statement determines > > which > > processor it is running on, then executes the > > appropriate > > entrypoint to the actual code. > > > > You can put a "processor ID" value in non-volatile > > memory. > > > > > > --- "Waldron, Donald M" > > <> wrote: > > > Liyju, > > > > > > What you need is a main for both .dxe's. Use the > > LDF file to specify which > > > main() function .doj's gets loaded into what > > processor. See Analog Device's > > > "Linker and Utilities Manual" especially the > > section "Linking for > > > Multiprocessor and Shared Memory". > > > > > > I have four processors, and elected to not use a > > shared memory image. > > > Instead, I used the LINK_AGAINST macro, and linked > > each DSP against all > > > others (this allws globals to be shared between > > processors). I've read > > > VisualDSP++ 3.0 provides an LDF wizard, but I was > > able to do everything with > > > VisualDSP++ 2.0. > > > > > > Keep in mind, the Simulator only supports one .dse > > at a time. You can load > > > ps1.dxe or ps2.dxe, but not both at the same time. > > > > > > Don Waldron > > > > > > > -----Original Message----- > > > > From: Liyju Janardhan [SMTP:] > > > > Sent: Saturday, May 03, 2003 8:16 AM > > > > To: > > > > Subject: RE: [adsp] ADSP 14060 -- > > Multiprocessing using C > > > > > > > > Thanks Don, including 060_hdr.doj to the objects > > in > > > > ldf file solved the problem. > > > > > > > > Now on buliding it create two dxe files ID1.dxe > > and > > > > ID2.dxe which get loaded to p0 and p1 processor > > > > respectively. > > > > > > > > But, on excuting code on simulator (cntrl F11) > > it only > > > > > > > > steps through ID1.c, the code in p1(ID2.c) > > dosen't > > > > run. > > > > > > > > That's because it doen't have a main function. > > > > > > > > The code is as given below: > > > > > > > > ID1.c======> > > > > #include<stdio.h> > > > > > > > > int arr_id1[3] = {1,2,3}; > > > > extern int arr_id2[3]; > > > > extern void man(); > > > > > > > > main() > > > > { > > > > printf("%d",arr_id2[0]); > > > > > > > > while(1); > > > > > > > > } > > > > > > > > ID2.c======> > > > > #include<stdio.h> > > > > > > > > int arr_id2[3] = {12,23,35}; > > > > extern int arr_id1[3]; > > > > > > > > void man() > > > > { > > > > printf("%d",arr_id1[0]); > > > > > > > > while(1); > > > > > > > > } > > > > > > > > > > > > As soon as the processors boot P0 will start > > executing > > > > > > > > the code because it has main function. > > > > How to make P1 execute its code. > > > > Is there any direct solution to it? > > > > > > > > The other way round is to issue an VIRPT > > interrupt by > > > > writing the address of man() to the VIRPT > > register of > > > > P1. > > > > So when the processor P0 write to the VIRPT > > > > register of P1, P1 gets an interrupt and will > > execute > > > > the void man() function. > > > > > > > > Correct me if I am wrong. > > > > > > > > But the point is how to get the address of man() > > > > fuction. > > > > Functions like interrupt(SIG_XXX,man) write the > > > > address of isr to the interrupt vector address. > > > > > > > > How can use this? > > > > > > > > Thanks again Bhaskar,Paul, Don for the reply. > > > > > > > > Regards > > > > > > > > Liyju > > > > > > > > > > > > > > > > > > > > --- "Waldron, Donald M" > > > > <> wrote: > > > > > I believe you need to include 060_hdr.doj in > === message truncated === ===== __________________________________ |
|
Concerning the mutex, and implementing a test-set-lock.... I implemented a semaphore (to protect shared resources accessed via multiple DSPs) using the example in the ADSP-2106x SHARC User's Manual pp 7-30, 7-31. I became aware of two documentation erratas for the code in the users manual (reference numbers 4558 and 3931, available from Analog Device's Web site). After changing the code per the erratas I was able to get the semaphore working correctly. To access global data on another DSP, this DSP's .dxe must be linked against the other DSP's .dxe, via the LINK_AGAINST feature in the linker descriptor (.ldf) file. See the Linker User's Manual for details. Here's an example of DSP_A's LINK_AGAINST construct... LINK_AGAINST( DSP_B.DXE, DSP_C.DXE, DSP_D.DXE ) This is faster than storing global data in external SRAM, but if speed isn't an issue, and space is, globals can also be stored in external SRAM. You must define a memory segment in the external SRAM space (again, see the Linker Users manual). The linker is smart enough to know to not add the DSP multiprocessor memory offsets. Also defined in the LDF file is the multiprocessor offsets, so when a DSP accesses another DSPs memory, it adds this offset (see the MPMEMORY construct, also in the Linker Users manual). MPMEMORY { DSP_A { START (0x080000) } DSP_B { START (0x100000) } DSP_C { START (0x180000) } DSP_D { START (0x200000) } } Each processor identifies itself on the AD14060 via the ID bits in the SYSTAT register (the AD14060 has DSP_A wired as ID=1, DSP_B ID=2 and so on). Alternatively, you could define each DSP to have it's own object (.doj) files in the LDF file and code each DSP uniquely. Hope this helps! Don Waldron There is truth, peace, eternal life! - found in Jesus Christ! > -----Original Message----- > From: R. Yu [SMTP:] > Sent: Wednesday, May 07, 2003 1:58 PM > To: Liyju Janardhan; > Subject: RE: [adsp] ADSP 14060 -- Multiprocessing using C > On our system, processors had 2 options for sharing > data via memory: through a large block of SDRAM, which > all processors shared, or through the SHARC's > multi-processor interface. I don't remember exactly > how the bus master/slave issues affected the architecture, > but I do remember that it was necessary to implement > a mutex using test-set-lock. The SHARC's instruction > set included an instruction which seemed specifically > designed for this. Refer to Tanenbaum's book on > OSs. > > As for visibility of variables: if you define your > data structure X globally, outside main() etc, then > X will be located at the same address on each processor. > each processor knows address(X), and can access > another processor's X via multi-processor memory > at address(X)+offset. > > This assumes that each processor can identify itself > and sadly, I don't remember how this feature was > implemented. > > Unfortunately, I do not have an ADSP system in > front of me, and I'm trying to recall from memory > how the system worked. > > hope this help, > -Rob > > --- Liyju Janardhan <> wrote: > > Hi all, > > Thanks for your replies. > > > > Running the single executable for all processor is a > > good solution for the multiple main() error. > > > > But what about inter-processor communication. There > > won't be any variable local to a particular processor. > > > > So all the variable defined will belong to the bus > > master. How can a salve access these variable. > > > > I didn't get what you mean by putting the processorID > > value in non-volatile memory. > > I am reading the processor id this way: > > > > int sys,pro_id; > > ...... > > sys = getIOP(SYSTAT); > > pro_id = getID(sys); > > > > Though the above code will be running in all the > > proccesors, pro_id will contain the id of the bus > > master, I guess. > > > > So, How can I determine that this particular code is > > running on processor 2, and execute a routine specific > > > > to processor 2 using switch/case.(because pro_id will > > contain id of bus master) > > > > If I use two different build and create two differnet > > dxe's, how to call a variable of one code in other > > code, using C. > > In assembly it is possible. Refer ffton2pe example > > in C:\Program Files\Analog > > Devices\VisualDSP\21k\Examples\ASM_Examples\FFTON2PE > > > > But note that all the asm files are there in same > > build. I can't put all the C files in same bulid > > because it gives multiple main() error. > > > > > > Please help > > > > Regards > > > > Liyju > > > > > > > > > > > > > > > > --- "R. Yu" <> wrote: > > > > > > When working with multiple processors, each running > > > a different executable, I found it easier to create > > > a > > > single executable containing code for both > > > processors. > > > By "easier," I mean from a > > > development/build/maintenance > > > standpoint. It's easy to get confused when building > > > and loading a bunch of different executables. > > > > > > Load the same executable onto all the processors. > > > Inside the main(), a switch statement determines > > > which > > > processor it is running on, then executes the > > > appropriate > > > entrypoint to the actual code. > > > > > > You can put a "processor ID" value in non-volatile > > > memory. > > > > > > > > > --- "Waldron, Donald M" > > > <> wrote: > > > > Liyju, > > > > > > > > What you need is a main for both .dxe's. Use the > > > LDF file to specify which > > > > main() function .doj's gets loaded into what > > > processor. See Analog Device's > > > > "Linker and Utilities Manual" especially the > > > section "Linking for > > > > Multiprocessor and Shared Memory". > > > > > > > > I have four processors, and elected to not use a > > > shared memory image. > > > > Instead, I used the LINK_AGAINST macro, and linked > > > each DSP against all > > > > others (this allws globals to be shared between > > > processors). I've read > > > > VisualDSP++ 3.0 provides an LDF wizard, but I was > > > able to do everything with > > > > VisualDSP++ 2.0. > > > > > > > > Keep in mind, the Simulator only supports one .dse > > > at a time. You can load > > > > ps1.dxe or ps2.dxe, but not both at the same time. > > > > > > > > Don Waldron > > > > > > > > > -----Original Message----- > > > > > From: Liyju Janardhan [SMTP:] > > > > > Sent: Saturday, May 03, 2003 8:16 AM > > > > > To: > > > > > Subject: RE: [adsp] ADSP 14060 -- > > > Multiprocessing using C > > > > > > > > > > Thanks Don, including 060_hdr.doj to the objects > > > in > > > > > ldf file solved the problem. > > > > > > > > > > Now on buliding it create two dxe files ID1.dxe > > > and > > > > > ID2.dxe which get loaded to p0 and p1 processor > > > > > respectively. > > > > > > > > > > But, on excuting code on simulator (cnt |