📄 masterdspb.asm
字号:
//***********************************************************************
// Master code for Host Boot of ADSP-TS201S on an EZ-Kit
// MasterDSPA.asm
//
// This code performs Host Boot of ADSP-TS201S without using any
// quad accesses.
//
// The host uses the LDR file created for a host boot to boot the
// slave with single word accesses to AUTODMA0.
//
//***********************************************************************
//***********************************************************************
#include "defTS201.h"
#include "TSEZKitDef.h"
//***********************************************************************
.section data1;
#if !defined(DEBUG)
.var boot_data[] = {".\Release\bootdata.ldr"}; // boot data
#else
.var boot_data[] = {".\Debug\bootdata.ldr"}; // boot data
#endif
//***********************************************************************
.section reset;
jump _mpmaster (NP);;
//***********************************************************************
.section program;
_mpmaster:
//************************* Init System Registers ***********************
xr0 = SYSCON_MP_WID64 | SYSCON_MEM_WID64 |
SYSCON_MSH_SLOW | SYSCON_MSH_WT3 | SYSCON_MSH_IDLE |
SYSCON_MS1_SLOW | SYSCON_MS1_WT3 | SYSCON_MS1_IDLE |
SYSCON_MS0_SLOW | SYSCON_MS0_WT3 | SYSCON_MS0_IDLE;;
SYSCON = xr0;;
//**************** Delay for the receiver to get ready *******************
LC1 = 100000;;
_wait_loop1:
nop;;
if NLC1E, jump _wait_loop1 (NP);;
//********************** Download LDR to slave *************************
j0 = boot_data;;
LC0 = LENGTH(boot_data);; // write ldr
_wait_dma_start:
xr0 = [j0 += 1];; // read 32-bit word
[j31+(P0_OFFSET_LOC+AUTODMA0_LOC)]=xr0;; // Write to AUTODMA0 of processor ID=2
call delay_more_than_12x_lclkrat_cycles;; // delay the required number of cycles
xr1=[j31+dummy_external_memory];; // read external dummy memory location
xr1=xr1;; // insert dependency before next write
if NLC0E, jump _wait_dma_start (NP);;
//***********************************************************************
_wait:
nop; nop; nop;;
jump _wait (NP);;
//***********************************************************************
delay_more_than_12x_lclkrat_cycles:
xr0 = LCLKRAT;;
xr1 = 6;;
xr0 = r0 * r1 (I);;
k0 = xr0;;
_delay_loop:
k0 = k0 - 1;;
if NKEQ, jump _delay_loop;;
CJMP (ABS)(NP);;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -