Here are a few guidelines to keep in mind regarding C data types on the C6000?

本文介绍C6000系列DSP处理器的优化方法,包括使用短整型进行乘法运算、利用整型作为计数器及索引、避免混用不同长度的整型变量等。同时,文中还提及了C67x设备的32位浮点运算硬件支持,并指出指针可以覆盖整个C6000内存映射。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


------------------------------------------------------------------------------------------------------------------------------

1. Use short types for integer multiplication. As with most fixed-point DSPs, our ‘C62x devices use a 16x16 integer multiplier. If you specify an int  multiply, a software function in the runtime support library will be called. (Note, the ‘C67x devices do have a 32x32→64-bit multiply instruction, MPYID.)


2. Use int types for counters and indexes. As we examine during the next chapter, all registers and data paths are 32-bits wide.


3. Avoid accidentally mixinglong andintvariables. Many compilers allocate 32-bits for both types, thus some users interchange these types. The ‘C6000 allocates longs at 40-bits to take advantage of 40-bit hardware within the CPU. If you mix types, the compiler may be forced to manage this – which will most likely cost you some performance. Why 40-bits? The extra 8-bits are often used to provide headroom in integer operations. Also,they can act like an 8-bit “carry bit”.


4. On ‘C67x devices, 32-bitfloatoperations are performed in hardware. The ‘C6000 supports IEEE 32-bit floating-point math.


5. The double precision floating-point hardware supports IEEE 64-bit floating-point math.


6. Pointers, at 32-bits, can reach across the entire‘C6000 memory-map.


====================================================================================================


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值