LOGI Pi Quick Start Guide

From ValentFx Wiki
(Redirected from Logi-Pi Quick Start Guide)
Jump to: navigation, search

Contents

 

Overview

This is an out of the box quick start guide that will give you the essentials of preparing and running the LOGI-Apps demos on your LOGI-Pi and Raspberry Pi.  The guide will guide you through the following items to get you up and running in no time.

  • Installing the LOGI-Pi onto the Raspberry Pi
  • Getting and loading the pre-configured LOGI-Image
  • Running the LOGI-Apps from Raspbian Desktop
  • Running the LOGI-Apps using an SSH terminal connection to the Raspberry Pi

What you will need for this guide

  • Running the LOGI-Apps using Rasbpian Desktop
    • LOGI-Pi and Raspberry Pi
    • A pre-configured LOGI-Image or a Raspbian Image with the LOGI Tools installed
    • Micro USB cable with 500mA supply current source (USB hub or USB power adapter)
    • USB Keyboard
    • USB Mouse
    • Ethernet Cable
  • Running the LOGI-Apps using an SSH client on a remotely networked PC
    • LOGI-Pi and Rasbperry Pi connected to a local network
    • A PC or Laptop connected to the same local network
    • A pre-configured LOGI-Image or a Raspbian Image with the LOGI Tools installed
    • Micro USB cable with 500mA supply current source (USB hub or USB power adapter)
    • Ethernet Cable

Top Level Block Diagram

Board Diagram

Unboxing and Connecting your new LOGI-Pi to the Raspberry Pi

Congratulations on getting a brand spaking new LOGI-Pi!  Let's get started with installing the LOGI-Pi to your Raspberry Pi.  

LOGI-Pi shipped components

The LOGI-Pi will have shipped with some 2x nylon standoffs(1) and 4x screws (2)  that will securely mount the LOGI-Pi to the Raspberry Pi.  Additioanlly you will note that there is a 1x rubber bumper (3) installed that will ensure that the LOGI-Pi PMOD header pins do not short against the Raspberry Pi ethernet jack metal shell when installed.

Installing the LOGI-Pi on the Raspberry Pi

1) The first step to installing the LOGI-Pi onto the Raspberry Pi is to install the 2x Nylon standoffs on the Raspberry Pi.  You will need to insert the nylon screws through the 2x mounting holes on the bottom of the Raspberry Pi.

2) You can then thread the nylon standoffs onto both of the screws.  You can tighten the standoff to a snug tightness.  Do you overtighten as the nylon will strip or break if too much force is applied.

Figure: Install the standoffs

3) Install the LOGI-Pi onto the Raspberry Pi.  You can now align the 26 pin headers of the LOGI-Pi and the Raspberry Pi and gently plug the LOGI-Pi connector onto the Raspberry Pi Connector.  Note that the you must correctly orient the LOGI-Pi so that it "covers" the Raspberry Pi.  You can then align the 26 males pins of the Raspberry Pi into the 26 sockets of the LOGI-Pi female connector.  Gently press and LOGI-Pi into place.  

Figure: Vertical view of aligning LOGI-Pi/Rpi connectors

Figure: Horizontal View align and install of LOGI-Pi/Rpi

4) Fix the LOGI-Pi to the Raspberry Pi using the 2 remaining screws.  The LOGI-Pi has mounting holes corresponding to the locations of the standoffs installed in part1.  You can use a screw driver to gently thread and snug the nylon screws into the standoffs installed on the Raspberry Pi.

Figure: Snug the remaining nylong screws to fix the LOGI-Pi to the Rpi

Your LOGI-Pi and Raspberry Pi are now securely installed! 

Getting your LOGI-Image installed onto your SD card

The easiest way to start using the LOGI-Boards is to use the pre-configured LOGI-Image.  The LOGI-Image is based upon Raspbian Wheezy and contains all of the LOGI-tools and the LOGI-Apps to get you started immediately.

Download the Latest Logi-Image

You can access our preconfigured Logi image that contains everything you need to get going with the Logi-boards.  The image is based upon  2015-02-16-raspbian-wheezy.  

Latest Raspberry Pi LOGI image:  Logi-Pi Pre-configured Rasbian Image 

The user can find older version LOGI images on the valentfx site: http://valentfx.com/doc/logi-image/logipi/

Loading the Image

The image requires a minimum of 4GB SD card be used.  The image can be loaded on an SD card on windows or on a linux system.  For windows it is recommended that you use Win32DiskImager and for Linux use USBImageWriter or by using the command line disk utilities.

Creating your own LOGI compatible image

The user can create or use their own image by installing and setting up the LOGI tools on this image.  See the LOGI Pi user manual for instructions to do this.

More Raspberry Pi Image Resources

For in depth instructions on Raspberry Pi images, writing your image, customizing images and much more, see the ADA Fruit Raspberry Pi Image guides here.  

Running the LOGI-Apps using Raspbian Desktop

Connecting the required periphals to the Raspberry Pi to run Raspbian Desktop

In order to run Raspbian Desktop there are a few peripherals you will need to properly interface with the Raspberry Pi.  Using Raspbian Desktop give you a complete standalone PC experience with very nice graphical desktop features and tools.  

  • Micro USB cable with 500mA supply current source (USB hub or USB power adapter)
  • USB Keyboard
  • USB Mouse
  • HDMI cable 
  • HDMI to DVI adapter (if using an PC monitor)
  • Ethernet Cable (If you need internet Access)

Figure: LOGI-Pi/RPi Raspbian Desktop Running

Connecting your peripherals to the LOGI-Pi/Raspberry Pi

HDMI/DVI video cable

You can use either an external HDMI or DVI display to view Raspbian Desktop.  If you using a desktop monitor with a DVI input you will need to purchase a HDMI to DVI adapter similar to these.  You can also use an HDTV by directly connecting the HDMI cable from the Raspberry Pi to the HDTV and switching to the appropriate HDMI input on the TV.  

Keyboard and Mouse

Any USB 2.0 mouse and keyboard should be compatible with the Raspberry Pi.  In the above picture I am using a wireless mouse and keyboard.  

Ethernet Cable

If you would like to use internet while using Raspbian Desktop you will need to connect an ethernet cable that is connected to internet connected network.  

1) Connect your peripherals similarly to that show in the image of above depicting the LOGI-Pi/RPi connected to a PC monitor.  

Booting the Raspberry Pi

2) Once you have connected the above listed peripherals you are ready to boot the Raspberry Pi.  The Raspberry Pi will begin the boot sequence as soon as you apply power using a micro-USB cable that supplies 500mA of current.  

Figure: plug micro-USB power into the Raspberry Pi

3) The connected monitor will show the status of the boot sequence.  Once the Raspberry Pi is fully booted you will be asked to enter the Raspberry Pi login information.  Enter the below information on your connected keyboard when asked.

  • raspberrypi login: pi
  • Password: raspberry

If you have entered the correct login information a command prompt will appear.  In order to start Raspbian desktop you will need to enter " startx " into the command prompt and press enter on the keyboard.  

Figure: Booting Raspberry Desktop and Entering Raspbian Desktop

If all went well, you should now have Raspbian Desktop running on your monitor.  You will have regular mouse  and keyboard control to navigate and control the Raspberry Pi as you normally would on any PC.  You are now ready to start putting the LOGI-Pi to work using the LOGI-Apps!

Running the the Blink LED App from the command line console on Raspbian Desktop  

1) There is an icon on Raspbian Desktop titled LxTerminal.  Double click the icon and  a command line terminal will appear on the desktop that you can begin typing commands.  See image "Figure - Running the LOGI-Apps - Raspbian" below for reference.

You can now use the command line as you would under any linux operating system or as you would from an SSH terminal window.  Try typing in "ls" to view the contents of the current directory.   You will see the contents of the "home" directory including a directory labeled "logi-apps".  In short, the LOGI-Apps are a "plug and play" way of running the LOGI demo projects.  We have packaged all that you need into each of the "Apps" so that you can simply run "sudo ./make_demo.sh" from within the App directory and everthing else will be taken care of for you.  We use the "make_demo" shell script to compile any needed code, update packages, configure the Raspberry Pi, handle any other house keeping and then Load the FPGA with the bitstream and run any needed executables on the Raspberry to Pi to complete the application.  Sometime we just want to watch a move, not understand how the movie is made.  So, sit back, relax and enjoy the movie.  

For a Full overview of the LOGI-Apps, available LOGI-Apps, links to Documentation and the projects that the LOGI-Apps are based upon see the LOGI-Apps wiki page here

Let's run our first LOGI-App!  The Blink LED LOGI-App or "hello world"  is the basis of what all of the other LOGI-Apps are based upon.  It is a complete FPGA project that can be run very easily from the Raspberry Pi by simply loading the FPGA project bitfile into the FPGA.  This is where the LOGI-Tools come into play.  In this case we call the "logi_loader" to load the bitfile from within the "make_demo" shell script.  If you are interested in seeing what is in the make_demo.sh, run "nano make_demo.sh".  You will be able to see the how simple this App is, just load the bitstream.  Also note that in each App there is a README.TXT that has basic instructions and links to any reference documentation that might be needed to run the App.  

2)  Navigate to the logi-apps directory from the pi home directory.  See image "Figure - Running the LOGI-Apps - Raspbian" below for reference.

  • " cd ~/logi-apps " - This will navigate to the logi-apps directory
  •  "ls" - this will output all of the contents within the logi-apps directory.  You will note the different directories for each App.  

The LOGI-Apps is a git repository and we will be updating and adding new Apps to the as often as possible.  In order to make sure you have the latest LOGI-Apps you should "update" your logi-apps repository periodically to "pull" in any updates from the remote github logi-apps repo, found here. 

3) Update the logi-apps repository. See image "Figure - Running the LOGI-Apps - Raspbian" below for reference.

  • Enter "git pull" - This will pull in any changes and updates from the remote repository into your local copy of the repository

If for some reason the above "git pull" command give you errors you can also re-clone the repository by using the following commands

  • " cd ~ " - navigate to the home directory
  • " sudo rm -rf logi-apps " - DELETE the current copy of the logi-apps
  • " git clone -b logipi https://github.com/fpga-logi/logi-apps "  - this will create a new copy with the latest logi-apps installed.

4) You are now ready to run the Blink LED LOGI-App.  Let's navigate into the blink_led_app and run it! See image "Figure - Running the LOGI-Apps - Raspbian" below for reference.

  • " cd ~/logi-apps/blink_led_app " - This will navigate into the blink_led_app directory, no matter where your current location is
  • " sudo ./make_demo.sh "  - This will run the App! 

There should be some text updates being output into the terminal window. From the output you will see that first the logi_loader (logi bitream loader) is called and will output the status of the bitstream loading, where "config success !" indicates that the bitstream has been properly loaded into the FPGA.  Then you will see the contents of the README.TXT file output to the terminal with links to detailed information about the App and the project that is was based upon.  It will also output a basic description and instructions regarding the App.  Note that each App contains a README.TXT file with useful information regarding the App.  You can manually open and read the README.TXT file by entering " nano README.TXT ", which will open the file with a command line editor, "Nano".  You can scroll through and text file, copy, paste, and close the file by entering "CTL-X".  

Congratulations on running your first LOGI-App!

 

Figure: Running the LOGI-Apps - Raspbian

From here you can either proceed to the SSH access section that will show you how to connect to the Raspberry Pi using SSH to run the LOGI-Apps or you jump the Running More LOGI-Apps section to begin exploring the LOGI-Apps while using Raspbian Desktop.  The Running More LOGI-Apps section will give you links to all of the LOGI-Apps projects, overviews and step by step guides.

Running the LOGI-Apps using an SSH terminal connection to the Raspberry Pi

Using an SSH client to remotely access your Raspberry Pi is a very flexible and powerful tool.  By using SSH you are able to work on  a remote client while still having full access and control of the Raspberry Pi.  The Raspberry Pi can be setup at remote location while still be able to have full access to controlling the Raspberry Pi.  The SSH client can reside on a PC, laptop or even smartphone.  There are a couple of steps required in getting an SSH connection setup, which we will cover here. 

To get started you will need to plug your Raspberry Pi into you local network.  Generally your home or office network will have a router and or switch that hosts the DHCP sever.  The router is your router is the gateway to the internet on on the internet side and handles the local devices using DHCP on your home or office local network.  You will need make sure that the computer that you plan to access the Raspberry Pi from is on the same local network as the Raspberry Pi.  

An overview of the steps that will need to take place in order to create your SSH terminal connection to the Raspberry PI are as follows

  • Plug the Raspberry Pi into your local network that support DHCP (all networks should)
  • Find the IP Address that was assigned to your Raspberry Pi
    • Login into your router and view the DHCP client list to access the IP Address
    • or use AdvancedIPScanner to scan you network and give you the IP address assigned to the Raspberry Pi
  • Use an SSH/SCP client to login into your Raspberry Pi

1) The first step to accessing your Raspberry Pi is to plug it into the network using an ethernet cable.  

Finding Your Raspberry Pi’s IP Address

Before connecting to your Raspberry Pi you will need to know the IP address where your Raspberry Pi resides on the network.  The Logi-image is configured with Dynamic Host Configuration Protocol (DHCP) by default so that no matter what your subnet address is, you will be able to successfully access your Raspberry Pi from the network.  

After connecting your Raspberry Pi to the network you will automatically be assigned an address by your DHCP server, usually your local router on the network.  You will need to determine the assigned IP address that was assigned to your Raspberry Pi.  There are 2 methods for finding out what this address is.  

  • Log into your router and view the DHCP client table 
  • Use IPScanner which will scan your network and return the IP addresses of clients on the network

2) Accessing the DHCP table by logging and viewing the address assigned to your Raspberry Pi.  In this case you can see that “raspberrypi” was assigned 192.168.0.117  .  The rpocess of logging into your router will vary from device to device.  You will need to read the documentation on your router to find the login details.  In my case the router address is 192.168.0.1 and the login information is user: admin pass: admin.  


3) Using AdvancedIPScanner to find the addresses on your local network.  The IP scanner will scan the selected range on your local network and list any devices with associated IP address and other associated network identification data.  Note that this method works well in the case that your Raspberry Pi is configured with a static IP address and your don’t know what it is - as the address will not show up in the DHCP table of your router.   From the figure below you can see that the “Raspberry Pi Foundation” device is showing up on the network at the expected address of 192.168.0.117.


 

Connecting to the Raspberry Pi using SSH

There are many SSH/SCP clients that make connecting to your Raspberry Pi from a PC an easy process.  We recommend using  Bitvise SSH Client which is both SSH/SCP clients that make connecting and transferring files between your Raspberry Pi and PC an easy process.  Now that you know the IP address of your Raspberry Pi you can use an SSH client to access your Raspberry Pi.

We will be showing how to connect to the Raspberry Pi using Bitvise SSH Client .  The username and password for the Logi-image are the Raspbian image defaults.

Raspbian Image default username and Password:

  • user: pi
  • pass: raspberry

1) open Bitvise SSH Client and select the quickconnect button which will allow us to input our SSH login information

2) Enter the found IP address found earlier, username and password for the image and the default port number = 22.

3) Press the Login button and bitvise will begin to try to connect to the Raspberry Pi.

 

4) Enter the logi-image password: raspberry and click OK.  

 

5) If all of the fields were entered correctly bitvise will log you into the Raspberry Pi using SSH.  Bitvise will open an SSH terminal window and an SFTP file transfer window by default.  We will only be using the terminal window to run the logi-apps, but you can experiment with transferring files to and from your raspberry Pi using the SFTP client.    This is very handy when you start developing your own FPGA projects and need to transfer the bitfiles that will be loaded into the FPGA from the Raspberry Pi.


 

Running the blink LED App using SSH access 

We are now ready to run the LOGI-Apps after having successfully logged into the Raspberry Pi using SSH.  Note that running LOGI-Apps will be the same here as they were for running them in the Raspbian Desktop environment, where are using the command line terminal to run them.  We will be using the same instructions as were used the Raspbian Desktop sections, but will copy them here for clarity.  

You can now use the command line as you would under any linux operating system or as you would from an SSH terminal window.  Try typing in "ls" to view the contents of the current directory.   You will see the contents of the "home" directory including a directory labeled "logi-apps".  In short, the LOGI-Apps are a "plug and play" way of running the LOGI demo projects.  We have packaged all that you need into each of the "Apps" so that you can simply run "sudo ./make_demo.sh" from within the App directory and everthing else will be taken care of for you.  We use the "make_demo" shell script to compile any needed code, update packages, configure the Raspberry Pi, handle any other house keeping and then Load the FPGA with the bitsream and run any needed executables on the Raspberry to Pi to complete the application.  Sometime we just want to watch a move, not understand how the movie is made.  So, sit back, relax and enjoy the movie.  

For a Full overview of the LOGI-Apps, available LOGI-Apps, links to Documentation and the projects that the LOGI-Apps are based upon see the LOGI-Apps wiki page here

Let's run our first LOGI-App!  The Blink LED LOGI-App or "hello world"  is the basis of what all of the other LOGI-Apps are based upon.  It is a complete FPGA project that can be run very easily from the Raspberry Pi by simply loading the FPGA project bitfile into the FPGA.  This is where the LOGI-Tools come into play.  In this case we call the "logi_loader" to load the bitfile from within the "make_demo" shell script.  If you are interested in seeing what is in the make_demo.sh, run "nano make_demo.sh".  You will be able to see the how simple this App is, just load the bitsream.  Also note that in each App there is a README.TXT that has basic instructions and links to any reference documentation that might be needed to run the App.  

1)  Navigate to the logi-apps directory from the pi home directory.  See image "Figure - Running the LOGI-Apps - SSH" below for reference.

  • " cd ~/logi-apps " - This will navigate to the logi-apps directory
  •  "ls" - this will output all of the contents within the logi-apps directory.  You will note the different directories for each App.  

The LOGI-Apps is a git repository and we will be updating and adding new Apps to the as often as possible.  In order to make sure you have the latest LOGI-Apps you should "update" your logi-apps repository periodically to "pull" in any updates from the remote github logi-apps repo, found here. 

2) Update the logi-apps repository. See image "Figure - Running the LOGI-Apps - SSH" below for reference.

  • Enter "git pull" - This will pull in any changes and updates from the remote repository into your local copy of the repository

If for some reason the above "git pull" command give you errors you can also re-clone the repository by using the follwoing commnads

  • " cd ~ " - navigate to the home directory
  • " sudo rm -rf logi-apps " - DELETE the current copy of the logi-apps
  • " git clone -b logipi https://github.com/fpga-logi/logi-apps "  - this will create a new copy with the latest logi-apps installed.

3) You are now ready to run the Blink LED LOGI-App.  Let's navigate into the blink_led_app and run it! See image "Figure - Running the LOGI-Apps - SSH" below for reference.

  • " cd ~/logi-apps/blink_led_app " - This will navigate into the blink_led_app directory, no matter where your current location is
  • " sudo ./make_demo.sh "  - This will run the App! 

There should some text updates being output into the terminal window. From the output you will see that first the logi_loader (logi bitream loader) is called and will output the status of the bitstream loading, where "config success !" indicates that the bitstream has been properly loaded into the FPGA.  Then you will see the contents of the README.TXT file output to the terminal with links to detailed information about the App and the project that is was based upon.  It will also output a basic description and instructions regarding the App.  Note that each App contains a README.TXT file with useful information regarding the App.  You can manually open and read the README.TXT file by entering " nano README.TXT ", which will open the file with a command line editor, "Nano".  You can scroll through and text file, copy, paste, and close the file by entering "CTL-X".  

Figure - Running the LOGI-Apps - SSH

From here you move to the next section, Running More LOGI-Apps , to begin exploring the more LOGI-Apps.  The Running More LOGI-Apps section will give you links to all of the LOGI-Apps projects, overviews and step by step guides.

Running More LOGI-Apps

After running the previous blink led app from the Raspbian Desktop section or the SSH sections you will have the basic understanding of what you need in order to run more complex and fun Apps.  The process is the same for the rest of the LOGI-Apps.  The condensed steps are listed here for your reference.  

  1. " cd ~/logi-apps "  - Navigate into the logi-apps directory
  2. " ls" - will list the available apps that can be run.  Each App has it's own name directory.
  3. "cd NAME_OF_APP_DIRECTORY_TO_RUN"  - Navigate into the app you would like to run
  4. " sudo ./make_demo.sh "  - Run the app by running the make_demo shell script.   There will be instructions on the terminal output.  You can also read the README.TXT

Links to Specific instructions for each of the LOGI-Apps

Blink LED App

Blink LED App - Project Page

Functional Overview of Blink LED - LOGI App

Running the Blink LED Demo - Step by Step Guide

Bitcoin Mining Algorithm Demo App

Bitcoin Mining Algorithm Demo App - Project Page

Functional Overview Bitcoin Mining Algorithm Demo - LOGI App

Running the Bitcoin Mining Algorithm Demo - Step by Step Guide

Cheapscope Logic Analyzer App

Cheapscope Logic Analyzer App - Project 

Functional Overview of Cheapscope Logic Analyser - LOGI App

Running the Cheapscope LOGI-App - Step by Step Guide

Image Processing Demo App

Image Processing Demo App - Project Page

Functional Overview of Image Processing Demo used in the LOGI App

Running the Cheapscope LOGI-App - Step by Step Guide

Wishbone Bus Demo App

Wishbone Bus Demo App - Project Page

Functional Overview of the Wishbone Demo - LOGI App

Running the Wishbone Demo LOGI-App - Step by Step Guide

Virtual Components Demo App

Virtual Components Demo App - Project Page

Functional Overview of Virtual Components used in the LOGI App

Running the Virtual Components LOGI-App - Step by Step Guide

EDU Demo App

EDU Demo App - Project Page

Functional Overview of the EDU Demo Project

Running the LOGI-EDU Demo - Step by Step Guide

Where to Go From Here

There are many places you can go from here.  You’ve successfully programmed an FPGA and now the sky is the limit.  Have a look over the following sections to see what else is possible with the LOGI-Pi platform.

To begin creating your own HDL projects you should go through our "Create and Synthesize a blink LED project for the Logi-Pi using Xilinx ISE" guide.

Read Pong P. Chu’s Book

There’s a great intro book by Pong P. Chu that you should read if you want to develop a sound understanding of the Verilog or VHDL languages.  We currently have examples ported from this book that allows users to step thorugh the book material and learn by examples.  If you are looking for a more in depth and formal walk through of how to begin using HDL this is a great choice.

Have a look at the LOGI-EDU, which was designed to support the examples from the Pong Chu books.  It also has some extra goodies such as NES controllers, Audio output and Servo interfaces to support many applications after you have used to in conjunction with Pong Chu's books.  

Visit Hamster's Wiki to access his FREE FPGA course and Projects

Hamster has an excellent open source and free course that you can access on his wiki.  Hamster has some of the best material I have come accross and most importantly gives full explanations and background of his projects.  

LOGI Repsository with logi-apps, projects and drivers

Head over to our logi repository where can find a number of ways to kickstart your FPGA experience.

logi-projects

The logi-projects are open source projects that contain all of the source for you learn from and to customize your own projects.  This is where you find the complete projects source for the applications run in logi-apps.  

logi-drivers

Once you are ready for you can get started creating your own projects by using any of our drivers.  We provide easy to use drivers that will allow you to get a head start on your own projects.

LOGI Projects and Users projects documenation

We will be documenting all of our projects using the wiki.  You can find detailed guides and documentation related to the projects you find in our repository.  We also allow users to submit your projects and create some base documentation to showcase your projects. 

Want to get involved in a project?

In the logi/user projects wiki there will be a section "get involved' that will have a listing of potential items that anybody can take on to contribute and get involved in the project.

Integrate a PMOD  and Arduino Modules and Shields

The PMOD headers on the side of the LOGI allow for easy connectivity to off-the-shelf electronics modules.  You can easily add things like GPS, Audio Amplifiers, OLED displays, Wifi, Networking, RS232, DACs, ADCs Accelerometers, Motor Drivers etc. to your design!

Have a look through all the PMOD possibilities at the Digilent site.  Here is a listing of Arduino shields.

Open Cores

Open Cores hosts great open source HDL cores that you can use in your own projects.

Useful Links

LOGI Pi User Manual

LOGI Pi User Manual

LOGI - Repository - Projects, Libraries, Drivers

LOGI - Repository

LOGI-Pi Schematics

LOGI-Pi Schematics

LOGI-Pi User Guide -LOGI-Pi documentation

LOGI-Pi User Guide

LOGI Projects wiki - LOGI and Users projects will be documented here

LOGI Projects wiki

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox