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.

Architecture

Each of the 64 semaphores is controlled by either reading from or writing to one of the three registers:
SEM_DIRECT, SEM_INDIRECT, or
SEM_QUERY. These three registers form a set and each semaphore is attached to one such set
. The semaphore module
can service requests using one of three methods: the direct request method, the indirect request method, or the combined request method. These three methods provide flexibility to the application to either implement
a polling-based system or
an interrupt-based callback mechanism for acquiring or locking a semaphore. None of the 64 semaphores on the module are mapped to any resource or module on the device. The application can choose to map any of the available semaphores to protect any resource.
There is no support provided by the semaphore module to store the semaphore to resource mapping information. The mapping information must be maintained by the software application.

Software Reset Considerations:

The semaphore module can be reset through software by writing to the reset bit of the
SEM_RST_RUN register. On reset, all semaphores are in ‘FREE’ state and all the errors cleared.

Hardware Reset Considerations:

On reset, all semaphores are in ‘FREE’ state and all the errors cleared.

Interrupt Events and Requests:

The semaphore module can generate an interrupt to any of the cores on the device either to signal semaphore grant or an error. The module generates two sets of interrupts: semaphore grant (SEMINTn) and error (SEMERRn). Each set
has the capability to interrupt any core (0-N) on the device. The SEMINTn interrupt is routed to the interrupt controller (INTC) of each core while the SEMERRn is routed to the respective chip interrupt controller (CIC[n]).

DMA Event Support:

All ‘N’ semaphore grant events (SEMINTn) can be used to trigger a DMA channel.The error events (SEMERRn) may be used to trigger DMA by using the TPCC interrupt controllers (CIC3) in conjunction with the CIC[n].

TI C66x DSP硬件信号量 - 2

时间: 2024-11-06 18:59:54

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

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硬件信号量 - 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 a

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 系统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(指令获取包) 假