CX51 用户手册----MDU_F120伪指令

来源:互联网 发布:淘宝diy u盘 编辑:程序博客网 时间:2024/05/22 08:02

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

MDU_F120 Compiler Directive

Abbreviation

None.

Arguments

None.

Default

Multiply and Accumulate Unit support is disabled.

µVision

Options — Target — Use On—Chip Arithmetic Unit.

Description

The MDU_F120 directive enables support for the Multiple and Accumulate Unit (MAC0) of the Silicon Labs C8051F12x devices. When this directive is specified the compiler uses the MAC to increase the speed of the following operations:

OperationImplementationsigned int mul?C?IMUL_F120 routineunsigned int mul?C?IMUL_F120 routinesigned long mul?C?LMUL_F120 routineunsigned long mul?C?LMUL_F120 routinesigned long shift left?C?LSHL_F120 routineunsigned long shift left?C?LSHL_F120 routinesigned long shift right?C?ULSHR_F120 routineunsigned long shift right?C?SLSHR_F120 routine

 Note

  • The arithmetic unit does not allow reentrant code and cannot be used in multiple threads or the main and interrupt routines at the same time. You may therefore need to disable the MDU unit with NOMOD_F120.
See Also

NOMDU_F120

Example
C51 SAMPLE.C MDU_F120#pragma mdu_f120

 Related Knowledgebase Articles

  • C51: USING MDU_F120 AND MDU_R515 IN µVISION


MDU_F120 编译器伪指令

缩写

无。

参数

无。

缺省

乘加单元支持禁止。

µVision

Options — Target — Use On—Chip Arithmetic Unit.

描述

MDU_F120 伪指令使能支持Silicon Labs C8051F12x 器件的乘加单元(MAC0) 。当指定这个伪指令,编译器使用MAC增加下面操作的速度:

操作实现有符号整型乘?C?IMUL_F120 函数无符号整型乘?C?IMUL_F120 函数有符号长整型乘?C?LMUL_F120 函数符号长整型乘?C?LMUL_F120 函数有符号长整型左移?C?LSHL_F120 函数无符号长整型左移?C?LSHL_F120 函数有符号长整型又移?C?ULSHR_F120 函数符号长整型又移?C?SLSHR_F120 函数

 左移

  • 算术单元不允许重入代码,不能同时用在多线程或主程序以及中断程序中。因此用户需要用NOMOD_F120禁止 MDU 单元。
参考

NOMDU_F120

示例
C51 SAMPLE.C MDU_F120#pragma mdu_f120

 相关知识库标题

  • C51: USING MDU_F120 AND MDU_R515 IN µVISION





原创粉丝点击