Giter Site home page Giter Site logo

zynq-uflow's Introduction

Zynq uflow configuration Driver

This Linux driver has been developed to run on the Xilinx Zynq FPGA. It is a userspace input/output driver (UIO) that enables the passing of register values to and from the Zynq FPGA. Userspace applications use this UIO driver to configure and control the accelerator operations.

Compile

Kernel modules need to be built against the version of the kernel it will be inserted in. It is recommended to uses the Linux kernel maintained by Xilinx.

git clone https://github.com/Xilinx/linux-xlnx.git

The driver module can be compiling outside of the Linux kernel source tree. A variable 'KDIR' in the Makefile is used to point to the kernel source directory. The default value has it pointing to the default Linux install location for kernel sources. However, if cross compiling or if the sources are in a non-default location the value can be overridden using an exported environmental variable or as an argument passes into the make command.

cd zynq-uflow/dev/
export KDIR=../../linux-xlnx
make

or

cd zynq-uflow/dev/
make KDIR=../../linux-xlnx

Inserting Module

Use of the driver module requires it to be inserted into the running Linux kernel. Once inserted it will automatically create a character device file in '/dev' called '/dev/uflow-cfg'. However, the default permissions will not allow non-root users to read/write to the file. These permissions can be overridden by installing the udev rule file found in this projects 'util' directory into the systems '/etc/udev/rules.d/' directory. Alternatively, once the modules inserted the permissions can be changed manually using 'chmod'.

sudo cp util/80-uflow.rules /etc/udev/rules.d/
sudo insmod dev/uflow.ko

or

sudo insmod uflow.ko && sudo chmod 666 /dev/uflow-cfg

To remove the module.

sudo rmmod uflow

To install the module and have it loaded at boot, first install the udev rule as shown above and then follow the below instructions.

sudo mkdir -p /lib/modules/$(uname -r)/extra/
sudo cp uflow.ko /lib/modules/$(uname -r)/extra/
sudo depmod -a
sudo modprobe uflow
sudo sh -c 'echo "uflow" >> /etc/modules'

Build and install uflow library

The uflow library has to be built and installed before the demo applications can be compiled. The library offers a number of generic functions for use in configuring the accelerator. For example, it can write a single values or pass in an entire array of values.

cd lib/
sudo make install

Compiling and Running Demo

The demo application runs a simple configuration test.

cd demo
make

zynq-uflow's People

Contributors

bmartini avatar jhjin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.