Giter Site home page Giter Site logo

pynq's Introduction

PYNQ with Chisel and Rust

This repository contains some examples on how Chisel and Rust can be used to create custom peripherals on the FPGA and interface them from the ARM core of the Zynq device.

The documentation helps you setup your system.

Test Log

  • successfully tested accessing the rgb leds from the Overlay on 2017-11-01 using Vivado 2017.2:
> sudo ipython3
In : ov = Overlay('/home/xilinx/system.bit')
In : ov.rgbleds_gpio[0:2].write(5)
  • make sure to have the Digilent board files installed in /opt/Xilinx/Vivado/2017.2/data/boards/board_files

  • successfully tested accessing the loopback DMA from the Overlay on 2017-11-01 using Vivado 2017.2:

> sudo ipython3
In ....: ov = Overlay('/home/xilinx/system.bit')
In ....: xlnk = Xlnk()
    ...: in_buffer = xlnk.cma_array(shape=(5,), dtype=np.uint32)
    ...: out_buffer = xlnk.cma_array(shape=(5,), dtype=np.uint32)
    ...: 
    ...: for i in range(5):
    ...:     in_buffer[i] = i
    ...: 
    ...: dma = ov.axi_dma_0
    ...: dma.sendchannel.transfer(in_buffer)
    ...: dma.recvchannel.transfer(out_buffer)
    ...: dma.sendchannel.wait()
    ...: dma.recvchannel.wait()
    ...: 
    ...: out_buffer
Out ...:  ContiguousArray([0, 1, 2, 3, 4], dtype=uint32)

pynq's People

Contributors

ekiwi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pynq's Issues

Chisel/Verilator test failing

I'm currently doing the system setup on my Archlinux machine. I have chisel, sbt and verilator installed, but the second test is failing. I cannot judge if this is due to the version of my tools or maybe just a minor bug, so here's the log:

verilated.o: In function `VL_FINISH_MT(char const*, int, char const*)':
verilated.cpp:(.text+0x7): undefined reference to `vl_finish(char const*, int, char const*)'
collect2: error: ld returned 1 exit status
make: Leaving directory '/home/daniel/Entwicklung/pynq/chisel/test_run_dir/pynq.GCDTester1346527907'
[info] GCDTester:
[info] Queue
[info] - should behave like a bounded queue (with firrtl)
[info] Queue
[info] - should behave like a bounded queue (with verilator) *** FAILED ***
[info]   java.lang.IllegalArgumentException: requirement failed: test_run_dir/pynq.GCDTester1346527907/VQueue doesn't exist
[info]   at scala.Predef$.require(Predef.scala:277)
[info]   at chisel3.iotesters.TesterProcess$.apply(PeekPokeTesterUtils.scala:153)
[info]   at chisel3.iotesters.SimApiInterface.<init>(SimApiInterface.scala:36)
[info]   at chisel3.iotesters.VerilatorBackend.<init>(VerilatorBackend.scala:281)
[info]   at chisel3.iotesters.setupVerilatorBackend$.apply(VerilatorBackend.scala:270)
[info]   at chisel3.iotesters.Driver$.$anonfun$execute$2(Driver.scala:53)
[info]   at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
[info]   at logger.Logger$.$anonfun$makeScope$2(Logger.scala:129)
[info]   at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[info]   at logger.Logger$.makeScope(Logger.scala:127)
[info]   ...
[info] ScalaTest
[info] Run completed in 5 seconds, 731 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 1, canceled 0, ignored 0, pending 0
[info] *** 1 TEST FAILED ***
[error] Failed: Total 2, Failed 1, Errors 0, Passed 1
[error] Failed tests:
[error] 	pynq.GCDTester
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 62 s, completed Jan 2, 2018 3:09:31 PM

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.