Git Product home page Git Product logo

interrupt_example's Introduction

Cyclone V Avalon Interrupts Example

A demonstration of how to send an interrupt from the Cyclone V FPGA to the HPS and handle the IRQ in Linux.

Includes Verilog description which triggers interrupt when a switch or push button changes state, as well as Linux kernel sysfs driver and userspace command-line program.

Setup Instructions

Programming the FPGA

  1. Go into the fpga directory.
  2. Open interrupt_example.qpf in quartus.
  3. Open the soc_system.qsys file in Qsys and generate the system.
  4. Compile the SOF file and program it onto the FPGA.

Loading the Kernel Driver

  1. Go into the software/kernel directory and run make.
  2. Copy the fpga_uinput.ko file to the SDCard.
  3. On the HPS, run echo 1 > /sys/class/fpga-bridge/lwhps2fpga/enable.
  4. Run insmod fpga\_uinput.ko.
  5. Make sure that the file "/sys/bus/platform/drivers/fpga_uinput/fpga_uinput"

Running the userspace program

  1. Go into the software/userspace directory and run make.
  2. Copy the readstate binary to the SD card.
  3. Run the executable on the HPS.
  4. Start flipping switches and pushing buttons. The program should print out information when an input changes state.

interrupt_example's People

Contributors

baby9 avatar

Watchers

 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.