欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOCX文档下载  

    C66x CorePac用户指南 中文版.docx

    • 资源ID:4883315       资源大小:306.59KB        全文页数:18页
    • 资源格式: DOCX        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    C66x CorePac用户指南 中文版.docx

    C66x CorePac User s Guide概述中断控制器:DSPC66X提供了两种类型的信号同步服务:中断;异常;中断由于外部或者内部的硬件信号而提供使正常程序流重新定向的方法。异常也是如此,也通过重新定向程序流。但是异常通常和系统的错误条件有关。C66X可以接收12种可屏蔽/配己置中断,一种可屏蔽异常,和一种不可屏 蔽中断/异常。DSP也可以响应各种内部异常情况这些在C66X CPU和指令 集参考指南中都有记录。因为它们全都包含在DSP内部。C66X内核包括一个中断控制器,允许多达128个和DSP中断/异常有 关的系统事件。这128个系统事件可以直接连接到可屏蔽中断,或者组合 起来作为中断或者异常。这些不同的路由选择允许的事件具有很大的灵活 性处理。在DSP中一个中断被标记,则一个错误事件也被标记,这时该中断的 标志就会被挂起。除了路由事件以外,当CPU丢失了一个中断,中断控 制器也会检测。在CPU丢失一个实时事件时,可以利用这个错误事件去 通知CPU。中断控制器的硬件设备会在一个寄存器中保存丢失中断的编号 以纠正CPU的行为。二、C66X内核中断控制器的目的C66X提供了大量的西永事件。中断控制器提供了一种方法选择必要的事 件,并将它们路由到相应的DSP中断和异常输入。虽然可以利用许多这样相同的系统事件去驱动其他外围设备,例如EDMA,但是C66X内核中断控制器是用来专门管理DSP的。三、特点中断控制器将希同事件映射到DSP的中断和异常输入。中断控制器支持 128个系统事件。这128个系统事件作为输入进入中断控制器。它们包含内部产生的事件和 芯片级事件。事件的列表将在9.3节列举。另外,除了这128个事件,中 断控制器寄存器还能够接收不可屏蔽和复位事件,并且直接路由给DSP。 中断控制器从这些事件中输出各种信号到C66X DSP: 个可屏蔽、硬件异常(EXCEP)12个可屏蔽硬件中断(从INT4-INT1)个利用中断或者异常的不可屏蔽信号(NMI)个复位信号(RESET)中断控制器包括以下模块,以方便事件路由到中断和异常。1)中断选择器:路由任何系统事件到12个可屏蔽中断2)事件连接器:减少庞大的事件数目至四种3)异常连接器:让任何系统事件组合在一起作为单一的硬件异常输入四、系统功能图五、术语和定义在本章中特别重要的一条是:1)系统事件:为了通知DSP 一些已经发生的活动或者需要一个响应而 产生的以个内部或者外部的信号。2)中断:中断由于外部或者内部的硬件信号而提供使正常程序 流重新定向的方法。异常和中断类似,他们也重新定位程序流,但是异常通常和系统的错误状态 相关。Table A-l lists the general terms used throughout this document.Table A-1 List of General Terms and DefinitionsTermDefinitionC66xGeneric name for the new C6000 DSP architecture.C66x DSPDesignates the DSP hardware (functional units and registers).C66x CorePacIncludes the C66x DSP plus all the supporting hardware for memory, bandwidth management, interrupt, memory protection, and power-down support.CFGExternal configuration space, includes the memory-mapped registers outside the C66x CorePac.EDCError Detection and Correction.EMCExternal Memory Controller.IDMAInternal DMA. It is a DMA engine that is local to the C66x CorePac. It allows transfer of data between memories local to the C66x CorePac (L1P, L1D, L2) and the external configuration space.L1DGeneric name for the level 1 data memory. This term may refer to the memory itself or the memory controller.L1PGeneric name for the level 1 program memory. This term may refer to the memory itself or the memory controller.L2Generic name for the level 2 memory. Thi s term may refer to the memory itself or the memory controller.MPAXMemory Protection and Address ExtensionMSMCMulticore Shared Memory ControllerXMCExtended Memory ControllerEnd of Table A-1Table B-1 lists the cache-related terms used throughout this document that relate to the C66x memory architecture.Table B-1 List of Cache-Related Terms and Definitions (Part 1 of 4)TermDefinitionAllocationThe process offlndlmg a location In the cache to store newly cached data. This process can intiude evicting data that is presently In the cache to make room for the new data.AssociativityThe number of line frames in each set. This is specified as the number of ways in the cache.Capacity missA cache miss that occdrs because the cache does not have sufficient room to hold the entire working set for a program. Compare with compulsory missand conflict misiCleanA cache line that Invalid and that has not been written to by upper level a of memory or the DSP. The opposite state for a valid cache line Is dirty.CoherenceInformally, a memory system is coherent If any read of a data item returns the most recently written value of that data Item. This Includes accesses by the DSP and the EDMA.Compulsory missSometimes referred to as a first-reference miss. A compulsory miss Isa cachemlss that muit occur because the data has had no prior opportunity to be allocated in the cache. Typically, compuliory misses for particular pieces of data occur on the first access of that data. However, some cases can be considered compulsory even if they are not the first reference to the data. Such cases Include repeated write misses on the same location in a cache that does not write alhcete, and cache misses to non-cacheable locations. Compare with capacity miss and conflict miss.Conflict missA cache miss that occurs due to the limited associativity of a cache, rather than due to capacity constraints. A fully-aociative cache is able to allocate a newly cached line of data anywhere in the cache. Most caches have much more limited associativity (see set-associative cache), and io are restricted In where they may place data. This results In additional cache misses that a more flexible cache would not experience.Direct-mappedA direct-map>ed cache maps each address in the lower-level memory to a single location n the cache. Multiple locations may map to the ame location in the cache. This is Incontrast to a multi-way set-asiociative cacher which selects a place for the data from a set of locations In the cache. A direct-map ped cache can be considered a single-way set-associative cache.DirtyIn a writebackcacher writes that reach a given level in the memory hierarchy may update that level, but not the levels below it Thus, when a cache line is valid and contains updates that have not been sent to the next lower llevel, that llneis said to be dirty. The opposite state fora valid cache line Is clean.DMADirect Memory Access. Typically, a DMA operation copies a block of memory from one range of addresses to another, or transfers data between a peripheral and memory. On the C66x DSP, DMA transfers are performed by the enhanced DMA (EDMA) engine. These DMA transfers occur in parallel to program execution. From a cache coherence standpoint EDM A accesses can be considered accesses by a parallel procesior六、中断控制器的结构中断控制器设计来提供对系统事件的灵活的管理。这个功能是通过列出的 这一组寄存器实现的。这些寄存器在本章中具有涉及。在第9.5节中有详 细的说明。Table 9-1 Interrupt Controller RegistersRegisterDescriptionTypeEVTFLAG 3:0Event Flag Registers事件标志寄存器StatusEVTCLR 3:0Event Clear Registers事件清理寄存器CommandEVTSET 3:0Event Set Registers事件设置寄存器CommandEVTMASK 3:0Event Mask RegistersControlMEVTFLAG 3:0Masked Event Flag RegistersStatusEXPMASK 3:0Exception Mask RegistersControlMEXPFLAG 3:0Masked Exception Flag RegistersStatusINTMUX 3:1Interrupt Mux RegistersControlAEGMUX1:0Advanced Event Generator Mux RegistersControlINTXSTATInterrupt Exception Status RegisterStatusINTXCLRInterrupt Exception Clear RegisterCommandINTDMASKDropped Interrupt Mask RegisterControl1)事件寄存器中断控制器包含一系列寄存器以管理由控制器收到的系统事件的状态。寄存器可按以下分租:1)事件标志寄存器(EVTFLAAGx)2)清理标志寄存器(EVTCLRx)3)设置标志寄存器(EVTSETx)事件标志寄存器捕捉所有被控制器接收到的系统事件。共有四个32 位寄存器覆盖124个系统事件输入。每个系统事件都会被映射到其中 一个事件标志寄存器的一个特殊标志位(EFXX)上。通用的系统事件标志位结构如下图所示:Figure 9-2Event Flag Register Structure31302928272625242322212019181716EFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFR-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-01514131211109876543210EFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFR-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0Legend: R = Read only; W = Write only; -n = value after reset; -xf value is indeterminate see the device-specific data manual所有的124个系统事件都被独立地映射到四个32位EVTFLAGx寄存器 的一位上。这就使得EVTFLAG0 (EF03:EF00)的至少四位和系统事件没有 关联。这四位始终保持为0.也就是说这些地址域是没有相应的系统事件输入 的。相反,如图所示,和通过事件连接器内部产生(被送到中断控制器)的 事件00到事件03的系统事件被路由到中断选择器,事件标志(EFxx)是锁定寄存器位,在任何事件被接收时保留值1.事件标志 寄存器是只读的,并且必须被只写的事件清理寄存器EVTCLR清理。利用事件清理寄存器清理事件标志寄存器。有一个32位事件清理寄存器。 这些寄存器的地地址域和事件标志寄存器的地址域是一一映射的。Writing a 1 to a specific field in an event clear register causes the corresponding event flag register field to clear.事件清理寄存器EVTCLR的结构如图所示。Figure 9-3 Event Clear Register Structure31302928272625242322212019181716ECECECECECECECECECECECECECECECECW-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-01514131211109876543210ECECECECECECECECECECECECECECECECW-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0Legend: R = Read only; W = Write only; -n = value after reset; -x, value is indeterminate see the device-specific data manual事件设置寄存器在概念上类似于事件清除寄存器。利用该寄存器可以 手动的设置事件标志寄存器的任意位(例如:可利用事件组寄存器测 试中断服务程序时产生中断)。总共有四个32位的事件设置寄存器, 其地址域是和事件标志寄存器一一映射的。在事件设置寄存器写1到 一个特殊的位会使事件标志寄存器相应的位置1.事件设置寄存器的结构如图所示。Figure 9-4 Event Set Register Structure31302928272625242322212019181716ESESESESESESESESESESESESESESESESW-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-015114131211109876543210ESESESESESESESESESESESESESESESESW-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0W-0Legend: R = Read only; W = Write only? -n = value after resets -xr value is indeterminate see the device-specific data manual中断控制器利用事件清理和事件设置寄存器,不需要直接对事件标志 寄存器进行写入,可以防止潜在的竞争状况,没有这些额外的寄存器, DSP可能在对标志位进行读-修改-写操作的时候存在其他方面的清理 标志组的隐患。如果在同一个周期内接收到一个新的事件,则清理是由EMT CLRx指定 的,新的事件输入优先作为对丢失事件的额外预防。2. 事件连接器事件连接器允许多个系统事件组合成一个单一事件。合并事件路由到 中断选择器。这使得DSP能够服务所有可能的系统事件,即使DSP只 含有12个可用中断。Fig ure 9-5Eve nt Combin er中断连接器的基本原则是在一个系统事件标志的子集上执行一个OR 运算(如表1所示)。OR运算的结果作为一个新的连接事件。Table 9-2 System Event MappingEVT NumberEventFromDescription0EVT0INT controllerOutput of event com biner far eventa 1 through 31.1EVT1INT controllerOutput of event com biner 1B far events 32 through 63-2EVT2INT controllerOutput of event com biner 2r far events 64 through 95-3EVT3INT controllerOutput of event combinEr 3. for events 96thrcnjgh 127.时Available evenEjs.9Reserved10Available events.11-12Reserved13IDMAINT0EMCIDMA channel 0 interrupt14IDMAINT1EMC1 DM A channel 1 interrupt15-95Available events.96INTERRINT cantrollerDropped DSP interrupt evenE97EMCJDWAEREEMCInvalid! IDMA parameters9SReserved99AvailablE events.100101Reserved102*109Available evEnts.110MDMAERREVTL2MDMA bus error event111Reserved112Available events.113LI P.EDLIPSingle bit error detected during DMA read114*115Available events.11CRED1L2CoiTECtedl bit error detected117L2.ED2L2Uncorrected bit error detected116PDC.INTPDCPDC sleep irtermpE119SYS.MPASYSDSP mEmory proterdon fault120L1PJZMPAL1IPDSP mEmory proterdon fault121LIP.DMPALIPDMA mernoiy protEctiDn fauh122LI 口JZMPALIDDSP mEmory protectiDn fault123LI DJDMPALIDDMA memoiy protEction Fault124L2.CMPAL2DSP mEmory pnotecdon fault125L2J3MPAL2DMA mernoiy protEctiDn fauhY26EMC.CMPAEMC5P mEmory pnotection fault127EMC.BUSERREMCCFG bus error event事件连接器将124个系统事件分成四组。第一组包括从事件4到31, 第二组包括从事件32到事件63,第三组包括事件64到事件95,第四 组包括事件96到127,在每个组中可以将时间连接组成一个新的组合 事件。这些新的事件被写入EVT0/EVT1/EVT2/EVT3,这些事件会通过最初 的124个系统事件作为一个128个事件的整体组合路由到中断选择器。 每个组合都有一个事件屏蔽寄存器。事件屏蔽寄存器的通常结构如下Figure 96Event Mssk Register Structure2524232221201918171611130292a272&EMEMEiMEMEMEiMEMEMEMEMEMEMEMEMEMEMR/W-0R/WOR/WOR/W-0RAVOR/WOR/W-0R/W-QR/W-0R/W-0R/W-0R/W-0R/W-0R/W-0R/W-0R/W-0IS14131211109876S432110EMEMEiMEiMEiMEiMEMEMEMEMEMEMEMEMEMR/W-0R/W-0 R/WO R/W-0 RAV-0 R/W-0 R/W-Q R/W-Q R/W-Q R/W-0R/W-0R/W-0R/W-0 R/W-0R/W-0 R/W-0Legend: R = Read only; W = Write only; f = value after reset -x, value is indeterminate see the devicespecific data nianual事件屏蔽寄存器中的事件屏蔽位的作用是启用或者屏蔽接收到的系统 事件使之组合在一起。该寄存器默认为0.因此所有的系统事件均是未 屏蔽的且是组合在一起的,以形成相互关联的EVTx。如果要屏蔽一个 事件源,相应的屏蔽位必须置1.注意时间0到3的事件屏蔽位是被保 留的,并且总是被屏蔽的。Example 9-1 Event MaskI As sume an application requires the event b 124-127 to be combined aIn order to accomplish thib, EVTMASK3 will need to be programmed ms follows EVTMASK3 = 00001111111111111111111111111111End of Example 9-1除了基于可编程事件产生一个组合输出活动,事件组合器提供事件标 志寄存器的屏蔽视图。事件组合寄存器的结构示于图9-7。Figure 9-7 32-Masked Event Flag Register Structure31302928272625242322212019181716MEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFR-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-01511413112111109876543210MEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFMEFR-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0R-0Legend: R = Read only; W = Write only; -o = value after reset; -xr value is indeterminate see the device-specific data manual对于在事件屏蔽寄存器中启用的事件,屏蔽事件标志寄存器的内容和 事件标志寄存器的内容是相同的。通过读取屏蔽事件标志寄存器,DSP 仅能够看见事件标志潜在的响应的组合事件(EVT3:0)。在中断服务 程序组合事件中这是有用的。Exam pie 9-2Eve nt F lagAssuming the following configuration: EVTFLAG3 = 0L10101001001L001110001110010101 EVTMASK3 = 00001111111111111111L11L1LL11LL1The Masked Event Flag register 3 will be: MEVTFLAG3 - 01100000000000000000000 DOO 000000End of Example 9-2在处理一个组合中断的时候,你必须:1)阅读MEVTFLAGxJ寄存器相应的组合事件EVTx。2)检查第一个待处理(即标记事件)3)将MEVTFLAGx值写到EVTCLRx寄存器4)在步骤2中处理该事件5)重复步骤1到4直到MEVTFLAGX寄存器为0.此过程只评估并清除相结合的EVTx的事件。此外,任何在EVTMASKx 寄存器中被屏蔽的事件不会被清除(它们不需要被清除),即使它们在 EVTFLAGx寄存器中被设置(这样就可以使用它们生成异常)。注意-DSP应重复步骤1至步骤4,直到没有未处理的事件被发现 之前。在中断服务程序中返回。这确保了任何在中断服务程序中接收 到的事件被捕获(如果在同一时间接收到事件EVTx,在EVTCLRy寄存 器中其标志是清除的,那么它就不会清除)。3. 中断选择器中断选择器的操作DSP有12个可屏蔽中断。中断选择器允许128个系统事件中的任何一个路由到12个DSP中断输入中。如下图所示Fig ure 9-8 Interrupt Selector B lock Diagra mEVTOEVT1EVT126EVT127CPUINT4CPUINT5CPUINT6CPUINT7CPUINT8CPUINT9CPUINT10CPUINT11CPUINT12CPUINT13CPUINT14CPUINT15这128个事件既有事件输入也有事件组合经过事件组合器产生。事件 组合器逻辑具有将多个事件输入分成四个可能的事件输出的能力。接 着这些输出将被输送给中断选择器并被当作额外的系统事件(EVT0到 EVT3)。系统组合器允许除了中断选择器以外的中断路由方式。在INTC模块的 这种灵活性使得大量系统中断可以在C66x CorePac内提供服务。它也 允许大量的中断到DSP内同时提供服务,从而提高中断效率。C66X内 核事件。中断选择器包含中断复用寄存器。INTMUX3:1允许调用12个DSP可 用中断中的任何一个。每个事件都在中断寄存器中列出,并且都有一 个事件数目,用以运行这些寄存器。DSP中断的顺序(从DSPINT4到DSPINT15)决定待处理中断的优先级。 因为任何中断都是原子的(不可嵌套),因此DSP中断优先级只适用于 待处理中断。4. 中断错误事件每当DSP检测到一个中断已经被删除,C66XDSP利用中断控制器能够 产生一个系统事件(EVT96)。当相关的DSP中断标志位已经设置好, DSP中断已经接收到,则该事件就会产生。错误事件可能预示着在代 码中可能出现的问题。例如是否长期停用中断或者不可中断代码段是 否太长。由于中断下降检测逻辑存在于DSP中,故只有来源于单一系 统事件的中断才能被检测。组合事件仅能指示在造成这个错误的组内 的一个或者多个中断。当DSP检测下降错误条件时它将信息传回到中断控制器的中断/异常 状态寄存器。该寄存器记录了下降中断数目以及声称一个系统事件。 以下方框图展示了和异常产生有关的信号:INTERR事件是从中断控制器输出的,并在内部路由回到系统事件96.由于INTXERR只能容纳一个下降 DSP ID。异常状态清理寄存器 (INTXCLR)是由单个的清除位组成的。中断异常状态通过它被清理。在INTXCLR寄存器的CLEAR区域写入1可以重置INTXSTAT寄存器至0.在被硬件清理之后,一个新的IDROP事件才能够被检测到。当处理一个下降中断错误事件时,其处理流程是:1)读取INTXSTATE寄存器2)检查错误状态3)通过INTXCLR寄存器清理错误为了防止一个或多个DSP中断产生下降中断错误,通常通过编程下 降中断屏蔽寄存器(INTDMASK)来忽略它们。5. 异常组合器C66X DSP有一个简单的系统极、可屏蔽的、异常的事件输入。这个输入由 EXCEP决定。异常组合器允许多个系统事件组合成单一的异常事件,如下图所示。 这就允许DSP处理所有的可用系统事件,即使只有一个DSP异常输入是可用的。异常组合器允许系统设计者选择一个执行OR运算的系统事件标志的子集, 以决定EXCEP的值。框图显示;了通过异常组合器来控制系统异常的路径。注意:重置和不可屏蔽中断也

    注意事项

    本文(C66x CorePac用户指南 中文版.docx)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开