📄 utl_loop.s62
字号:
;
; Copyright 2003 by Texas Instruments Incorporated.
; All rights reserved. Property of Texas Instruments Incorporated.
; Restricted rights to use, duplicate or disclose this code are
; granted through contract.
;
; @(#) XDAS 2.51.00 11-29-2003 (xdas-2.50.00.9)
;
;
; ======== utl_loop.s62 ========
; Simulate load on the DSP for the audio example.
;
;
.global _UTL_loop
.text
N .set 1000 ; N must be evenly-divisible by 10
;
; ======== _UTL_loop ========
; This function simulates a load on the DSP by executing N * loopCount
; instructions, where loopCount is the input parameter to UTL_loop().
;
; void UTL_loop(int loopCount)
;
; Actual instruction cycles: 6 + N * (loopCount)
;
; Limitation: The code assumes that loopCount is at most 0xffff, so with
; N=1000 the maximum delay allowed is: 6 + 1000 * 65535 = 65,535,006
; instructions. N can be increased if you need more cycles.
_UTL_loop:
mvk (N/10),b0
mpyu a4,b0,b0
nop 4
loop:
sub b0,1,b0
nop 3
[b0] b loop
nop 5
b b3
nop 5
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -