Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSL配置中断和HWI配置中断介绍 Xue Zhengliang

Similar presentations


Presentation on theme: "CSL配置中断和HWI配置中断介绍 Xue Zhengliang"— Presentation transcript:

1 CSL配置中断和HWI配置中断介绍 Xue Zhengliang 2013-05
Alcatel-Lucent PowerPoint Design Guidelines When necessary Portfolio/Program Name can wrap to a second or third line to maintain consistent typographic spec For title slide only, a 5% gray background has been added General specifications Page Setup set to “On Screen” format Update footer to include appropriate “Portfolio/Program Name” Ensure that only one font “Trebuchet” is used throughout. Following pages provide font sizes for text and graphic pages. Ensure all text boxes sit in proper location. Sometimes the automatic PowerPoint settings are not exact Titles on slides, Agenda and Division pages use “Title Case” Text is set predominantly with regular weight. Bold Trebuchet is used to highlight key words or phases When a slide has more text than comfortable fits on the page using standard font sizes, treat this instance as an exemption and reduce the font size of the entire block until it fits For graphic only slides, use as much of the object area as possible to enhance legibility and emphasis Slides with multiple logos should be adjusted so all logos appear visually equal in size and weight Please remove any tinted or light color backgrounds from slides other than Agenda and Division slides Xue Zhengliang

2 内容介绍 1. 中断 CSL配置中断 HWI配置中断 小结 Agenda Pages
1. 中断 CSL配置中断 HWI配置中断 小结 Agenda Pages This page allows for the listing of the sections within a presentation.

3 1 中断 1.1 中断处理的流程图 1.2 中断的一些术语 Divider Section Break Pages
Title block set 28/32pt Trebuchet white, flush left with text box positioned at, Horizontal 1.87” and Vertical 2.87” This slide is to be used to create Section Divider slides Please copy, paste and modify this slide to reflect your specific needs. It is not generated from a Master slide template

4 1.1 中断处理的流程图----中断拓扑结构图 6616为例: 截图来自6616的Data Manual 中断类型1: SPRS624D
不经过CIC,直接进入core的中断,例如92 Primary Events 中断类型2: 经过CIC后,再进入core的中断,例如106 core-only Secondary Events 中断类型1较中断类型2简单,哪些中断属于中断类型1,哪些属于中断类型2?

5 1.1 中断处理的流程图----不经过CIC,直接进入core的中断
进入core0的中断一共有5路: =128(128个中断见Table Data Manual SPRS624D). 这128个中断有个术语描述:System Event 128个中断里与CIC有关的是第2路(8 Broadcast Events from CIC0)和第4路(18 Secondary Events) ,其余的中断都是不经过CIC,直接进入core的中断

6 1.1 中断处理的流程图---- 经过CIC后,再进入core的中断

7 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图
这类中断由interrupt controller(INTC)来处理 当外部中断的数目大于12的时候,才需要用到Event combiner。 interrupt selector用来绑定system event EVT[x]和外部中断号INTy

8 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图

9 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图

10 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图
这类中断是在corepac内部消化的

11 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图
IFR置1后还需要完成的工作(这点66x与64x+是一样的):  IER(相应位置1,并且保证NMIE位置1)  GIE置1 Vector Table:中断向量表,跳转到相应的中断处理函数ISR

12 1.1 中断处理的流程图----不经过CIC,直接进入core的中断处理流程图
要保证进入中断处理函数,要进行如下配置:  IER寄存器中相应位需要置1,并保证NIME位置1  保证CSR寄存器中的GIE位置1  选择一个外部中断向量INTy  定义中断处理函数ISR,并且与相应的外部中断向量INTy进行绑定,这一步相当于配置Vector Table

13 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
几个概念:  CIC or CpIntc  System Interrupt  Host Interrupt  CIC:Chip –level Interrupt Controller(也称作CpIntc)  System Interrupt:CIC的输入  Host Interrupt:CIC的输出

14 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
 System Interrupt有哪些? 以6616的CIC0为例,详见Table Data Manual SPRS624D

15 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
 Host Interrupt有哪些?经过CIC后,再进入core的中断

16 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
 channel mapping

17 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
通过一个例子了解该类型中断的配置: 使用EDMA3 CC1,假设EDMA的中断选择的是EDMA3CC1 GINT,通过Table 7-39,得到System Interrupt为6。  Host Interrupt可以有多种选择,假设选择的Host Interrupt为Table 7-38中的CIC0_OUT(8+16*n)。如果是core0,则n=0, Host Interrupt为8。  Event ID是伴随着CIC0_OUT(8+16*n)而确定的。  CPU Interrupt Vector是自定义的,假设这里选择的是4

18 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图
与不经过CIC,直接进入core的中断相比,这类中断需要增加CIC的输入和输出进行一系列的配置。

19 1.1 中断处理的流程图----经过CIC后,再进入core的中断处理流程图

20 1.2 中断的一些术语 缩写 全称 含义 GEM Generalized Embedded Megamodule
is a module combination of all the cores and memory controlls in which the L1 and L2 reside. c64x用到的术语,类似66x的corepac INTC INTerrupt Controller corepac内的中断控制单元 CpIntc CIC Chip-level Interrupt chip级的中断控制单元

21 2 CSL配置中断 2.1 INTC的配置(Timer,EDMA例子) 2.2 CIC的配置(EDMA例子)
2.3 Timer+EDMA CSL配置的例子 Divider Section Break Pages Title block set 28/32pt Trebuchet white, flush left with text box positioned at, Horizontal 1.87” and Vertical 2.87” This slide is to be used to create Section Divider slides Please copy, paste and modify this slide to reflect your specific needs. It is not generated from a Master slide template

22 2.1 INTC的配置----INTC初始化 该例使用Timer5的高位,intc_init()函数跟外设无关
CSL_intcInit(): This is the initialization function for the INTC.This function initializes the CSL data structures, and doesn't affect the H/W.  CSL_intcGlobalNmiEnable() :NMIE置1  CSL_intcGlobalEnable() :GIE置1

23 2.1 INTC的配置----绑定外部中断向量和中断处理函数
该例使用Timer5的高位,选择外部中断向量为CSL_INTC_VECTID_13,system event ID 查Data manual Table 7-38得到CSL_GEM_TINT5H CSL_intcOpen ():绑定中断向量  CSL_intcPlugEventHandler () :绑定中断处理函数  CSL_intcHwControl() :IER中的相应位置1

24 2.1 INTC的配置----中断处理函数  CSL_intcEventClear():EVTCLR寄存器相应位清0

25 2.2 CIC的配置----INTC配置 这部分跟Timer例子的中断处理类似
 具体有CSL INTC的初始化,NMIE置1,GIE置1,绑定外部中断向量,绑定中断处理函数以及IER相应位置1

26 2.2 CIC的配置----CIC相关寄存器的配置

27 2.2 CIC的配置----CSL函数的分析  CSL_CPINTC_open():opens the CPINTC instance and returns a handle used in all subsequent calls  CSL_CPINTC_disableAllHostInterrupt():disables all the Host Interrupts in the system.  CSL_CPINTC_mapSystemIntrToChannel(): used to map a system interrupt to a specific channel.  CSL_CPINTC_enableSysInterrupt(): enables the system interrupt in the CIC.  CSL_CPINTC_enableHostInterrupt() enables the host interrupt in CIC  CSL_CPINTC_enableAllHostInterrupt() enables all the Host Interrupts in the system.

28 2.2 CIC的配置----中断处理函数 关闭Host Interrupt 清System Interrupt

29 2.3 Timer+EDMA CSL配置的例子----中断配置
intc_config()需要配置EDMA和Timer,这块不知道如何写 cp_intc_config()需要配置EDMA,不需要配置Timer

30 2.3 Timer+EDMA CSL配置的例子----期望得到的结果
该例子期望得到3.3类似的输出结果

31 3 HWI配置中断 3.1 Timer的INTC配置 3.2 EDMA的INTC和CIC配置 3.3 Timer+EDMA的配置
Divider Section Break Pages Title block set 28/32pt Trebuchet white, flush left with text box positioned at, Horizontal 1.87” and Vertical 2.87” This slide is to be used to create Section Divider slides Please copy, paste and modify this slide to reflect your specific needs. It is not generated from a Master slide template

32 3.1 Timer的INTC配置----新建SYS/BIOS类型的工程

33 3.1 Timer的INTC配置----cfg文件新增内容
需要使用的模块: 新建一个task,名称为Timer_Hwi_Task: main函数执行BIOS_start()后,会调用Timer_Hwi_Task

34 3.1 Timer的INTC配置----引入SYS/BIOS需要包含的头文件

35 3.1 Timer的INTC配置----任务Timer_Hwi_Task
NMIE和GIE由SYS/BIOS置1

36 3.1 Timer的INTC配置----Hwi方式与CSL方式的比较

37 3.2 EDMA的INTC和CIC配置----SYS/BIOS工程
cfg文件: main.c:

38 3.2 EDMA的INTC和CIC配置----INTC的配置

39 3.2 EDMA的INTC和CIC配置----CIC的配置

40 3.2 EDMA的INTC和CIC配置----CIC的配置比较

41 3.2 EDMA的INTC和CIC配置----中断处理函数

42 3.3 Timer+EDMA的配置----EDMA部分

43 3.3 Timer+EDMA的配置----Timer部分

44 3.3 Timer+EDMA的配置----中断处理函数
中断处理函数与3.1,3.2部分的相同

45 3.3 Timer+EDMA的配置----输出结果

46 4 小结 4.1 参考文献 4.2 参考程序 4.3 工程说明 Divider Section Break Pages
Title block set 28/32pt Trebuchet white, flush left with text box positioned at, Horizontal 1.87” and Vertical 2.87” This slide is to be used to create Section Divider slides Please copy, paste and modify this slide to reflect your specific needs. It is not generated from a Master slide template

47 4.1 参考文献 1 configuring Interrupts on Keystone Devices----TI wiki 2 TMS320TCI6616 Communications Infrastructure KeyStone SoC----SPRS624D 3 TMS320C66x DSP CPU and Instruction Set Reference Guide---- SPRUGH7 4 TMS320C66x DSP CorePac User Guide---- SPRUGW0B 5 KeyStone Architecture Chip Interrupt Controller (CIC) User Guide---- SPRUGW4A

48 4.2 参考程序 1 Timer: C:\ti\pdk_C6678_1_0_0_20\packages\ti\csl\example\timer timer_test.c 2 EDMA:

49 4.3 工程说明 名称 说明 C6616_edma_int_csl EDMA CSL配置中断 C6616_edma_int_hwi
EDMA Hwi配置中断 C6616_timer_int_csl Timer CSL配置中断 C6616_timer_int_hwi Timer Hwi配置中断 C6616_edma_timer_int_csl EDMA+Timer CSL配置中断 C6616_edma_timer_int_hwi EDMA+Timer Hwi配置中断 以上测试需要在core0上操作

50 END


Download ppt "CSL配置中断和HWI配置中断介绍 Xue Zhengliang"

Similar presentations


Ads by Google