Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
|
hello, I'm beginning with the ADSP 21992, I need to know the utility of the PAGE() operator, I didn't find more details in the ADSP documentation, thanks, Haithem |
|
|
|
Where is this page operator mentioned? For data memory, you have 2 data page registers (DMPG1 for DAG1 and DMPG2 for DAG2). The IO processor also as a page register (IOPG). Tim Dahlin --- In , "haythemsalah" <hsalah@a...> wrote: > hello, > > I'm beginning with the ADSP 21992, > I need to know the utility of the PAGE() operator, > I didn't find more details in the ADSP documentation, > > thanks, > Haithem |
|
Here is an axample found in the ADSP documentation static int globalTable[256] int page; asm("%0 = PAGE(GlobalTable);" : "=e" (page)::); -----Message d'origine----- De : twd2950 [mailto:] Envoyé : mer. 6 août 2003 20:03 À : Objet : [adsp] Re: PAGE operator Where is this page operator mentioned? For data memory, you have 2 data page registers (DMPG1 for DAG1 and DMPG2 for DAG2). The IO processor also as a page register (IOPG). Tim Dahlin --- In , "haythemsalah" <hsalah@a...> wrote: > hello, > > I'm beginning with the ADSP 21992, > I need to know the utility of the PAGE() operator, > I didn't find more details in the ADSP documentation, > > thanks, > Haithem _____________________________________ /groups.php3 |
|
|
|
The "VisualDSP++ 3.0 C/C++ Compiler and Library Manual for ADSP-219x DSPs" covers assembly language contructs on pages 1-64 to 1-68. //Full listing from 1-91 #include <sysreg.h> section("external_memory_section") static int GlobalTable[256]; int main() { int page, read_value, value_to_write = 0; asm("%0 = PAGE(GlobalTable); " : "=e"(page): : ); external_memory_write(page, &GlobalTable[0], value_to_write); read_value = external_memory_read(page, &GlobalTable[1]); return read_value; } The statement ("%0 = PAGE(GlobalTable); " is geting the value of the page at which "GLOBALTABLE" is stored (in this case it is stored within the "external_memory_section" location... which is defined in the linker). The C/C++ macros, external_memory_read and external_memory_write, are needed because the 2191 only has a 16 bit memory pointers. The DMPG1 and DMPG2 registers are used for the upper byte of the address. To answer your previous question, "PAGE()" allows you to get the value of page at which a specific variable is stored. For more information, check out the "VisualDSP++ 3.0 Assembler and Preprocessor Manual for ADSP-218x and ADSP-219x DSPs"..... --- In , "SALAH Haitem" <hsalah@a...> wrote: > > Here is an axample found in the ADSP documentation > > static int globalTable[256] > int page; > asm("%0 = PAGE(GlobalTable);" : "=e" (page)::); > -----Message d'origine----- > De : twd2950 [mailto:twd2950@y...] > Envoyé : mer. 6 août 2003 20:03 > À : > Objet : [adsp] Re: PAGE operator > Where is this page operator mentioned? > > For data memory, you have 2 data page registers (DMPG1 for DAG1 and > DMPG2 for DAG2). The IO processor also as a page register (IOPG). > > Tim Dahlin > > --- In , "haythemsalah" <hsalah@a...> wrote: > > > > > > hello, > > > > I'm beginning with the ADSP 21992, > > I need to know the utility of the PAGE() operator, > > I didn't find more details in the ADSP documentation, > > > > thanks, > > Haithem > > _____________________________________ > /groups.php3 |