Adding Digilent FPGA Boards to Multisim
This guide will provide a step by step tutorial of how to add a Digilent FPGA board to Multisim. To program your FPGA board through Multisim, follow this guide:Programming Digilent FPGA Boards Through Multisim.
Prerequisites
-
Multisim Educationversion 14.2 or higher
-
Your favorite text editor
-
-
Only needed for compiling, projects for boards not included originally in Multisim, can't be compiled by LabVIEW FPGA Compilation Tools.
-
-
-
Optional: Can be used to determine your board's FPGA part.
-
Note:This same process can be applied to earlier FPGA boards, but instead of Vivado,Xilinx ISEis required. This tutorial will only focus on utilizing Vivado.
Creating and Editing the Configuration Files
Download the Constraints File
电路仿真需要两个特定配置文件the chosen FPGA board. These two are an*.xdcand a*.mspcfile. The xdc file is called a constraints file (standing for Xilinx Design Constraints) and contains the location constraints assigning physical FPGA chip pins to port names in HDL code. You can also think of this file like the name definitions for physical pins, so later, in your “code” you only have to use the name, not the pin number. For more information on constraints files, read:What is a Constraints File?.
For Digilent boards, you can find the xdc file specific to your board on the board's resource center, or, for all boards actively supported in Vivado, in thedigilent-xdcrepository on Github. You can get a ZIP file containing all of the most recent versions of the XDC files in digilent-xdc here:master.zip. Download the file for your board.
Note:In this guide, an Arty-S7-50 will be used.
Note:If you are using an earlier board, compatible with Xilinx ISE, instead of the xdc file, you will need a*.ucffile.
Create the Configuration File
Open the downloaded constraints file in a text editor, then create an empty file with the same base name and the*.mspcextension (replacing the “.xdc”). This file will contain the available pins in Multisim PLD design.
First, create the header and the “body” of the file. The language is similar toHTML, and is easily readable. For the file to be compatible with your board, you will have to change theName,零件编号,BoardName,Family,Device,Package, andUcffields. You can leave the other fields as they are.
Version ="1.0">Name ="Digilent Arty S7-50"零件编号="XC7S50"Version="1.0"OpVoltageInput="3.3"OpVoltageOutput="3.3"OpVoltageBidirectional="3.3"BoardId="">= "Digilent Arty S7-50">= "Xilinx"Family="Spartan-7"Device="XC7S50"Package="CSGA324"Speed="-1"DeviceOffset="1"DeviceId=""Ucf="Arty-S7-50-Master.xdc"/></DeviceList>< ProgrammingProperties>= "digilent_plugin"/></ProgrammingProperties>= "1"></Pins></Component></PLDConfiguration>
TheNameandBoardNamefields contain the name of the board. This is how the board will appear in Multisim.
The零件编号andDevicefields contain the name of the FPGA chip. This usually can be found in the board's Reference Manual, or you can find it by plugging in the board and startingAdept.
TheFamilyof the FPGA chip appears in the board's Reference Manual. In this case, a Spartan-7 FPGA is used.
TheUcffield contains the name of the xdc file.
The trickiest property is thePackage. You can check the Resource Center's feature list (linked from theProgrammable Logicpage of this site), search the Reference Manual for information about the package of the chip, or take a look on the chip itself or the sticker placed on the chip (the sticker might contain other information as well).
Modify the Constraints File
In the constraints file, uncomment the lines describing the resources you want to use by deleting the “#” mark at the beginning of each of the lines. Also change the name of these pins to names you can easily remember (the names shouldn't contain special characters).
Note:You can uncomment every resource, as long as there aren't any conflicts: shared pins for multiple resources, likeADCand digital I/O - conflicts are mentioned in the xdc file, in comments.
Fill in the Configuration File
The final step is to add the pins to Multisim, which can be done by adding the line below to the mspc file, for every pin.
Name ="pin_name"Mode="pin_mode"Location="pin_location"Place="pin_placed"/>
In the code snippet,pin_namemarks the name of the pin (which was set in the xdc file),pin_modemarks the mode in which the pin will be used (it can have the values“in”,“出去”, or“bidir”),pin_locationcan be“right”or“left”, depending on which part of the sheet you want to place the pin on (they can be moved freely later) andpin_placedmarks if the pin is selected by default or not (can have the values“1”or“0”).
Adding the Configuration Files to Multisim
To make your configuration files available for Multisim, copy both files to thepldconfigdirectory of Multisim. The default path of the directory is: “C:\Program Files (x86)\National Instruments\Circuit Design Suite 14.2\pldconfig”.
Open Multisim, start a new PLD design and select the FPGA board you created the configuration files for. After naming your project, you should be able to select the pins you want to use in your project.
Next Steps
To program your FPGA board through Multisim, follow this guide:Programming Digilent FPGA Boards Through Multisim.
If you have any problems with this process, feel free to post your questions to theDigilent Forum.