Giter Site home page Giter Site logo

roby2014 / ecp5-ft232rl-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 12 KB

Programming a Colorlight 5A-75E board (ECP5 FPGA) with FT232RL (via JTAG) using VHDL/Verilog/SpinalHDL and open source tools.

Makefile 55.17% Verilog 4.21% VHDL 11.67% Scala 28.95%
fpga ecp5 ft232rl lattice spinalhdl verilog vhdl 5a-75 colorlight lattice-fpga

ecp5-ft232rl-example's Introduction

This repository contains a simple program written in different HDLs (Hardware Description Languages) for the Colorlight 5a-75e v8.0 board, using FT232RL as JTAG programmer. The goal is to provide an easy first setup for the Colorlight board.

The program is a simple LED controller, which turns ON the LED everytime the input signal is ON.

You can find more information on how to setup the hardware/toolchain on my blog post.

Dependencies

  • FPGA toolchain
    • yosys โ€“ Yosys Open SYnthesis Suite.
    • nextpnr-ecp5 - A portable FPGA place and route tool (for Lattice ECP5 FPGA).
    • prjtrellis - Device database and tools for bitstream creation (fully open source flow for ECP5 FPGA).
    • openFPGALoader - Universal utility for programming FPGA
  • git
  • make

In case you want to run the VHDL example, you will also need:

  • GHDL - VHDL 2008/93/87 simulator.

In case you want to run the SpinalHDL example, you will also need:

  • Scala
  • sbt
  • Java JDK 8+ (tested on openjdk 19.0.1 2022-10-18)

Uploading to FPGA

> git clone https://github.com/roby2014/ecp5-ft232rl-example
> cd ecp5-ft232rl-example/[verilog/vhdl/spinalhdl]_example
> make
openFPGALoader --cable ft232RL --pins=RXD:RTS:TXD:CTS led_control.bit
Jtag probe limited to 3MHz
Jtag frequency : requested 6000000Hz -> real 3000000Hz
ret 0
Open file: DONE
Parse file: DONE
Enable configuration: DONE
SRAM erase: DONE
Loading: [==================================================] 100.00%
Done
Disable configuration: DONE

After running make, the bitstream should be uploaded to the FPGA and you should be able to control the LED via input button.

Information

When running make, this is what happens "under the hood":

  1. yosys synthetizes the Verilog/Vhdl files, generating a json file with the RTL information.
  2. nextpnr-ecp5 transforms synthetized RTL code and pin mapping (lpf file) into a FPGA config file.
  3. ecppack generates bitstream from the configuration file.
  4. openFPGALoader uploads the bitstream into the FPGA via JTAG.

In case you are running the SpinalHDL example, there is an extra step before all of the above:

  1. All Scala files from src/mylib/ are compiled into Verilog files (inside gen/ folder).

In case you are running the VHDL example, there is an extra step before all of the above:

  1. GHDL analyzes all .vhd files and elaborates the top entity module.

ecp5-ft232rl-example's People

Contributors

roby2014 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

ngmacha

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.