Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:programmable-logic:tutorials:program_fpgas_through_multisim:start [2017/05/03 21:02] brandon marcumlearn:programmable-logic:tutorials:program_fpgas_through_multisim:start [2022/09/12 14:18] (current) – changed forum.digilentinc.com to forum.digilent.com Jeffrey
Line 1: Line 1:
 ====== Programming Digilent FPGA Boards Through Multisim ====== ====== Programming Digilent FPGA Boards Through Multisim ======
-{{https://cdn.instructables.com/FJA/YORC/J1QP1570/FJAYORCJ1QP1570.MEDIUM.jpg}}+
  
 ===== Overview ===== ===== Overview =====
Line 9: Line 9:
 ====Hardware==== ====Hardware====
 You will need one of Digilent's FPGA trainer boards built around the Artix-7 chip. You will need one of Digilent's FPGA trainer boards built around the Artix-7 chip.
-  *[[http://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/|Basys 3]] +  *[[https://digilent.com/shop/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/|Basys 3]] 
-  *[[http://store.digilentinc.com/arty-artix-7-fpga-development-board-for-makers-and-hobbyists/|Arty]] +  *[[https://digilent.com/shop/arty-a7-artix-7-fpga-development-board/|Arty]] 
-  *[[http://store.digilentinc.com/cmod-a7-breadboardable-artix-7-fpga-module/|CMOD A7]] +  *[[https://digilent.com/shop/cmod-a7-breadboardable-artix-7-fpga-module/|CMOD A7]] 
-  *[[http://store.digilentinc.com/nexys-4-artix-7-fpga-trainer-board-limited-time-see-nexys4-ddr/|Nexys 4]] +  *[[https://digilent.com/shop/nexys-4-artix-7-fpga-trainer-board/|Nexys 4]] 
-  *support for the Nexys 4 DDR is currently in progress.+  *[[https://digilent.com/shop/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/|Nexys 4 DDR]] 
 + 
 +Note that in order to fully utilize the capabilities of the Basys 3 and Nexys 4 DDR, there are some configuration file changes that need to be made. Please see [[#some_notes_about_configuration_files|step 5]] below for more information on that.
  
 ====Software==== ====Software====
-  * [[http://store.digilentinc.com/labview-home-bundle/NI |LabVIEW 2014 or higher]] Click [[http://www.ni.com/labview/|here]] for more LabVIEW info and to downlaod from NI. +  * [[https://www.ni.com/en-us/support/downloads/software-products/download.labview.html |LabVIEW 2020 or higher]] Click [[http://www.ni.com/labview/|here]] for more LabVIEW info and to download from NI. 
-  * [[http://store.digilentinc.com/ni-multisim-student-edition-circuit-design-and-simulation-software|NI Multisim 14.0 or higher]] Click [[http://www.ni.com/multisim/|here]] for more Multisim info and to download from NI+  * [[https://digilent.com/shop/ni-multisim-student-edition-circuit-design-and-simulation-software|NI Multisim Student Edition]] or [[https://www.ni.com/ro-ro/support/downloads/software-products/download.multisim.html#312060|Education Edition]]. 
-  * [[https://www.xilinx.com/support/download.html|Xilinx Vivado 2014.4 or higher]] +  * Xilinx Vivado version 2019.1 
-  * [[http://www.ni.com/download/labview-fpga-module-2015-sp1/5920/en/|NI LabVIEW FPGA Vivado 2014.4]]. This is the tool that connects LabVIEW to Vivado. Instructions for installing this tool are below.+  * [[https://www.ni.com/en-us/support/downloads/software-products/download.labview-fpga-compilation-tool.html#345610|NI LabVIEW FPGA Compilation Tool for Vivado 2019.1]]. This is the tool that connects LabVIEW to Vivado. Instructions for installing this tool are below.
      
 Install each program, starting with LabVIEW and following the on screen prompts. Make sure that each is running properly before continuing. Double check that all programs were installed to the same root directory. On some Windows machines, LabVIEW installs to "C:\Program Files" by default, not "C:\Program Files(x86)." Install each program, starting with LabVIEW and following the on screen prompts. Make sure that each is running properly before continuing. Double check that all programs were installed to the same root directory. On some Windows machines, LabVIEW installs to "C:\Program Files" by default, not "C:\Program Files(x86)."
Line 27: Line 29:
  
 =====Tutorial===== =====Tutorial=====
-====1. Installing the LabVIEW/Vivado Tool==== +====1. Installing the LabVIEW FPGA Compilation Tool for Vivado==== 
-Click on the link above to navigate to the download page for the tool module. You'll see two options.+Click on the link above to navigate to the download page for the tool module. You'll see the following.
  
-{{https://www.instructables.com/files/orig/F6M/FCIH/J282U6J6/F6MFCIHJ282U6J6.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:lvfpga_download.png?nolink&600|}}
  
-The recommended "NI Download Manager" option installs a small downloader program that will then download the installerThe "Browser Download" option downloads the installer as a *.iso image filewhich will then auto-mount itself in your CD/DVD-ROM drive if you have one. Pick either one.+Your downloaded software is delivered using the NI Package Manager. After the download is completeNI Package Manager launches and you can start installing the software
  
-If the *.iso file does not auto-mount then double click on it to open it from your default Downloads folder. Double click on Setup.+First, read and accept the license agreementsThen, click on "Next".
  
-{{https://cdn.instructables.com/ORIG/FZ7/JB1M/J1MEW8KX/FZ7JB1MJ1MEW8KX.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:lvfpga1.png?nolink&600|}}
  
-Click on "Next" and then enter the serial number that came with your LabVIEW install materials.+The package manager will display information regarding the software being installed. Click "Next".
  
-{{https://cdn.instructables.com/ORIG/FLQ/WY0Y/J1MEW8LE/FLQWY0YJ1MEW8LE.png}} +{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:lvfpga2.png?nolink&600|}}
- +
-The software will do a quick search for any updates. Accept any that show up then click "Next"+
- +
-{{https://cdn.instructables.com/ORIG/F6H/0T47/J1MEW8LF/F6H0T47J1MEW8LF.png}} +
- +
-Accept the 3 License Agreements and click "Next"+
- +
-{{https://cdn.instructables.com/ORIG/FYT/VYZ8/J1MEW8LH/FYTVYZ8J1MEW8LH.png}}+
  
 Click "Next" again to begin installation. Click "Next" again to begin installation.
  
-{{https://cdn.instructables.com/ORIG/FSO/7KY9/J1MEW8M0/FSO7KY9J1MEW8M0.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:lvfpga3.png?nolink&600|}}
  
 Get some popcorn, watch a movie, take a nap, grow some roses, etc. while you watch the progress bar. Get some popcorn, watch a movie, take a nap, grow some roses, etc. while you watch the progress bar.
  
-{{https://cdn.instructables.com/ORIG/FYU/LBPF/J1MEW8M4/FYULBPFJ1MEW8M4.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:lvfpga4.png?nolink&600|}}
  
 Once the install is complete, be sure to restart your computer. Once the install is complete, be sure to restart your computer.
  
-After restarting, navigate to "C:\NIFPGA\programs\Vivado2014_4\data\xicom\cable_drivers\nt64\digilent" on your hard drive and run the "install_digilent.exe" file. This will install Digilent Adept, if needed. Follow the onscreen prompts to complete the install.+After restarting, navigate to "C:\NIFPGA\programs\Vivado2019_1\data\xicom\cable_drivers\nt64\digilent" on your hard drive and run the "install_digilent.exe" file. This will install Digilent Adept, if needed. Follow the onscreen prompts to complete the install.
  
-{{https://cdn.instructables.com/ORIG/F64/YG2G/J1MEW8M6/F64YG2GJ1MEW8M6.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:adept_path.png?nolink&600|}}
  
 Now that all of the correct programs and associated files are installed, let's get to programming some logic. Now that all of the correct programs and associated files are installed, let's get to programming some logic.
Line 173: Line 167:
 {{https://cdn.instructables.com/ORIG/FLG/MB0N/J1QOY1V8/FLGMB0NJ1QOY1V8.png}} {{https://cdn.instructables.com/ORIG/FLG/MB0N/J1QOY1V8/FLGMB0NJ1QOY1V8.png}}
  
-In the next window be sure that the "NI LabVIEW FPGA" tool option is highlighted in the box. Click "Finish" at the bottom to program the FPGA. I also tried using the "Xilinx Vivado 2016.4" option and it worked fine.+In the next window be sure that the "NI LabVIEW FPGA" tool option is highlighted in the box. Click "Finish" at the bottom to program the FPGA.
  
-{{https://cdn.instructables.com/ORIG/F4C/E7YF/J1QOY1VD/F4CE7YFJ1QOY1VD.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:pld_export_new.png?nolink&600|}}
  
 Multisim will then connect to Vivado to generate the correct files it needs to program the board. This may take several minutes. Once the 4 steps are complete, your board is programmed and ready. Multisim will then connect to Vivado to generate the correct files it needs to program the board. This may take several minutes. Once the 4 steps are complete, your board is programmed and ready.
  
-{{https://cdn.instructables.com/ORIG/FQ3/X2LD/J1QOY1VE/FQ3X2LDJ1QOY1VE.png}}+{{:learn:programmable-logic:tutorials:program_fpgas_through_multisim:pld_export_new2.png?nolink&600|}}
  
 Here is my Basys 3 with the Full Adder circuit loaded. Here is my Basys 3 with the Full Adder circuit loaded.
Line 185: Line 179:
 {{https://www.instructables.com/files/orig/FBB/MX7U/J1QP0ZAU/FBBMX7UJ1QP0ZAU.gif}} {{https://www.instructables.com/files/orig/FBB/MX7U/J1QP0ZAU/FBBMX7UJ1QP0ZAU.gif}}
  
-====5. Modifying Configuration Files==== +====5. Some Notes About Configuration Files==== 
-In working on this document I found small discrepancy in the Basys 3 configuration files that are packaged with Multisim when you install it. When you open a new PLD project in Multisim and select the Basys 3 as your target board, there are several I/O options that are missing. Specifically, the definitions for the VGA, RS-232, USB HID(PS/2), and quad SPI flash are all missing.+Multisim uses configuration files to communicate between Multisim and Vivado. Each board requires two, one as a .mspc file and the other as either .ucf or as .xdc. If you have either the Basys 3 or the Nexys 4 DDR (not the original Nexys 4) there are some files that are either missing or incomplete, so here is a quick walkthrough on how to add and/or modify them. If you are using any other board, you can skip this step. 
 + 
 +For the Nexys 4 DDR, first be sure that Multisim is not running. Then download [[https://www.instructables.com/files/orig/FT8/OGWW/J2QF343L/FT8OGWWJ2QF343L.mspc|DigilentNexys4DDR.mspc]] and [[https://www.instructables.com/files/orig/FLC/2G8A/J2QF34CS/FLC2G8AJ2QF34CS.xdc|DigilentNexys4DDR.xdc]]. Next, navigate to the Multisim directory where the configuration files are stored. The path name should be something similar to "C:\Program Files (x86)\National Instruments\Circuit Design Suite 14.2\pldconfig". Once there, move the two downloaded files into this folder. Open Multisim and program project to your Nexys 4 DDR as outlined in the previous steps. 
 + 
 +The Basys 3 configuration files that are packaged with Multisim when you install it are missing some definitionsIf you simply want to download the correct versions and overwrite the existing files, download [[https://www.instructables.com/files/orig/F8P/TF5E/J2QF3BBZ/F8PTF5EJ2QF3BBZ.mspc|DigilentBasys3.mspc]] and [[https://www.instructables.com/files/orig/F6G/UDB9/J2QF3BEF/F6GUDB9J2QF3BEF.xdc|DigilentBasys3.xdc]]. Navigate to the Multisim directory as noted above and overwrite the existing two Basys 3 files. If you want to go through the process of modifying the files, continue reading. 
 + 
 +When you open a new PLD project in Multisim and select the Basys 3 as your target board, there are several I/O options that are missing. Specifically, the definitions for the VGA, RS-232, USB HID(PS/2), and quad SPI flash are all missing.
  
 {{https://www.instructables.com/files/orig/FYA/4EWK/J26F107R/FYA4EWKJ26F107R.png}} {{https://www.instructables.com/files/orig/FYA/4EWK/J26F107R/FYA4EWKJ26F107R.png}}
  
-In order to fix this, we need to modify these installed configuration files. To find them, first make sure that Multisim is not running, then navigate to the root directory for Multisim. The file path should be similar to "C:\Program Files (x86)\National Instruments\Circuit Design Suite 14.1\pldconfig". Find the two files labeled "DigilentBasys3". One file has a .xdc extension, the other has a .mspc extension.+In order to fix this, we need to modify these installed configuration files. To find them, first make sure that Multisim is not running, then navigate to the root directory for Multisim. The file path should be similar to "C:\Program Files (x86)\National Instruments\Circuit Design Suite 14.2\pldconfig". Find the two files labeled "DigilentBasys3". One file has a .xdc extension, the other has a .mspc extension.
  
 {{https://www.instructables.com/files/orig/FVQ/SPMS/J26F10D3/FVQSPMSJ26F10D3.png}} {{https://www.instructables.com/files/orig/FVQ/SPMS/J26F10D3/FVQSPMSJ26F10D3.png}}
Line 200: Line 200:
 {{https://www.instructables.com/files/orig/FZI/M56X/J26F12OW/FZIM56XJ26F12OW.png}} {{https://www.instructables.com/files/orig/FZI/M56X/J26F12OW/FZIM56XJ26F12OW.png}}
  
-There is no need to modify any of the data in the top section. The portion we are concerned with is all the data between the +There is no need to modify any of the data in the top section. The portion we are concerned with is all the data between the <pins> tags. Each I/O pin definition requires a few basic parameters to define it. The "Name" should match the pin name that is found in the .xdc file (more on that in a bit). The "Mode" determines whether the pin is defined as an input ("in"), output ("out"), or bidirectional pin ("bidir"). "Location" tells Multisim on which side of the canvas the pin should be placed by default. Inputs are normally on the left, while outputs are normally on the right. The "Place" option is simply a boolean valued flag that tells Multisim whether to have that I/O pin selected by default when you first select your I/O pins. Scroll back up two images and note the check marks in the boxes. These are the pins selected by default.
- +
-tags. Each I/O pin definition requires a few basic parameters to define it. The "Name" should match the pin name that is found in the .xdc file (more on that in a bit). The "Mode" determines whether the pin is defined as an input ("in"), output ("out"), or bidirectional pin ("bidir"). "Location" tells Multisim on which side of the canvas the pin should be placed by default. Inputs are normally on the left, while outputs are normally on the right. The "Place" option is simply a boolean valued flag that tells Multisim whether to have that I/O pin selected by default when you first select your I/O pins. Scroll back up two images and note the check marks in the boxes. These are the pins selected by default.+
 You are welcome to add the missing pins on your own as needed, or you can copy and paste the definitions found here. You are welcome to add the missing pins on your own as needed, or you can copy and paste the definitions found here.
 <code> <code>
Line 307: Line 305:
 {{https://www.instructables.com/files/orig/FNY/B7WY/J26F14NS/FNYB7WYJ26F14NS.png}} {{https://www.instructables.com/files/orig/FNY/B7WY/J26F14NS/FNYB7WYJ26F14NS.png}}
  
-If you have any problems with this process, feel free to post your questions to the [[https://forum.digilentinc.com/forum/4-fpga/|Digilent forum]].+If you have any problems with this process, feel free to post your questions to the [[https://forum.digilent.com/forum/4-fpga/|Digilent forum]].
  
-{{tag>learn programmable-logic tutorial multisim-fpga}}+{{tag>learn programmable-logic tutorial multisim-fpga demo-projects arty cmod-a7 nexys-4 nexys-4-ddr}}