Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
test-and-measurement:analog-discovery-pro-3x50:programming-an-fpga [2022/09/08 20:47] – changed forum.digilentinc.com to forum.digilent.com Jeffreytest-and-measurement:analog-discovery-pro-3x50:programming-an-fpga [2023/10/18 19:22] (current) Alyssa Holzer
Line 1: Line 1:
 +====== Programming an FPGA Board with the Analog Discovery Pro (ADP3450/ADP3250) ======
 +
 +<WRAP group>
 +There might be cases when you need to provide a complex stimulus to a circuit, or you might want to condition digital signals before measurement, in both cases using an FPGA board can be handy. However, FPGA boards are usually configured from a PC, so including them in a standalone measurement system might not have been an option until now.
 +
 +This guide walks you through the steps required to use the Analog Discovery Pro to load a previously-created bit file to your Digilent FPGA board.
 +</WRAP>
 +
 +===== Inventory =====
 +<WRAP group><WRAP half column>
 +=== Hardware ===
 +  * [[test-and-measurement:analog-discovery-pro-3x50:start|]]
 +  * a [[https://digilent.com/shop/boards-and-components/system-boards/fpga-boards/|Digilent FPGA Board]]
 +  * a FAT/FAT32 formatted USB drive
 +</WRAP><WRAP half column>
 +=== Software ===
 +  * [[https://lp.digilent.com/complete-adept-utilities-download|Adept Utilities]] for Linux ARM-Raspberry Pi
 +  * [[https://ttssh2.osdn.jp/index.html.en|Tera Term]], or any other terminal emulator of your choice
 +</WRAP></WRAP>
 +
 +You will also need a bit file to load onto the FPGA board.
 +----
 +===== Installing the Adept Utilities =====
 +<WRAP group>
 +<WRAP group><WRAP half column>
 +Download and copy the [[https://lp.digilent.com/complete-adept-utilities-download|Adept Utilities]] to the USB flash drive. Select **Linux ARM-Raspberry Pi** as the operating system.
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-3x50:downloading_adept.png?600 |}}
 +</WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Copy your bit file to the USB flash drive as well, then insert the drive into the back of the Analog Discovery Pro.
 +
 +Open the terminal emulator on your PC and connect to the ADP. Find the USB device path. It should look like /dev/sd<drive letter><partition number>. This guide will use /dev/sda1 in its text and images, and care must be taken to match the drive letter and partition number of your USB drive.
 +<code>sudo fdisk -l</code>
 +
 +Make the drive contents accessible by entering the following command:
 +<code>sudo mount /dev/sda1 /mnt</code>
 +
 +Navigate to the USB's directory:
 +<code>cd /mnt</code>
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-3x50:mounting_usb.png?600 |}}
 +</WRAP></WRAP>
 +
 +<WRAP group>
 +Now install the Adept Utilities with:
 +<code>sudo dpkg -i digilent.adept.utilities_2.4.1-armhf.deb</code>
 +Don't forget to change the name of the file according to the downloaded program version.
 +</WRAP>
 +</WRAP>
 +----
 +===== Loading the Bit File =====
 +<WRAP group>
 +<WRAP group><WRAP half column>
 +Plug your Digilent FPGA board's USB programming port (typically labeled PROG) into the back of the Analog Discovery Pro, then list the available devices by typing the following command:
 +<code>djtgcfg enum</code>
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-3x50:djtgcfg_enum.png?600 |}}
 +</WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Find the programmable JTAG devices (FPGA chip) by typing:
 +<code>djtgcfg init -d <DeviceName></code>
 +
 +Don't forget to change the device name according to your board. In this case, the device name is CmodS6.
 +
 +In this case, there is only one programmable chip, with index 0. If your board contains more JTAG devices, note the index of the one you want to upload the bit file to.
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-3x50:djtgcfg_init.png?600 |}}
 +</WRAP></WRAP>
 +
 +<WRAP group><WRAP half column>
 +Finally program your board by typing:
 +<code>djtgcfg prog -d <DeviceName> -i <index> -f <FileName></code>
 +
 +Don't forget to change the device name, scan chain index and the file name according to your board and bit file.
 +</WRAP><WRAP half column>
 +{{ :test-and-measurement:analog-discovery-pro-3x50:djtgcfg_prog.png?600 |}}
 +</WRAP></WRAP>
 +</WRAP>
 +
 +===== Next Steps =====
 +<WRAP group>
 +For more guides and example projects for the Analog Discovery Pro, check out its [[start|Resource Center]].
 +
 +For technical support, please visit the [[https://forum.digilent.com|Digilent Forum]].
 +</WRAP>