SlideShare a Scribd company logo
1 of 20
Lab 1:
Implementing a Boolean function in LabVIEW FPGA
        on the Xilinx SPARTAN-3E Board




Keywords: LabVIEW, LabVIEW FPGA, Xilinx SPARTAN3E Starter Kit,
Implementing a Boolean Function.




Vincent Claes                2008                   Vincent Claes
Introduction
Welcome to Lab1 in the serie of programming a SPARTAN3E
Starter Kit by use of LabVIEW FPGA. These labs are created by
Vincent Claes. If you encounter problems using this labs or
want some advice/consultancy on LabVIEW and especially LabVIEW
FPGA you can always contact the author.

These labs are free to use however to show respect to the
author please email him when you use them with your contact
details (feedback is also welcome).

Contact Information:
Vincent Claes
claesvincent@gmail.com
http://www.linkedin.com/in/vincentclaes

Software Requirements:
   • LabVIEW 8.5 or above
   • LabVIEW 8.5 FPGA module
   • XUP Spartan3E starter board: download for free from:
     https://lumen.ni.com/nicif/us/infolvfpgaxilsprtn/content.
     xhtml

Hardware Requirements:
  • Xilinx Spartan3E Starter kit:
     http://www.xilinx.com/products/devkits/HW-SPAR3E-SK-US-
     G.htm
  • User manual:
     www.xilinx.com/support/documentation/boards_and_kits/ug23
     0.pdf



Getting Started
When you want to use this labs you have to setup your board.
This labs are written for the Xilinx SPARTAN3E Starter Kit so
it is quite interesting to read the user manual of the board.
Be sure to plug in the USB cable, plug in the Power cord and
Switch the board on before starting the lab.




Vincent Claes                2008                    Vincent Claes
Step 1: Starting LabVIEW
The first step is to start the National Instruments LabVIEW
8.5 environment.




Step 2: Create a LabVIEW
project
After we have started   the   LabVIEW   environment   we     get   the
following screen:




We have to create an Empty Project where we will add the
Xilinx Spartan3E starter board on as a hardware target. In a
future lab I will explain how we can create a HOST vi (this is
a LabVIEW application that runs on a desktop PC) that
communicates with a LabVIEW FPGA vi.




Vincent Claes                 2008                         Vincent Claes
Step 3: Add the Spartan3E board
as a hardware target
The next screen shows the Project Explorer view of the Empty
Project that we just created.




Now we have to add the Spartan3E starter board as a Hardware
target. For this we do a “right click” on “My Computer” in the
Project Explorer view. We select “New” and then “Targets and
Devices”.




In the screen that now appears we have to select the XUP
starter board. Select “New target or device”.




A list of “Targets and Devices” will be shown. You have to
scroll down till the end and select “Spartan-3E Starter board”
from the “Xilinx university Program” map.




Vincent Claes                2008                   Vincent Claes
This will add the FPGA Target to the Project Explorer view.
You see this target is placed under “My Computer”.




Step 4: Adding FPGA I/O
The next step we make is adding “FPGA I/O’s” that we will use
in this project to the Project Explorer view. For this you
have to “right click” the FPGA Target you added in Step 3.
Select “New” “FPGA I/O”.




The next screen will appear




Vincent Claes                 2008                 Vincent Claes
On the left side of this screen you see all the resources that
are available on the Spartan-3E board. To add FPGA I/O to the
project you have to select it in the left window and press the
“Add” button. Now the FPGA I/O that you wanted to add has to
show up in the window on the right side. For this project you
have to add SW0, SW1 and LED0 to the project.




If we go back to the “Project Explorer” view we see the FPGA
I/O that we have added. With this I/O we will implement an
Exclusive-OR function.




Vincent Claes                2008                   Vincent Claes
Step 5: Creation of the FPGA VI
The next step is the creation of a hardware program that runs
on the Xilinx Spartan-3E hardware target.
For this we do again a “right mouse click” on the FPGA target
in the “Project Explorer” view. Select “New” VI. Be sure that
you have right clicked the FPGA target and not “My Computer”
because otherwise you will be creating a vi that runs not in
Hardware (on the FPGA) but on your computer.




This step will open the Front Panel and Block Diagram of the
FPGA VI you just started creating. The code we will be
implementing is an Exclusive-OR function. The view I always
use in LabVIEW is the “tile left and right” view. You can
select this by going to “Window” and then selecting “Tile Left
and Right”. We you did all the steps right you have to see in
the left corner of either the Front Panel or Block Diagram the
name of the vi you created with /FPGA target behind it. This
shows that the vi you are creating is aimed at the FPGA
target.




Vincent Claes                2008                   Vincent Claes
For now have a look at the “Functions Palette” which you can
see when you click in the “Block Diagram” on “View” and then
“Functions Palette”. You see that the available functions are
different. You see “FPGA I/O”, “Memory & Fifo” and “FPGA Math
& Analysis”. Those are specially for using on FPGA targets.




Click in the Functions Palette on “FPGA I/O”.




Place 2 I/O Nodes on the Block Diagram of the LabVIEW FPGA vi.




Vincent Claes                2008                    Vincent Claes
Now do a “right mouse click” on one of the I/O Nodes. Select
“Select FPGA I/O” then “Slide Switches” then “SW0”.




You should see that the I/O node is filled with a green “SW0”
label. The color green is standing for a Boolean variable.
This is correct since a slider switch can only have the value
of true or false.




This project will be using 2 slider switches so we have to add
another FPGA I/O. For this do a right click on the FPGA I/O
you just filled with SW0. Select “Add Element”.




Vincent Claes                2008                   Vincent Claes
The following is the screen you should have now:




Try now to fill the I/O Item yourself with SW1. Try also to
fill the I/O Node that is empty with LED0. This is done by
right mouse clicking it then selecting “Select FPGA I/O”. In
the option of “Select FPGA I/O” you see only the resources you
added in the “Project Explorer” view to the project.

The following screen will be created:




Now we will as an example implement an exclusive-OR Boolean
function into the FPGA. From the “Functions Palette” select
“Programming” “Boolean” and look for the “Exclusive Or”
function. Place this one on the Block diagram.




Vincent Claes                2008                   Vincent Claes
Wire the “SW1” and “SW0” FPGA I/O to the Exclusive-OR inputs.
Wire the output of the function to “LED0”.




Your code has to look like this:




When you implement the function like presented above the
function will run only once. We would like to implement it
that it runs continuously. For this we place a “While Loop”
around it and we wire a Boolean “False constant” to the “stop
condition” of this loop. This you normally don’t do on a PC
because this will put your PC in a never ending loop. The
“While Loop” you find on the “Functions Palette”.




Vincent Claes                2008                  Vincent Claes
Now it is time to save your vi that you created for the FPGA.
You do this by selecting “New” “Save As” in either the “Front
Panel” or the “Block Diagram”.




The name I usually use is FPGA_VI for the vi running on the
FPGA.




Vincent Claes               2008                   Vincent Claes
In “Project Explorer” you should see the following




It is also a good idea to save the project file for this
select in the “Project Explorer” “New” then “Save As”.




I did use the name Lab1_BooleanLogic




Vincent Claes                2008                    Vincent Claes
Step 5: Running the FPGA VI
This step is where we created the vi for. We designed it to
run on an target. For starting the executing of this vi we
have to press the “Run” arrow on either the “Block Diagram” or
on the “Front Panel”.




The first step LabVIEW does is “Generating Intermediate
Files”. This files will be send to the Xilinx Synthesis Tools.
But this is not important for us as application developers.




Vincent Claes                2008                   Vincent Claes
In this step you see that LabVIEW is starting the “Compile
Server”. This “Compile Server” can also be executed on another
“more powerful” machine that is in your network (for this
please see the information on the NI website.




Vincent Claes                2008                   Vincent Claes
When the “Bitstream generation is complete” message appears
and the server status is set to “Idle…” the Xilinx synthesis
tools have done their job.




You get a “Successful Compile Report” where you can see the
implementation details of your code. You have to Press “Ok”.




Vincent Claes               2008                   Vincent Claes
After you have pressed the “Ok” button your VI starts running
on the FPGA target. It is indicated on your screen by the
black “Run” arrow.




Try to play with the switches SW0 and SW1 on the Spartan3E
starter board you will see they have an XOR function; the led
LD0 will be on when one of those switches is turned on.

The problem with this implementation is that when you stop the
VI the function is erased on the LabVIEW FPGA board. If you
don’t want this effect you can download this VI to the FLASH
of the Xilinx Spartan3E starter board (see next step).




Vincent Claes                2008                   Vincent Claes
Step 6: Implementing the
LabVIEW VI into Flash
For implementing your VI into the Flash on the Spartan3E
Starter board you have to do some things. The first thing is
setting the option of “Run when loaded to FPGA” on. For this
you have to go to “Project Explorer”. Then “Right Mouse click”
on your FPGA target. Select the “Properties” option.




In this screen you see the option “Run when loaded to FPGA”.
Make sure you select this option. Then press the “OK” button.




Vincent Claes                2008                   Vincent Claes
We must recompile the VI because we made a change. Do this by
going to the “Project Explorer” view. Click with the “Right
Mouse button” on the FPGA VI you have created for this
project. Select the “Compile” option.




You will see that there are some previous explained steps
executed. When the “Successful Compile Report” shows up you
have to press the “OK” button. Now we will download it to the

Vincent Claes               2008                   Vincent Claes
Flash. For this you have to go to the “Project Explorer” view
and do a “right mouse click” on the FPGA VI you created. Then
choosing the “Download VI to Flash Memory” option will start
downloading it to the Spartan-3E starter board flash.




When this box appears the LabVIEW FPGA VI is downloaded to the
Flash.




Now you can pull out the USB cable out of the Xilinx Spartan3E
board and press the PROG button on this board. You will see
that the function is implemented in it.


Enjoy.

Vincent Claes
XIOS Hogeschool Limburg
Department of Industrial Sciences and Technology
Universitaire Campus - Agoralaan – Gebouw H
B-3590 Diepenbeek
Belgium
vincent.claes@xios.be
tel.:    +32 11 26 00 39
fax:     +32 11 26 00 54
mobile: +32 478 35 38 49



Vincent Claes                2008                   Vincent Claes

More Related Content

Similar to Lab Implementation of Boolean logic in LabVIEW FPGA

Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter board
Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter boardLab: Installation of Xilkernel on Xilinx Spartan 3E Starter board
Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter boardVincent Claes
 
Presentation fpgakit
Presentation fpgakitPresentation fpgakit
Presentation fpgakitaroosa khan
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformJean-Michel Bouffard
 
Xilinx ISE introduction Tutorial #1
Xilinx ISE introduction Tutorial #1Xilinx ISE introduction Tutorial #1
Xilinx ISE introduction Tutorial #1guest1e88645e
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxransayo
 
Z turn Board Tutorial Book
Z turn Board Tutorial BookZ turn Board Tutorial Book
Z turn Board Tutorial BookLinda Zhang
 
Pic programming gettingstarted
Pic programming gettingstartedPic programming gettingstarted
Pic programming gettingstartedAjit Padmarajan
 
How To make your own Robot And control it using labview
How To make your own Robot And control it using labviewHow To make your own Robot And control it using labview
How To make your own Robot And control it using labviewAymen Lachkhem
 
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docx
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docxEXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docx
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docxssuser454af01
 
A Long-Awaited Check of Unreal Engine 4
A Long-Awaited Check of Unreal Engine 4A Long-Awaited Check of Unreal Engine 4
A Long-Awaited Check of Unreal Engine 4Andrey Karpov
 
ScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClipScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClipDavid Dryden
 
Cnc 3axis-shield
Cnc 3axis-shieldCnc 3axis-shield
Cnc 3axis-shieldhandson28
 
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfAdvanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfWiseNaeem
 

Similar to Lab Implementation of Boolean logic in LabVIEW FPGA (20)

Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter board
Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter boardLab: Installation of Xilkernel on Xilinx Spartan 3E Starter board
Lab: Installation of Xilkernel on Xilinx Spartan 3E Starter board
 
Gwt portlet
Gwt portletGwt portlet
Gwt portlet
 
Z stick 7 user guide
Z stick 7 user guideZ stick 7 user guide
Z stick 7 user guide
 
Os Selbak
Os SelbakOs Selbak
Os Selbak
 
Xilinx verilog tutorial
Xilinx verilog tutorialXilinx verilog tutorial
Xilinx verilog tutorial
 
Presentation fpgakit
Presentation fpgakitPresentation fpgakit
Presentation fpgakit
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
Xilinx ISE introduction Tutorial #1
Xilinx ISE introduction Tutorial #1Xilinx ISE introduction Tutorial #1
Xilinx ISE introduction Tutorial #1
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
Picaxe manual5
Picaxe manual5Picaxe manual5
Picaxe manual5
 
Z turn Board Tutorial Book
Z turn Board Tutorial BookZ turn Board Tutorial Book
Z turn Board Tutorial Book
 
Pic programming gettingstarted
Pic programming gettingstartedPic programming gettingstarted
Pic programming gettingstarted
 
How To make your own Robot And control it using labview
How To make your own Robot And control it using labviewHow To make your own Robot And control it using labview
How To make your own Robot And control it using labview
 
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docx
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docxEXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docx
EXPRESS PCB TUTORIAL Author Lee Morey Revised JE Feb 2.docx
 
A Long-Awaited Check of Unreal Engine 4
A Long-Awaited Check of Unreal Engine 4A Long-Awaited Check of Unreal Engine 4
A Long-Awaited Check of Unreal Engine 4
 
Lab1 introduction
Lab1 introductionLab1 introduction
Lab1 introduction
 
ScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClipScratchGPIO, Raspberry Pi & BerryClip
ScratchGPIO, Raspberry Pi & BerryClip
 
html
htmlhtml
html
 
Cnc 3axis-shield
Cnc 3axis-shieldCnc 3axis-shield
Cnc 3axis-shield
 
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfAdvanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
 

More from Vincent Claes

Percepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDPercepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDVincent Claes
 
Xilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldXilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldVincent Claes
 
Programming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKProgramming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKVincent Claes
 
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockDebugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockVincent Claes
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sVincent Claes
 
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Vincent Claes
 
Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot PythonVincent Claes
 
Installation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopInstallation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopVincent Claes
 
ZYNQ BRAM Implementation
ZYNQ BRAM ImplementationZYNQ BRAM Implementation
ZYNQ BRAM ImplementationVincent Claes
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceVincent Claes
 
Launching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT ProjectsLaunching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT ProjectsVincent Claes
 
Real Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMReal Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMVincent Claes
 
R Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleR Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleVincent Claes
 
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadUsing Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadVincent Claes
 
Hogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorHogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorVincent Claes
 
Softcore vs Hardcore processor
Softcore vs Hardcore processorSoftcore vs Hardcore processor
Softcore vs Hardcore processorVincent Claes
 
Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...Vincent Claes
 

More from Vincent Claes (20)

Percepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDPercepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZED
 
Xilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldXilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello World
 
Programming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKProgramming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDK
 
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockDebugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
 
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
 
Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot Python
 
Installation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopInstallation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python Workshop
 
ZYNQ BRAM Implementation
ZYNQ BRAM ImplementationZYNQ BRAM Implementation
ZYNQ BRAM Implementation
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud Service
 
Launching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT ProjectsLaunching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT Projects
 
Real Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMReal Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARM
 
R Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleR Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by Example
 
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadUsing Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
 
Hogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorHogeschool PXL Smart Mirror
Hogeschool PXL Smart Mirror
 
Softcore vs Hardcore processor
Softcore vs Hardcore processorSoftcore vs Hardcore processor
Softcore vs Hardcore processor
 
MySQL / PHP Server
MySQL / PHP ServerMySQL / PHP Server
MySQL / PHP Server
 
Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...
 
fTales workshop
fTales workshopfTales workshop
fTales workshop
 
Maker Revolution
Maker RevolutionMaker Revolution
Maker Revolution
 

Recently uploaded

IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsDianaGray10
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechProduct School
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud DataEric D. Schabell
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4DianaGray10
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 

Recently uploaded (20)

IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 

Lab Implementation of Boolean logic in LabVIEW FPGA

  • 1. Lab 1: Implementing a Boolean function in LabVIEW FPGA on the Xilinx SPARTAN-3E Board Keywords: LabVIEW, LabVIEW FPGA, Xilinx SPARTAN3E Starter Kit, Implementing a Boolean Function. Vincent Claes 2008 Vincent Claes
  • 2. Introduction Welcome to Lab1 in the serie of programming a SPARTAN3E Starter Kit by use of LabVIEW FPGA. These labs are created by Vincent Claes. If you encounter problems using this labs or want some advice/consultancy on LabVIEW and especially LabVIEW FPGA you can always contact the author. These labs are free to use however to show respect to the author please email him when you use them with your contact details (feedback is also welcome). Contact Information: Vincent Claes claesvincent@gmail.com http://www.linkedin.com/in/vincentclaes Software Requirements: • LabVIEW 8.5 or above • LabVIEW 8.5 FPGA module • XUP Spartan3E starter board: download for free from: https://lumen.ni.com/nicif/us/infolvfpgaxilsprtn/content. xhtml Hardware Requirements: • Xilinx Spartan3E Starter kit: http://www.xilinx.com/products/devkits/HW-SPAR3E-SK-US- G.htm • User manual: www.xilinx.com/support/documentation/boards_and_kits/ug23 0.pdf Getting Started When you want to use this labs you have to setup your board. This labs are written for the Xilinx SPARTAN3E Starter Kit so it is quite interesting to read the user manual of the board. Be sure to plug in the USB cable, plug in the Power cord and Switch the board on before starting the lab. Vincent Claes 2008 Vincent Claes
  • 3. Step 1: Starting LabVIEW The first step is to start the National Instruments LabVIEW 8.5 environment. Step 2: Create a LabVIEW project After we have started the LabVIEW environment we get the following screen: We have to create an Empty Project where we will add the Xilinx Spartan3E starter board on as a hardware target. In a future lab I will explain how we can create a HOST vi (this is a LabVIEW application that runs on a desktop PC) that communicates with a LabVIEW FPGA vi. Vincent Claes 2008 Vincent Claes
  • 4. Step 3: Add the Spartan3E board as a hardware target The next screen shows the Project Explorer view of the Empty Project that we just created. Now we have to add the Spartan3E starter board as a Hardware target. For this we do a “right click” on “My Computer” in the Project Explorer view. We select “New” and then “Targets and Devices”. In the screen that now appears we have to select the XUP starter board. Select “New target or device”. A list of “Targets and Devices” will be shown. You have to scroll down till the end and select “Spartan-3E Starter board” from the “Xilinx university Program” map. Vincent Claes 2008 Vincent Claes
  • 5. This will add the FPGA Target to the Project Explorer view. You see this target is placed under “My Computer”. Step 4: Adding FPGA I/O The next step we make is adding “FPGA I/O’s” that we will use in this project to the Project Explorer view. For this you have to “right click” the FPGA Target you added in Step 3. Select “New” “FPGA I/O”. The next screen will appear Vincent Claes 2008 Vincent Claes
  • 6. On the left side of this screen you see all the resources that are available on the Spartan-3E board. To add FPGA I/O to the project you have to select it in the left window and press the “Add” button. Now the FPGA I/O that you wanted to add has to show up in the window on the right side. For this project you have to add SW0, SW1 and LED0 to the project. If we go back to the “Project Explorer” view we see the FPGA I/O that we have added. With this I/O we will implement an Exclusive-OR function. Vincent Claes 2008 Vincent Claes
  • 7. Step 5: Creation of the FPGA VI The next step is the creation of a hardware program that runs on the Xilinx Spartan-3E hardware target. For this we do again a “right mouse click” on the FPGA target in the “Project Explorer” view. Select “New” VI. Be sure that you have right clicked the FPGA target and not “My Computer” because otherwise you will be creating a vi that runs not in Hardware (on the FPGA) but on your computer. This step will open the Front Panel and Block Diagram of the FPGA VI you just started creating. The code we will be implementing is an Exclusive-OR function. The view I always use in LabVIEW is the “tile left and right” view. You can select this by going to “Window” and then selecting “Tile Left and Right”. We you did all the steps right you have to see in the left corner of either the Front Panel or Block Diagram the name of the vi you created with /FPGA target behind it. This shows that the vi you are creating is aimed at the FPGA target. Vincent Claes 2008 Vincent Claes
  • 8. For now have a look at the “Functions Palette” which you can see when you click in the “Block Diagram” on “View” and then “Functions Palette”. You see that the available functions are different. You see “FPGA I/O”, “Memory & Fifo” and “FPGA Math & Analysis”. Those are specially for using on FPGA targets. Click in the Functions Palette on “FPGA I/O”. Place 2 I/O Nodes on the Block Diagram of the LabVIEW FPGA vi. Vincent Claes 2008 Vincent Claes
  • 9. Now do a “right mouse click” on one of the I/O Nodes. Select “Select FPGA I/O” then “Slide Switches” then “SW0”. You should see that the I/O node is filled with a green “SW0” label. The color green is standing for a Boolean variable. This is correct since a slider switch can only have the value of true or false. This project will be using 2 slider switches so we have to add another FPGA I/O. For this do a right click on the FPGA I/O you just filled with SW0. Select “Add Element”. Vincent Claes 2008 Vincent Claes
  • 10. The following is the screen you should have now: Try now to fill the I/O Item yourself with SW1. Try also to fill the I/O Node that is empty with LED0. This is done by right mouse clicking it then selecting “Select FPGA I/O”. In the option of “Select FPGA I/O” you see only the resources you added in the “Project Explorer” view to the project. The following screen will be created: Now we will as an example implement an exclusive-OR Boolean function into the FPGA. From the “Functions Palette” select “Programming” “Boolean” and look for the “Exclusive Or” function. Place this one on the Block diagram. Vincent Claes 2008 Vincent Claes
  • 11. Wire the “SW1” and “SW0” FPGA I/O to the Exclusive-OR inputs. Wire the output of the function to “LED0”. Your code has to look like this: When you implement the function like presented above the function will run only once. We would like to implement it that it runs continuously. For this we place a “While Loop” around it and we wire a Boolean “False constant” to the “stop condition” of this loop. This you normally don’t do on a PC because this will put your PC in a never ending loop. The “While Loop” you find on the “Functions Palette”. Vincent Claes 2008 Vincent Claes
  • 12. Now it is time to save your vi that you created for the FPGA. You do this by selecting “New” “Save As” in either the “Front Panel” or the “Block Diagram”. The name I usually use is FPGA_VI for the vi running on the FPGA. Vincent Claes 2008 Vincent Claes
  • 13. In “Project Explorer” you should see the following It is also a good idea to save the project file for this select in the “Project Explorer” “New” then “Save As”. I did use the name Lab1_BooleanLogic Vincent Claes 2008 Vincent Claes
  • 14. Step 5: Running the FPGA VI This step is where we created the vi for. We designed it to run on an target. For starting the executing of this vi we have to press the “Run” arrow on either the “Block Diagram” or on the “Front Panel”. The first step LabVIEW does is “Generating Intermediate Files”. This files will be send to the Xilinx Synthesis Tools. But this is not important for us as application developers. Vincent Claes 2008 Vincent Claes
  • 15. In this step you see that LabVIEW is starting the “Compile Server”. This “Compile Server” can also be executed on another “more powerful” machine that is in your network (for this please see the information on the NI website. Vincent Claes 2008 Vincent Claes
  • 16. When the “Bitstream generation is complete” message appears and the server status is set to “Idle…” the Xilinx synthesis tools have done their job. You get a “Successful Compile Report” where you can see the implementation details of your code. You have to Press “Ok”. Vincent Claes 2008 Vincent Claes
  • 17. After you have pressed the “Ok” button your VI starts running on the FPGA target. It is indicated on your screen by the black “Run” arrow. Try to play with the switches SW0 and SW1 on the Spartan3E starter board you will see they have an XOR function; the led LD0 will be on when one of those switches is turned on. The problem with this implementation is that when you stop the VI the function is erased on the LabVIEW FPGA board. If you don’t want this effect you can download this VI to the FLASH of the Xilinx Spartan3E starter board (see next step). Vincent Claes 2008 Vincent Claes
  • 18. Step 6: Implementing the LabVIEW VI into Flash For implementing your VI into the Flash on the Spartan3E Starter board you have to do some things. The first thing is setting the option of “Run when loaded to FPGA” on. For this you have to go to “Project Explorer”. Then “Right Mouse click” on your FPGA target. Select the “Properties” option. In this screen you see the option “Run when loaded to FPGA”. Make sure you select this option. Then press the “OK” button. Vincent Claes 2008 Vincent Claes
  • 19. We must recompile the VI because we made a change. Do this by going to the “Project Explorer” view. Click with the “Right Mouse button” on the FPGA VI you have created for this project. Select the “Compile” option. You will see that there are some previous explained steps executed. When the “Successful Compile Report” shows up you have to press the “OK” button. Now we will download it to the Vincent Claes 2008 Vincent Claes
  • 20. Flash. For this you have to go to the “Project Explorer” view and do a “right mouse click” on the FPGA VI you created. Then choosing the “Download VI to Flash Memory” option will start downloading it to the Spartan-3E starter board flash. When this box appears the LabVIEW FPGA VI is downloaded to the Flash. Now you can pull out the USB cable out of the Xilinx Spartan3E board and press the PROG button on this board. You will see that the function is implemented in it. Enjoy. Vincent Claes XIOS Hogeschool Limburg Department of Industrial Sciences and Technology Universitaire Campus - Agoralaan – Gebouw H B-3590 Diepenbeek Belgium vincent.claes@xios.be tel.: +32 11 26 00 39 fax: +32 11 26 00 54 mobile: +32 478 35 38 49 Vincent Claes 2008 Vincent Claes