教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 实用模板 >

DSP汇编指令学习笔记(6)

来源:网络收集 时间:2026-01-31
导读: unit = .S1 or .S2 Description A 16-bit signed constant, cst16, is added to the dst register specified. The result is placed in dst. Execution if (cond) cst16 + dst → dst else nop ADDKPC ADDKPC (.uni

unit = .S1 or .S2

Description A 16-bit signed constant, cst16, is added to the dst register specified. The result is

placed in dst.

Execution

if (cond) cst16 + dst → dst else nop

ADDKPC

ADDKPC (.unit) src1, dst, src2

1. 把Src1的值设置到dst中,并NOP src2 个cycle. 2. 即本指令需要src2 + 1个slot才能完成。 3. 这个指令并不是跳转指令,仅仅是同时完成了高低16bit赋值以及NOP控制的一个指

令。如果NOP为0此,则高低16bit赋值仅仅为1个cycle

SWE

SWE Software Exception

Syntax SWE

unit = none

Compatibility C64x+ CPU Description:

Software sprint an exception by this instruction. It will set SXF bit in EFR to 1.

And when it complete, CPU will continue with the instructions specified by NRP register

SWENR no-return SWE

It is the same as SWE, but NRP will be invalid.

21

MV系列

1. MV (.unit) src2, dst:Move From Register to Register AB寄存器之前的MV

2. MVC (.unit) src2, dst:Move Data from AB register to Control register, such as ARM/IRP 3. MVD (.unit) src2, dst:Move From Register to Register, 和MV一样,但是需要3个NOP。 4. MVK (.Unit) src dst 把有符号数的立即数赋值到dst中

5. MVKH (.unit) cst, dst:把立即数的MSB 16bit 赋值到 dst的MSB 16bit 6. MVKLH (.unit) cst, dst:把立即数的LSB 16bit赋值到 dst的MSB 16bit

大小对比操作

1. CMPLT (.unit) src1, src2, dst

a) if (src1 < src2), 1 → dst else else 0 → dst

b) src1是否小于src2,是的话dst=1;否则等0 c)

Delay Slots 0

2. CMPEQ (.unit) src1, src2, dst

a) if (src1 == src2), 1 → dst else else 0 → dst b) Delay Slots 0

逻辑操作系列

AND Src1 Src2 dst:Src1安位与 Src2 结果赋值到dst

Store系列(STDW/)

1. 所有的store指令的delay slot都是0,但是数据真正写入内存的delay slot = 3. 2. 就是说,如果要从内存中直接去看数值的改变需要4个slot后。

3. 但是在第一个slot后,如果代码去Load此地址的值,则能够Load新的值。因为系统

并没有真正的直接从内存中获取,而是半路拦截了正在保存的数据(因为是同一地址),所delay slot为0了。

STB

STB Store Byte to Memory With a 5-Bit Unsigned Constant Offset or Register Offset 存储寄存器的低8bit到内存中。

SIZE = 1B

22

STH

SIZE = 2B

STW

SIZE = 4B

STDW (DW store (8Bytes))

SIZE = 8B

STDW (.unit) src, *+baseR[ucst5] DW store

if (cond) src → mem mem = *BaseR + (ucst5 * 8) 或者

DSP汇编指令学习笔记(6).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/521320.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)