Git Product home page Git Product logo

jam-stapl's Introduction

Hermes-Lite 2.0 JAM-STAPL

This is a forked project to support Hermes-Lite 2.0 FPGA programming with a Raspberry Pi. See the origial github and Altera documentation for background information.

Compilation

You can compile this on your Raspberry Pi. You must have build-essentials installed, sudo apt-get install build-essentials. To compile, cd jam-stapl/source then make -f Makefile.RPi. This will build the exectuable jam in that subdirectory.

Connection

You must connect pins from the Raspberry Pi GPIO header to programming header CN1 on the Hermes-Lite 2.0.

Signal Raspberry Pi Header Pin Hermes-Lite 2.0 CN1 Pin
TCK 22 1
TDO 24 3
TMS 26 5
TDI 28 9
GND 20,30 2,10

The GPIO pins used on the Raspberry Pi are 6 pins in line (20, 22, 24, 26, 28, 30) on the outer edge of the board. Pin 1 of CN1 on the HL2 board is marked with a dot and is the closest pin to the ethernet jack. A simple way to connect the pins would use 6 female to female breadboard jumper wires. A harness could also be created using dupont connectors for repeated use.

Raspberry Pi Header Pin Hermes-Lite 2.0 CN1 Pin
20 2
22 1
24 3
26 5
28 9
30 10

Usage

Both the Raspberry Pi and Hermes-Lite 2.0 must be powered on and connected to program. You must also download to the Raspberry Pi the desired .jam firmware file. Look in the release subdirectory and then the Hermes-Lite 2.0 version subirectory for the .jam file.

Programming is done in two steps. First the FPGA is configured to talk to the serial EEPROM. Next the EEPROM is programmed through the FPGA.

  • Configure

Execute on the Raspberry Pi:

sudo ./jam -aconfigure <yourjamfile.jam>
  • Program

Execute on the Raspberry Pi:

sudo ./jam -aprogram <yourjamfile.jam>

If there are any errors, check your connection between the Raspberry Pi and Hermes-Lite 2.0. This connection must be solid for the programming to be successful. Also, try again as subsequent attempts may not experience errors.

Modification

This code has been tested on a Raspberry Pi 3 Model B. For older Raspberry Pi models, you may need to change the BCM2708_PERI_BASE back to 0x20000000 as in the original code. See jamgpio.c:

#define BCM2708_PERI_BASE        0x20000000

You can change the pins used for JTAG communication in jamgpio.c. See the defines starting at #define TCK. Note that Broadcom SOC GPIO numbering is different from the 40-pin header numbering. See the Raspberry Pi documentation for more details.

There is a hardcoded delay for the JTAG clock TCK in jamstub.c:

// Pulse TCK
delay_loop(10);
gpio_set_tck();
delay_loop(10);
gpio_clear_tck();

This delay may be increased if you experience programming failures.

jam-stapl's People

Contributors

iamtheogre avatar margro avatar softerhardware avatar

Stargazers

 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.