TI C66x DSP硬件信号量 - 1

In a multicore environment—where system resources must be shared—it is important to control simultaneous accesses to the available resources. To ensure correct system operation, it is necessary to limit access to
a resource by one—and only one—core at a time; that is, it is necessary to provide mutual exclusion for resources shared across multiple cores.

TI C66x DSP device contains an enhanced Semaphore module(硬件信号量模块) for the management ofshared resources of the CorePacs. The semaphore2 module is accessible
across all the cores on a multicore DSP.Theemaphore enforces atomic accesses to
shared chip-level resources so that the
read-modify-write sequenceis not broken.
The Semaphore block has unique interrupts to each of the CorePacs to identify when that CorePac hasacquired the resource.Semaphore
resources within the module are not tied to specific hardware resources. It is a software requirement to
allocate semaphore resources to the hardware resource(s) to be arbitrated.The Semaphore module supports 3 masters and contains 32 semaphores to be used within the system.

There are two methods of accessing a semaphore resource:

? Direct Access:A
CorePac directly accesses a semaphore resource. If free, the semaphore will be granted. If not,the semaphore is not granted.

? Indirect Access:A
CorePac indirectly accesses a semaphore resource by writing it. Once it is free, an interruptnotifies the CPU that it is available.

The Semaphore2 module supports the following features:

? Provides mutual exclusion for a shared resource

? A maximum of 64 independent semaphores

? Semaphore request methods


Direct request


Indirect request


Combined request

? Endian independent

? Atomic semaphore access

? Lock-out mechanism for used semaphores

? Queued requests for used semaphores

? Semaphores access grant interrupt for queued requests

? Allows the application to check the status of any of the 64 semaphores

? Error detection and interrupts

TI C66x DSP硬件信号量 - 1,布布扣,bubuko.com

时间: 2024-10-13 11:04:33

TI C66x DSP硬件信号量 - 1的相关文章

TI C66x DSP硬件信号量 - 3(Direct Semaphore)

jeecg v3.0入门视频 链接: http://pan.baidu.com/s/1bnrMfiJ密码: 8q0k MiniDao持久层 入门视频 链接: http://pan.baidu.com/s/1eQGc4W6 密码: stst JEECG-OnlineCoding<企业招聘系统> 视频 链接:http://pan.baidu.com/s/1sjHHVM9 密码: os7b JEECG公开课视频 链接: http://pan.baidu.com/s/1pJFeiiJ 密码: cr75

TI C66x DSP硬件信号量 - 4(Semaphore moudle)

我们将以下面的例子介绍const变量和static变量的存放位置: static int val_a = 1; // 初始化的静态变量 int val_b = 2;        // 全局变量 const int val_c = 3;  // const 全局变量 static int val_d;     // 未初始化的静态变量 int val_e;            // 未初始化的全局变量 int main() { static int val_f = 5;  // 初始化的局部静

TI C66x DSP硬件信号量 - 2

The semaphore module can be used as an arbiter to ensure mutual exclusivity when sharing resources over multiple cores in a multicore device. It provides up to 64 independent semaphores that can be acquired and released by the application. Architectu

TI C66x DSP 系统events及其应用 - 5.10(中断控制寄存器)

C66x DSP执行中断的简要流程: 1.使能了全局中断和子中断,如果硬件检测到中断发生,那么CPU就要跳转. 2.软件把CPU内部的A,B类寄存器的值等推入堆栈保存,把当前PC寄存器的值放入IRP/NRP寄存器中以备中断返回能找到当前被打断的位置. 3.CPU的PC指针读出中断向量表的地址,也就是把"ISTP寄存器的ISTB值+子中断向量偏移量"装入PC寄存器,这样就执行跳转. 4.在中断向量表里一般有就用跳转指令,这样就可以跳转到我们用C语言编写的中断服务子程序中.由于我们在一般的

TI C66x DSP 系统events及其应用 - 4.1(Exception Combiner)

我们知道INTC根据128个system event的输入,然后输出下面的信号到INTC所在corePac的CPU: ? One maskable, hardware exception (EXCEP) ? Twelve maskable hardware interrupts (INT4 through INT15) ? One non-maskable signal that you can use as either an interrupt or an exception (NMI) ?

TI C66x DSP 系统events及其应用 - 4.3(Exception handle)

下面介绍下在CPU内部怎么处理exception.根据下图EFR寄存器记录了(首先要使能exception,否侧EFR不能记录,见英文描述)CPU检测到的exception类型,当检测到NMI,NXF位会被置位,当检测到excepton(event4~127 trigger),EXF位会被置位等.在用户模式下,EFR寄存器不可访问,在spervisor模式下,可以通过MVC EFR访问. EXCEP is the maskable external exception input to the

TI C66x DSP 系统events及其应用 - 5.3(Interrupt)

对于TI C66x DSP的每个CPU有INT4~15共12个中断输入.对于中断,event combiner将INTC的输入event 4~127分为4个组(event 0~3为INTC内部使用,如图示为event combiner的四个输出),然后event 0~127作为Interrupt Selector的输入.类似于4.x中的exception,中断也有同样功能的event flag,event mask,masked event flag寄存器. Interrupt Seclctor

TI C66x DSP 系统events及其应用 - 5.8(ISTP)

中断服务表指针ISTP(Interrupt Service Table Pointer)寄存器用于定位中断服务程序的位置,即ISTP指明中断发生后去哪里找要执行的程序,ISTP(其中的ISTB字段)就是指向IST表的寄存器.ISTP中的一个字段ISTB确定IST的地址基数部分:另一个字段HPEINT确定特定的中断并定位特定的取指包在IST中的位置.图6-4所示为ISTP的各字段,表6-2描述了各字段及其如何使用. 下图为ISTP寄存器,bit 0~4必须设置为0,即IST表的起始地址或者说获取包

TI C66x DSP 系统events及其应用 - 5.9(IST重定位)

RESET中断的获取包必须位于0地址处,然后其他中断的获取包可以位于任何256字(1k字节边界)对齐的程序空间.IST的位置由ISTP寄存器中的ISTB字段决定. IST重新定位举例: 1,将IST重新定位到800h: 将地址0h~200h的源IST拷贝到800h~A00h中: 将800h写到ISTP寄存器中: MVK 800h,B2 MVC B2,ISTP 则ISTP = 800h = 1000 0000 0000b 2,ISTP引导CPU重新定位的IST中去顶相应的ISFP(指令获取包) 假