Coder Social home page Coder Social logo

tomverbeure / intel_jtag_uart Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 2.0 151 KB

A Python module to interact with an Intel JTAG UART

Home Page: https://pypi.org/project/intel_jtag_uart

License: MIT License

Python 99.48% Shell 0.52%
intel jtag uart fpga python altera jtag-atlantic

intel_jtag_uart's Introduction

intel_jtag_uart is a Python module that can be used to interact with the JTAG UART instances inside Intel FPGA designs.

The official ways to do this are either interactively, through nios2-terminal utility, or by scripting some TCL code inside the Quartus System Console. There is no official straightforward way to interact with a JTAG UART with Python.

This module is a wrapper around the jtag_atlantic shared library/DLL that is part of any modern Quartus installation. (jtag_atlantic is the internal code name for the JTAG UART.)

To use this module, you need access to the jtag_atlantic shared library as well as the jtag_client shared library, which provides lower level JTAG-related functions.

Usage

  • Install this package with pip3 install intel_jtag_uart.

  • Point to the jtag_atlantic and jtag_client shared libraries, so that the module can find it.

    The module uses the following sequence to find these libraries:

    1. Look in the directory in which intel_jtag_uart.py is located
    2. Look in the directory in which the executable that uses this module is located
    3. Use the OS-provided way to find shared libraries. (E.g. for Linux, it will check the directories of the $LD_LIBRARY_PATH environment variable.)
    4. Look in the $QUARTUS_ROOTDIR directory

    Most default Quartus installations will have $QUARTUS_ROOTDIR environment variable set to the correct directory, so everything should just work™.

  • Use some variation of the script below:

import intel_jtag_uart

try:
    ju = intel_jtag_uart.intel_jtag_uart()

except Exception as e:
    print(e)
    sys.exit(0)

ju.write(b'r')
time.sleep(1)
print("read: ", ju.read())

The script sends r to the JTAG UART, waits 1 seconds for a reply, and reads the reply, if there is any. If you have an Arrow/Terasic DECA FPGA board, you can check things out right away with a precompiled example bitstream.

Full List of Functions/Methods

Use the source, Luke!

This module is a very thin wrapper around a handful of function calls that are mostly self-explanatory.

Bug Reports/Comments/Questions

Bug reports, comments, or questions can be entered through the GitHub issue tracker of this project.

References

intel_jtag_uart's People

Contributors

tomverbeure avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

chipyard odie8683

intel_jtag_uart's Issues

Usb-BlasterII support ?

Is the "new" Usb-BlasterII cable also supported ?

I get the error "No UART matching the specified device/instance"

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.