本文主要参考Xlinx的Device Driver Programmer Guide
Device Driver特点
- 提供最大的兼容性
- 使用标准的C语言编写
- 设备驱动层和操作系统层、处理器分离
- 支持FPGA重配置
- 支持动态重配置
- 不复制代码可以例化多个设备
- 支持简单和复杂的使用方法
- 可根据需求去调整面积与速度的优化
- 方便使用和维护
- 不同的设备驱动API都有着相似的风格
Device Driver结构
带有API函数的是Layer1和Layer2,Direct Hardware Interface只有一些宏定义的常量
Layer 2 (RTOS Adapter)
- Adapters 典型特点.
- Communicates directly to the RTOS as well as the Layer 1 interface of the device driver.
- References functions and identifiers specific to the RTOS. This layer is therefore not portable across operating systems.
- Can use memory management
- Can use RTOS services