1_1 C6000的体系结构和汇编语言(1)

上传人:油条 文档编号:48609120 上传时间:2018-07-18 格式:PPT 页数:114 大小:1.90MB
返回 下载 相关 举报
1_1 C6000的体系结构和汇编语言(1)_第1页
第1页 / 共114页
1_1 C6000的体系结构和汇编语言(1)_第2页
第2页 / 共114页
1_1 C6000的体系结构和汇编语言(1)_第3页
第3页 / 共114页
1_1 C6000的体系结构和汇编语言(1)_第4页
第4页 / 共114页
1_1 C6000的体系结构和汇编语言(1)_第5页
第5页 / 共114页
点击查看更多>>
资源描述

《1_1 C6000的体系结构和汇编语言(1)》由会员分享,可在线阅读,更多相关《1_1 C6000的体系结构和汇编语言(1)(114页珍藏版)》请在金锄头文库上搜索。

1、C6000 体系结构和汇编语 言1Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002远见品质Why DSP?DSP: DSP: Algorithm drivenAlgorithm drivenWhat kind of What kind of Algorithm? Algorithm? 对大量数据作对大量数据作相同的运算相同的运算 典型典型DSPDSP算法:算法:乘法累加乘法累加 。ForFor循环,循环,20%20%80%80%现象现象DSPDSP就是为了就是为了 缩短这样类型缩短这样类型 的运算的时间的运算的时间

2、 ,DSPDSP是如何是如何 做到的呢?做到的呢?时间上:时间上:压缩压缩空间上:空间上:并行并行单周期指令;单周期指令;硬件乘法器;硬件乘法器;寻址寻址哈佛总线结构;哈佛总线结构;多运算单元;多运算单元;流水线流水线2远见品质vDescribe C6000 CPU architecture.vIntroduce instructions by an exampleLearning Objectives3远见品质General DSP System Block DiagramP P E E R RI IP PHHE E R R A A L L S SCentral Central Proces

3、singProcessingUnit UnitInternal MemoryInternal MemoryInternal BusesInternal BusesExternalExternal MemoryMemory4远见品质C6000 CPU Architecture VLIW, Very Long Instruction wordVLIW, Very Long Instruction word5远见品质对比:TigerShare101 Architecture6远见品质C6201/04/05 片内存储器7远见品质C6701片内存储器8远见品质C64x 片内2级存储器C64的 L1D的存

4、储 体结构:832bit。 (32B)L1D行:64B。 共128组(4K字)9远见品质程序员角度的DSP结构:存储器的层次数据寄存器处理 单元片内存储器片外存储器10远见品质C62xx CPU Core11远见品质C67xx CPU Core12远见品质C64xx CPU Core13远见品质一条C6000的指令和其机器 码uC6000: ADD .D2 B5,B4,B4ADD (.D2 or.D1) src2,src1,dst1u00000010000101001000100001000010u000 0 00100 00101 00100 010000 10000 1 0u(1) (2)

5、 (3) (4) (5) (6) (7)(8)(9)u(1) 条件寄存器: A1,A2,B02; C64添加A0u(2) z,指定条件寄存器的判断条件 u(3) dst,目的u(4) src2,源2u(5) src1, 源1u(6) 操作码:设定唯一指令的码,sint,2个源和目标都为有符 号整数且功能单元为D时的操作码就是010000 ;u(7) 固定值u(8) s,选择A边寄存器还是B边寄存器u(9) p,是否并行 14远见品质对比:8086的ADD指令8086/8088 一条指令长16字节8086 ADD CX,DX CX和DX相加放到CX000000 0 1 11 001 010;寻址

6、方式和立即数,这里没有ADD (1) (2) (3) (4)(5)(1)0 reg为目的,(2)1 字处理(8086的字为16bit), 表示操作的是CX,DX不是 CL,DL。(3)11,寄存器模式,和 001, 010,一起表示是CX和DX(4)CX, (2)(3)和001一起决定是CX(5)DX, (2)(3)和010一起决定是DX 15远见品质Implementation of Sum of Products (SOP) SOP is the key element for SOP is the key element for most DSP algorithms.most DSP

7、algorithms.So lets write the code for So lets write the code for this algorithm and at the this algorithm and at the same time learn the C6000 same time learn the C6000 architecture.architecture.Two basicTwo basicoperations are requiredoperations are requiredfor this algorithm.for this algorithm.(1)

8、 (1) MultiplicationMultiplication(2) (2) Addition Addition Therefore two basicTherefore two basicinstructions are requiredinstructions are requiredY =Y =N N a an nx xn nn = 1n = 1* *= a= a1 1* * x x1 1 + + a a2 2 * * x x2 2+ +. . + + a aN N * *x xN N16远见品质Two basicTwo basicoperations are requiredope

9、rations are requiredfor this algorithm.for this algorithm.(1) (1) MultiplicationMultiplication(2) (2) Addition Addition Therefore two basicTherefore two basicinstructions are requiredinstructions are requiredImplementation of Sum of Products (SOP) Y =Y =N N a an nx xn nn = 1n = 1* *So lets implement

10、 the SOP So lets implement the SOP algorithm!algorithm!The implementation in this The implementation in this module will be done in module will be done in assembly.assembly.= a= a1 1* * x x1 1 + + a a2 2 * * x x2 2+ +. . + + a aN N * *x xN N17远见品质Multiply (MPY)The The multiplicationmultiplication of

11、 of a a1 1by x by x1 1 is done in is done in assembly by the following instruction:assembly by the following instruction:MPYMPYa1, x1, Ya1, x1, YThis instruction is performed by a This instruction is performed by a multiplier unit that is called “.M”multiplier unit that is called “.M”Y =Y =N N a an

12、nx xn nn = 1n = 1* *= a= a1 1* * x x1 1 + + a a2 2 * * x x2 2+ +. . + + a aN N * *x xN N18远见品质Multiply (.M unit). .MMY =Y =4040 a an nx xn nn = 1n = 1* *The . M unit performs multiplications in The . M unit performs multiplications in hardware hardware MPYMPY.M.Ma1, x1, Ya1, x1, YNote: 16-bit by 16-

13、bit multiplier provides a 32-bit result.Note: 16-bit by 16-bit multiplier provides a 32-bit result.32-bit by 32-bit multiplier provides a 64-bit result.32-bit by 32-bit multiplier provides a 64-bit result.19远见品质Addition (.?). .MM.? .?Y =Y =4040 a an nx xn nn = 1n = 1* *MPYMPY.M.Ma1, x1, proda1, x1,

14、prodADDADD.? .?Y, prod, YY, prod, Y20远见品质Add (.L unit). .MM. .L LY =Y =4040 a an nx xn nn = 1n = 1* *MPYMPY.M.Ma1, x1, proda1, x1, prodADDADD.L.LY, prod, YY, prod, YRISC processors such as the C6000 use registers to RISC processors such as the C6000 use registers to hold the operands, so lets change

15、 this code.hold the operands, so lets change this code.21远见品质Register File - AY =Y =4040 a an nx xn nn = 1n = 1* *MPYMPY.M.Ma1, x1, proda1, x1, prodADDADD.L.LY, prod, YY, prod, Y. .MM. .L LA0A0 A1A1 A2A2 A3A3 A4A4A15A15Register File ARegister File A. . . .a1a1 x1x1prodprod32-32-bitsbitsY YLet us cor

16、rect this by replacing a, x, prod and Y by the Let us correct this by replacing a, x, prod and Y by the registers as shown above.registers as shown above.22远见品质Specifying Register NamesY =Y =4040 a an nx xn nn = 1n = 1* *MPYMPY.M.MA0, A1, A3A0, A1, A3ADDADD.L.LA4, A3, A4A4, A3, A4The registers A0, A1

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号