Differences

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

Link to this comparison view

Next revision
Previous revision
test-and-measurement:analog-discovery-pro-3x50:programming-an-fpga [2021/09/02 11:07] – created Álmos Veres-Vitályostest-and-measurement:analog-discovery-pro-3x50:programming-an-fpga [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Programming an FPGA Board with the Analog Discovery Pro (ADP3450/ADP3250) ====== ====== Programming an FPGA Board with the Analog Discovery Pro (ADP3450/ADP3250) ======
- 
-<WRAP center round todo 60%> 
-This page is under construction. 
-</WRAP> 
  
 <WRAP group> <WRAP group>
-This guide walks you through the steps required to load a previously created bit file to your Digilent FPGA board with the Analog Discovery Pro. Creating the bit file is out of the scopes of the current guide. +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> </WRAP>
----- 
  
 ===== Inventory ===== ===== Inventory =====
Line 21: Line 18:
   * [[https://ttssh2.osdn.jp/index.html.en|Tera Term]], or any other terminal emulator of your choice   * [[https://ttssh2.osdn.jp/index.html.en|Tera Term]], or any other terminal emulator of your choice
 </WRAP></WRAP> </WRAP></WRAP>
----- 
  
 +You will also need a bit file to load onto the FPGA board.
 +----
 ===== Installing the Adept Utilities ===== ===== Installing the Adept Utilities =====
 +<WRAP group>
 +<WRAP group><WRAP half column>
 +Download and copy the [[https://mautic.digilentinc.com/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.digilentinc.com|Digilent Forum]].
 +</WRAP>