DrsLib

Brief: DrsLib is A simplified objected-oriented C++ encapsulation based on Xilinx Vitis Device Driver API for embedded software development.

简介: DrsLib 是一个面向 Xilinx Vitis 嵌入式软件开发者的,基于 Xilinx 硬件驱动 API 的,使用 C++ 语言的简化版面向对象封装库。

Language

English

中文


Introduction

DrsLib is for beginners who want to learn embedded software development on Xilinx Vitis platform. If you find Xilinx device driver API complicated to read, this library abstract off most details and provide you with an simplified object-oriented encapsulation to start with. However, If you are already familiar with Xilinx API, you may find this library of little help.

By the principle of making everything simple and easy to use, DrsLib abstracts off some functions and only maintains the basic ones. If you find the library unable to implement your design, you may turn to the original Xilinx API.

I am actually one of those beginners just started to read and use Xilinx API, and this library will be continually enriched and enlarged. There might be bugs and flaws. If you would like to learn Xilinx API with me, welcome to issue any problems.

Quick Guide

  1. Every .h file is well-commented. If you have some basic knowledge about Vitis embedded software development, you can easily read these comments and start to code . (I will add a simple tutorial about the library later.)
  2. Simply copy the src directory under your Vitis application project.
  3. The only file you have to edit is drs.h. Uncomment the #define DRS and other micro definitions according to your hardware design. (You can always uncomment everything, but it will make the whole library compiled and loaded on your processor.)
  4. Everything is defined in namespace drs. You may using namespace drs; at the beginning.

介绍

DrsLib 面向 Xilinx Vitis 嵌入式软件开发的初学者,如果你发现 Xilinx 硬件驱动 API 比较复杂并且难以阅读,这个库帮你抽象掉了大部分细节,为你提供了一个简化的面向对象的封装。然而如果你已经非常了解 Xilinx API,你可能会觉得这个库没太大用处。

谨遵简化并易于使用的原则,DrsLib 抽象掉了一些功能,只保留了基本功能,如果你发现这个库无法实现你的设计,你可以转而直接使用 Xilinx API。

我自己也是一个 Xilinx Vitis 嵌入式软件开发的初学者,我会在今后的一段时间内不断充实和扩大这个库,代码中可能存在一些漏洞,如果你愿意和我一起学习 Xilinx API,欢迎指出代码中的任何问题。

快速指南

  1. 每一个 .h 文件都是详细注释过的(英文),如果你对 Vitis 嵌入式软件开发有一些基本的认知,你可以轻松地阅读这些注释并开始使用这个库。(之后我也会写一个简单的教程)
  2. 简单地把整个 src 文件夹拷贝到你的 Vitis application 项目文件夹下。
  3. 唯一一个需要你做更改的文件是 drs.h ,你需要取消掉 #define DRS 的注释,并且根据你自己的硬件设计取消一些其它的宏定义。(你可以始终取消所有宏定义的注释,但是这样会让整个库都被编译并装载到处理器上。)
  4. 所有的内容都定义在命名空间 drs 中,你可以在编程最开始时使用 using namespace drs;

GitHub

View Github