1 SOC总结构
2 中断
中断的分类:
- 软件中断(SGI,Software generatedinterrupts,中断号0-15)(16–26 reserved) :被路由到一个或者两个CPU上,通过写ICDSGIR寄存器产生SGI.
- 私有外设中断(PPI,private peripheralinterrupts ,中断号27-31):每个CPU都有一组PPI,包括全局定时器、私有看门狗定时器、私有定时器和来自PL的FIQ/IRQ.
- 共享外设中断(SPI,shared peripheralinterrupts,中断号32-95):由PS和PL上的各种I/O控制器和存储器控制器产生,这些中断信号被路由到相应的CPU.
通用中断控制器GIC管理从PS/PL发送给CPU的中断,GIC寄存器通过CPU私用总线来访问,避免瓶颈和阻塞
3 AXI
AXI(Advanced eXtensible Interface)是一种总线协议,该协议是ARM公司提出的AMBA(Advanced Microcontroller Bus Architecture)3.0协议中最重要的部分,是一种面向高性能、高带宽、低延迟的片内总线。
- 地址/控制阶段和数据阶段是分开的
- 实现非对齐数据传输
- 数据读写通道是分离的
三种AXI4接口类型 - AXI4:最高性能的接口,适合存储器映射的通信
- AXI4-Lite:接口的轻量级版本,简化了接口,占用较小的逻辑部分面积,但是不支持批量传输数据
- AXI4-Stream:连接只能申从主机到从机,没有地址阶段,支持无数量限制的批量传输。
4 实验细节
- The .hdf file is used in the software environment to determine the peripherals available in the system, and their location in the address map.
The hw_platform includes the ps7_init function which initializes the PS as part of the first stage bootloader, and mem_test_bsp is the board support package.
- GPIO: 1) Initialize the GPIO, 2) Set data direction, and 3) Read the data
XGpio_Initialize (XGpio *InstancePtr, u16 DeviceId)
XGpio_SetDataDirection (XGpio * InstancePtr, unsigned Channel, u32 DirectionMask)
XGpio_DiscreteRead(XGpio *InstancePtr, unsigned channel)
xparameters.h: generated from the hardware platform description from Vivado
- The driver code was generated automatically when the IP template was created. The driver includes higher level functions which can be called from the user application. The driver will implement the low level functionality used to control your peripheral