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
Last revisionBoth sides next revision
learn:programmable-logic:tutorials:nexys-video-dma-audio-demo:start [2017/05/02 22:12] – Updated Download ZIP Link Arthur Brownlearn:programmable-logic:tutorials:nexys-video-dma-audio-demo:start [2017/10/24 22:35] Arthur Brown
Line 6: Line 6:
 ----- -----
 ===== Overview ===== ===== Overview =====
 +
 +==== Description ====
 +
 +The audio demo records a 5 second sample from microphone(J6) or line in (J7) and plays it back on headphone out(J4) or line out (J5). Recording and playback are started by push buttons
 +
 ==== Features Used ==== ==== Features Used ====
  
Line 26: Line 31:
 ^ Pmod for XADC signals            |    X      |       | ^ Pmod for XADC signals            |    X      |       |
 ^ USB HID Host                        X      |       | ^ USB HID Host                        X      |       |
- 
-==== Description ==== 
- 
-The audio demo records a 5 second sample from microphone(J6) or line in (J7) and plays it back on headphone out(J4) or line out (J5). Record and playback is started by push buttons: 
-^  Button  ^  Function          ^ 
-^  BTNL    |  play on Line out    | 
-^  BTNR    |  record from line in  | 
-^  BTNU    |  record from microphone      | 
-^  BTND    |  playback on headphone        | 
- 
-For example, with the push of BTNU this demo records 5 
-seconds of audio data from the MIC (J6) input. Consequently by pressing BTND the demo plays on the HPH OUT (J4) the recorded samples. 
- 
- 
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 53: Line 44:
   * **Vivado Design Suite 2016.4**    * **Vivado Design Suite 2016.4** 
     * //Newer versions can be used, but the procedure may vary slightly//     * //Newer versions can be used, but the procedure may vary slightly//
 +  * **Digilent Board Support Files for Vivado** 
 +    * Follow the [[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]] guide on how to install Board Support Files for Vivado.
  
 +===== Downloads =====
 +Nexys Video DMA Audio Project Repository -- [[https://github.com/Digilent/Nexys-Video-DMA/releases/download/v2016.4-3/Nexys-Video-DMA-2016.4-3.zip|ZIP Archive]] [[https://github.com/Digilent/Nexys-Video-DMA|GIT Repo]]
  
-==== 1. Setup ==== +===== Download and Launch the Nexys Video DMA Audio Demo =====
- +
-Plug in your microphone or aux input into the respective jack on your Nexys Video. Plug your speakers/headphones into the Line out jack. Plug in your Nexys Video and power it on. +
- +
-==== 2. Download the Project ==== +
- +
-Nexys Video Support Repository -- [[https://github.com/Digilent/Nexys-Video-DMA/releases/download/v2016.4-1/Nexys-Video-DMA-2016.4-1.zip|ZIP]] [[https://github.com/Digilent/Nexys-Video-DMA|GIT Repo]] +
- +
-==== 3. Load the Vivado Project ==== +
- +
-In your now unzipped project, open the file NexysVideoDMAAudio.xpr. This should open your project in Vivado.  +
- +
-*The screenshots below are from another project but should look relatively the same and will work for our purposes. +
- +
- +
-{{:basys3:gpio_load.png?600|}} +
- +
-==== 4. Synthesize, Implement and Generate Bitstream ==== +
- +
-To complete this step all that you need to do is click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically. If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**. +
- +
-{{:basys3:buildflow.png?600|}} +
- +
-==== 5. Connect and Program the Nexys Video ==== +
- +
-Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option (Or press auto connect). +
- +
-{{:nexys4-ddr:deviceconnected.jpg?600|}} +
- +
-After your board is connected, click program device to load the DMA Audio Demo onto your Nexys Video. +
- +
-==== 4. Export to SDK ==== +
- +
-Export the microblaze project by going to **File>Export>Export Hardware**. Click the check box to Include the bitstream, and export it local to project. This will create a .sdk folder in your project directory. Afterwards, click **File>Launch SDK** to launch Xilinx SDK. +
- +
- +
-==== 5. Import the SDK files ====+
  
-In your project Explorer window on the left side, click **File>Import** then expand the General tab and click **Existing Projects into Workspace**Navigate to the download folderselect the **sdk** folderand click OKIn the //Import// window, click Finish to import the SDK project.+>1) Follow the [[:learn:programmable-logic:tutorials:github-demos:start:|Using Digilent Github Demo Projects]] TutorialSince this is a Vivado SDK Projectyou can either directly launch SDK and import the hardware handoffor you can generate a bitstream in Vivado before launching SDKSelect the hardware handoff options in the tutorial if you don't want to modify the project block design later. Return to this guide when prompted to check for additional hardware requirements and setup.
  
-==== 6Program the FPGA ====+>2) In order to use the demo, you will need to plug in your microphone or aux input into the respective jack on your Nexys VideoPlug your speakers/headphones into the Line Out or HP Out jack. 
 +
 +>{{:learn:programmable-logic:tutorials:nexys-video-dma-audio-demo:nv-dma.jpg?400|}}
  
-Click **Xilinx Tools>Program FPGA** and click **Program**Xilinx SDK will then program the FPGA with a microblaze bit file.+>3) Make sure that your board is plugged into a 12 Volt power supply, turn on your board, and open a serial terminal (such as TeraTerm) on your computer to receive status messagesSetup the serial port to connect to the appropriate port for your board, with a baud rate of 115200. Then return to the Github Project Tutorial to finish programming and running the demo. 
 +
 +><WRAP round tip 660px>  
 +===Tip=== 
 +You can connect your serial terminal to your board before the board is programmed, this will make sure that you don't miss any startup messages. If the demo is already running, you can restart the demo in SDK to make sure you get these messages. 
 +</WRAP> 
 +
 +>{{:learn:programmable-logic:tutorials:nexys-video-dma-audio-demo:nv-dma-tera-setup.png?400|}}
  
-==== 7. Run the program ====+  
 +===== Using the Nexys Video DMA Audio Demo =====
  
-Right click on the **demo** folder and click  **Run as>Launch on Hardware(GDB)**. The microblaze program will be programmed onto your Nexys Video.+==== 1Controls ====
  
-===== Running the Nexys Video DMA Audio Demo =====+Audio playback and recording are controlled by push buttons as below.
  
-This portion will help you run the demo and observe all its features.+^  Button  ^  Function               ^ 
 +^  BTNU    |  record from microphone in  | 
 +^  BTNR    |  record from line in        | 
 +^  BTNL    |  play on line out           | 
 +^  BTND    |  play on headphone out      |
  
-==== 1. Recording from an input ====+==== 2. Recording from an input ====
  
-To record from the microphone input, press btnu. To record from the line input, press btnr. Once the recording is activated, the message "Start Recording..." will be sent over UART and the demo will record 5 seconds of audio. If any buttons are pressed during the recording, the message "Still Recording..." will be sent over UART.+Press the record button associated with the input you want to record from. Once the recording is activated, the message "Start Recording..." will be sent over UART and the demo will record 5 seconds of audio. If any buttons are pressed during the recording, the message "Still Recording..." will be sent over UART.
  
-==== 2. Playing to an output ====+==== 3. Playing to an output ====
  
-To play to the microphone input, press btnd. To play to the line output, press btnl. Once the playback is activated,  the message "Start Playback..." will be sent over UART and the demo will play 5 seconds of audio. If any buttons are pressed during the playback, the message "Still Playing..." will be sent over UART.+Press the play button associated with the output you want to play to. Once the playback is activated, the message "Start Playback..." will be sent over UART and the demo will play 5 seconds of audio. If any buttons are pressed during the playback, the message "Still Playing..." will be sent over UART.
  
-{{tag>learn programmable-logic tutorial nexys-video}}+{{tag>learn programmable-logic project nexys-video}}