深入分析SCU GIC驱动 -1 ZEDBOARD,ZYNQ-7000

Scu gic in depth – 1

Scu unit is a powerful unit to deal with the coherence of L2 and memory ,and contains a general interrupt controller pl390 :

It deal with the following several kinds of interrupt:

  • Private Peripheral interrupt of core 0 and 1: 5x2=10
  • Software generated interrupt: 16x2=32
  • I/O Peripherals interrupt: 44
  • PL logic interrupt: 16

In total , it deal with up to 92 interupts input . however

/*

* The maximum number of interrupts supported by the hardware.

*/

#define XSCUGIC_MAX_NUM_INTR_INPUTS 95

So what is the left 3 interupts?

 

NOTICE:

SCU GIC will depatch 16 kinds of interrupt to programmable logic unit to trigger hardware process and this is useful to communicate between cpu and FPGA .

 

Step 1: init the scu_gic module:

    Int XScuGic_CfgInitialize(XScuGic* InstancePtr,XGcuGic_Config* ConfigPtr,u32 EffectiveAddr)

The function will init some inner data struct and disable all interrupt source.

EffectiveAddr is relative to Physial Address, equals virtual address.

 

Step 2: connect interrupt routes:

    Int Connect( IntancePtr , Int_ID , InterruptHandler , void* CallBackRef )

Connect the interrupt route according to the specified interrupt ID number. The parameter CallBackRef contains some arguments.

Step 3 : Enable the interrupt :

    Void Enable ( InstancePtr , Int_ID )

Step 4: get the interrupt information:

    Void GetPriorityTriggerType(InstancePtr, Int_ID, Priority , Trigger )

转载于:https://www.cnblogs.com/dragen/archive/2013/06/11/3131957.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值