LOGI - LED Blink - Project

From ValentFx Wiki
Jump to: navigation, search


Project Overview

The LED Blink demo is breaks down an FPGA project to its very basics.  The demos contains a counter which is incremented and drives an LED.  This project gives the user an idea of how things are working within the FPGA and acts as a "Hello World" applicaton on the FPGA.

Hardware Overview




The blink led demo is the "Hello World !" of FPGA. In this demo the FPGA is programmed with a 25 bit counter whose bit 24 and 23 are connected to the logipi/logibone leds. This counter is clocked using the onboard 50MHz oscillator. This result in led 0 blinking at   while led 1 blinks at

The top level file of the demo declare an entity with OSC_FPGA as input and LED[1..0] as outputs. 

library IEEE;

entity logipi_blink is

OSC_FPGA : in std_logic;

LED : out std_logic_vector(1 downto 0)
end logipi_blink;

The architecture of the top level entity just declare one 25 bits count signals and a single process. The process used is synchronous to the oscillator rising edge and increment the count signal. LED[0] is then connected to the bit 23 and LED[1] to the bit 24 of the count signal.

architecture RTL of logipi_blink is
    signal count : std_logic_vector(24 downto 0);
        if OSC_FPGA'event and OSC_FPGA = '1' then
            count <= count + 1 ;
        end if;
    end process ;
    LED(0) <= count(23);
    LED(1) <= count(24);
end RTL;

Functional Overview of Blink LED - LOGI App

This is a "hello world" demo for the LOGI FPGA. This is shows the functioning nuts and bolts of the Pi/Bone and LOGI FPGA. A bitstream is loaded using the logi_loader and the FPGA begins to run a counter with the LEDs being driver by bit 25 and 24 of the 32 bit counter.  

Running the Blink LED Demo - Step by Step Guide

Demo Requirements:

getting the logi-apps

The demo resides within the logi-apps.  So the easiest way to run the demo is the download and run the demo using the instructions found on the logi-apps wiki page.  In short you can download all of the logi-apps by running "git clone -b logipi https://github.com/fpga-logi/logi-apps.git " .  You can then navigate to the virtual component demo directory and run "sudo ./make_demo" to load the bit file and display basic instructions for the edu demo.  

Step by Step

1) Navigate to the installed logi-apps/blink_led_app directory and run "sudo ./make_demo.sh".  Note the the make_demo script calls the logi_loader which load the bistream into the FPGA.  The LED should now be blinking.  You inpsect the very basic code in the github viewer to see quickly how things are working.  This is good starting point for creating your own projects.

Where To Go From Here

See the LOGI-Apps project for information on this App and other Apps that you can use to quickly begin using projects and applications on the LOGI boards. 

Additionally you can have a look at other LOGI projects and LOGI components (link needed) that you can use in your own projects.

Other Resources

LOGI Github repositories


LOGI Videos

Personal tools