/*____________________main routine____________________*/
.SEGMENT/PM
pm_code;
start:
bit set mode2 FLG0O; /* Set Flag0 for output
bit clr astat FLG0;
/* if this SHARC is the original master
r0=dm(SYSTAT);
r0=FEXT r0 BY 8:3;
r1=orig_master_id;
r1=r0-r1;
/* Test if this SHARC is original
if eq jump start_as_master;
r1=orig_slave_id;
r1=r0-r1;
/* Test if this SHARC is original
if eq jump start_as_slave; /* slave and jump appropriately
idle;
nop;
/*_______________Start of Original Master Routine_______________________*/
start_as_master:
bit set astat FLG0;
r0=source_1;
dm(II5)=r0; /* Set DMA tx index to start of source buffer
r0=1;
dm(IM5)=r0; /* Set DMA modify (stride) to 1
r0=@source_1;
dm(C5)=r0;
/* Set DMA count to length of data buffer */
Listing 9.3 Link Token Passing Example (continues)
www.BDTIC.com/ADI
Link Ports
/* Clear Flag0 for use as flag to test
/* Extract Processor ID from SYSTAT
/* master and jump appropriately */
/* Set Flag0 to signify original master
9
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
9 – 33
Need help?
Do you have a question about the ADSP-2106x SHARC and is the answer not in the manual?
Questions and answers