Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

3 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

USB104A7 ZmodDAC Demo

Description

This project demoinstrates how to use the ZmodDAC with the USB104A7 board. This demo comes in two parts, the FPGA project and the PC console application. Vivado is used to build the hardware platform and Xilinx SDK is used to program the microblaze processor with the demo C/C++ application. The DPTI port provides a USB connected synchronous FIFO interface between the PC software and FPGA logic. This interface connection is used to upload waveforms to the device and control the ZmodDAC.

Waveform .csv files generated by the Digilent Waveforms application can be sent using the write command. The waveform file is expected to be any number of samples separated by newlines. Sample values are expected to be weight values between -1 and 1. The console application has several commands to control the ZmodDAC.

Command Function
write <path to .csv> Writes a waveform .csv to the device. These waveforms can be generated using Digilent Waveforms
start Starts the ZmodDAC.
stop Stops the ZmodDAC (Currently unavailable)
div <divider value> Divides the output sample rate
gain <low, high, 0, 1> Sets the gain high or low
ch1 Set active ZmodDAC channel to channel 1
ch2 Set active ZmodDAC channel to channel 2

For more information see the USB104A7 ZmodDAC Demo Wiki.

Requirements

Demo Setup

FPGA Project
  1. Download the most recent release ZIP archive ("USB104A7-ZmodDAC-*.zip") from the repo's releases page.
  2. Extract the downloaded ZIP.
  3. Open the XPR project file, found at <archive extracted location>/FPGA/vivado_proj/USB104A7_ZmodDAC_Demo.xpr, included in the extracted release archive in Vivado 2019.1.
  4. Launch Xilinx SDK directly (not through the Vivado file menu). When prompted for a workspace, select "<archive extracted location>/sdk_workspace".
  5. Once the workspace opens, click the Import button. In the resulting dialog, first select Existing Projects into Workspace, then click Next. Navigate to and select the same sdk_workspace folder.
  6. Build the project. Note: Errors are sometimes seen at this step. These are typically resolved by right-clicking on the BSP project and selecting Regenerate BSP Sources.
  7. Plug the ZmodDAC into the USB104A7 Syzygy port. Plug in the 5v DC adapter and connect the USB104A7 to the PC using the USB cable.
  8. Open a serial terminal application (such as TeraTerm and connect it to the USB104A7's serial port, using a baud rate of 115200.
  9. In the toolbar at the top of the SDK window, select Xilinx -> Program FPGA. Leave all fields as their defaults and click "Program".
  10. In the Project Explorer pane, right click on the "USB104A7_ZmodDAC_Demo" application project and select "Run As -> Launch on Hardware (System Debugger)".
  11. The application will now be running on the USB104A7. It can be interacted with as described in the first section of this README.
  12. Lastly, the hardware platform must be linked to a hardware handoff, so that changes to the Vivado design can be brought into the SDK workspace. In Vivado, in the toolbar at the top of the window, select File -> Export -> Export Hardware. Any Exported Location will do, but make sure to remember the selection, and make sure that the Include bitstream box is checked. Click OK.
  13. In SDK, right click on the *hw_platform* project, and select Change Hardware Platform Specification. Click Yes in response to the warning. In the resulting dialog, navigate to and select the .hdf hardware handoff file exported in the previous step, then click OK. Now, whenever a modified design is exported from Vivado, on top of the .hdf file, it can be applied to the hardware platform.
Building the Console Application using VS Code
  1. Open Visual Studio Code.
  2. Open the folder containing the Console Application in visual studio code, found at <archive extracted location>/DPTI_App/DPTITransferWaveform.
  3. To build, click Terminal -> Run Build Task. This will run the build task found in tasks.json. This will run "gcc USB104A7_ZmodDACDemoApp.c -g3 -O0 -o <dir>\USB104A7_ZmodDACDemoApp.exe -L./ -ldpti -ldmgr" NOTE: The linux dpti and dmgr shared objects can be downloaded from the Adept 2 wiki page under Runtime - Latest Downloads.

Next Steps

This demo can be used as a basis for other projects by modifying the hardware platform in the Vivado project's block design or by modifying the SDK application project.

Check out the USB104A7's Resource Center to find more documentation, demos, and tutorials.

For technical support or questions, please post on the Digilent Forum.

Additional Notes

For more information on how this project is version controlled, refer to the digilent-vivado-scripts repo.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages