Differences

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

Link to this comparison view

Next revision
Previous revision
programmable-logic:eclypse-z7:demos:low-level-low-pass-filter [2021/09/16 23:43] – created Arthur Brownprogrammable-logic:eclypse-z7:demos:low-level-low-pass-filter [2023/10/13 21:59] (current) Arthur Brown
Line 1: Line 1:
-====== Eclypse Z7 Low Level Zmod ADC DAC Demo ======+====== Eclypse Z7 Low-Level Low-Pass Filter Demo ======
 {{ :reference:programmable-logic:eclypse-z7:demosetup.png?500 |}} {{ :reference:programmable-logic:eclypse-z7:demosetup.png?500 |}}
 ===== Overview ===== ===== Overview =====
 The project demonstrates the implementation of a basic signal processing application on the Eclypse platform (Eclypse Z7 + Zmod Scope + Zmod AWG). The project demonstrates the implementation of a basic signal processing application on the Eclypse platform (Eclypse Z7 + Zmod Scope + Zmod AWG).
 +<WRAP JUSTIFY>
 ---- ----
 ===== Description ===== ===== Description =====
  
 The simplified block diagram of the system implemented for this demo is shown below: The simplified block diagram of the system implemented for this demo is shown below:
-{{ :undefined:blockdiagram.png?500 |}} +{{ :programmable-logic:eclypse-z7:demos:blockdiagram.png?600 |}}
- +
-FIXME reproduce this diagram with different names+
  
 An analog input coming from the Analog Discovery 2 (AD2) is connected to the Zmod Scope CH1, converted to a digital format and passed on to the input of a digital low pass filter. The filter's output is converted back to an analog format by the Zmod AWG and can be measured/visualized on the converter channel 1. An analog input coming from the Analog Discovery 2 (AD2) is connected to the Zmod Scope CH1, converted to a digital format and passed on to the input of a digital low pass filter. The filter's output is converted back to an analog format by the Zmod AWG and can be measured/visualized on the converter channel 1.
Line 16: Line 14:
 The input signal, after the analog to digital conversion, is also looped back to the Zmod AWG and connected to the CH2 output. The Analog Discovery 2's Network Analyzer instrument is then used to plot the frequency characteristic using the CH2 of the Zmod AWG as reference.  The input signal, after the analog to digital conversion, is also looped back to the Zmod AWG and connected to the CH2 output. The Analog Discovery 2's Network Analyzer instrument is then used to plot the frequency characteristic using the CH2 of the Zmod AWG as reference. 
  
-The purpose of the digital loopback is to correct the phase errors introduced by the ADC and Zmod Scope Controller latency and the gain errors caused by the mismatch between the ADC and the DAC full scale voltages. +The purpose of the digital loopback is to correct the phase errors introduced by the ADC and Zmod Scope Controller latency and the gain errors caused by the mismatch between the ADC and the DAC full-scale voltages.  
 + 
 +Regardless of the Zmod Scope used, the system uses a 40 MS/s sample rate for both the Zmod Scope input and Zmod AWG output.
  
 With this setup the frequency response of the filter can be correctly measured regardless of the gain setting of the Zmod AWG.  With this setup the frequency response of the filter can be correctly measured regardless of the gain setting of the Zmod AWG. 
Line 26: Line 26:
   * A digital low pass filter – implemented using Xilinx FIR compiler 7.2 IP Core with the coefficients specified in Table 1, below.   * A digital low pass filter – implemented using Xilinx FIR compiler 7.2 IP Core with the coefficients specified in Table 1, below.
   * The Zmod AWG Controller - initializes the Zmod AWG hardware and formats the output data according to the AD9717 DAC requirements.     * The Zmod AWG Controller - initializes the Zmod AWG hardware and formats the output data according to the AD9717 DAC requirements.  
 +
 +In the demo, the Zmod Scope CH1 is set to High Gain (+/-1V input range). The Zmod AWG CH1 and CH2 are set to Low Gain/Range (+/-1.25V output range).\\ 
 +Therefore, a signal applied to the Zmod Scope CH1 input, converted to numeric format and the result sent directly to the inputs of Zmod AWG will be amplified 1.25V/1V = 1.25 times.\\ 
 +If the user needs the AWG output voltage to have the same range as the Zmod Scope input, the numeric representation received from the Zmod Scope will need to be multiplied in the PL by 1/1.25 = 0.8.
  
 --> Table 1. FIR Filter Coefficients # --> Table 1. FIR Filter Coefficients #
Line 50: Line 54:
 |  0.0063382,  | |  0.0063382,  |
 |  0.0031577.  | |  0.0031577.  |
 +
 <-- <--
  
Line 55: Line 60:
  
 ===Hardware=== ===Hardware===
-  * [[https://store.digilentinc.com/eclypse-z7-zynq-7000-soc-development-board-with-syzygy-compatible-expansion/|Eclypse Z7]]+  * [[https://digilent.com/shop/eclypse-z7-zynq-7000-soc-development-board-with-syzygy-compatible-expansion/|Eclypse Z7]]
     * Including a **Micro-USB cable** and **12V Power Supply**     * Including a **Micro-USB cable** and **12V Power Supply**
   * A Zmod Scope, one of the following:   * A Zmod Scope, one of the following:
Line 62: Line 67:
     * [[https://digilent.com/shop/zmod-scope-1410-2-channel-14-bit-oscilloscope-module/|Zmod Scope 1410]]     * [[https://digilent.com/shop/zmod-scope-1410-2-channel-14-bit-oscilloscope-module/|Zmod Scope 1410]]
   * [[https://digilent.com/shop/zmod-awg-1411-2-channel-14-bit-arbitrary-waveform-generator-awg-module/|Zmod AWG 1411]]   * [[https://digilent.com/shop/zmod-awg-1411-2-channel-14-bit-arbitrary-waveform-generator-awg-module/|Zmod AWG 1411]]
-  * [[https://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2 (AD2)]] +  * [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2 (AD2)]] 
-  * [[https://store.digilentinc.com/bnc-adapter-for-analog-discovery/|Discovery BNC Adapter]]+  * [[https://digilent.com/shop/bnc-adapter-for-analog-discovery/|Discovery BNC Adapter]] 
 +  * BNC-to-SMA cables (or BNC-to-SMA adapters with BNC or SMA cables) are recommended
  
 ===Software=== ===Software===
Line 75: Line 81:
  
 ===== Downloads ===== ===== Downloads =====
-| Vivado Project Archive |[[https://github.com/Digilent/Eclypse-Z7-HW/releases/download/lowlevel_lpf%2Fv2019.1-1/Eclypse-Z7-Low-Level-Low-Pass-Filter-hw.xpr.zip|ZIP Archive]]+| Vivado Project Archive 2023.1 {{https://github.com/Digilent/Eclypse-Z7/releases/download/lowlevel_lpf/2023.1-1/Eclypse-Z7-Low-Level-Low-Pass-Filter-hw.xpr.zip}}  
-Waveforms Workspace |{{https://digilent.s3-us-west-2.amazonaws.com/resources/programmable-logic/eclypse/Eclypse-low-level-adc-dac-demo.zip|ZIP Archive}}|+Vivado Project Archive 2019.1 | {{https://github.com/Digilent/Eclypse-Z7/releases/download/lowlevel_lpf/2019.1-2/Eclypse-Z7-Low-Level-Low-Pass-Filter-hw.xpr.zip}}  | 
 +| Waveforms Workspace |{{ :programmable-logic:eclypse-z7:demos:eclypse-low-level-low-pass-filter-demo.zip |ZIP Archive}}|
  
-Advanced users may want to take a look at the [[https://github.com/Digilent/Eclypse-Z7/tree/lowlevel_lpf/next|branch of Eclypse Z7 repository]] containing the project.+Advanced users may want to take a look at the [[https://github.com/Digilent/Eclypse-Z7/tree/lowlevel_lpf/master|branch of Eclypse Z7 repository]] containing the project.
  
 ------ ------
Line 87: Line 94:
 1. Connect the Analog Discovery 2 board to the host computer using a MicroUSB cable. 1. Connect the Analog Discovery 2 board to the host computer using a MicroUSB cable.
  
-2. Connect the Eclypse Z7 board to the host computer using a MicroUSB cable through PROG MicroUSB port and power the board using the 12V Power Supply. Flip its power switch to turn it on. +2. Connect the two Zmods, Scope and AWG, to the Zmod connectors of the Eclypse Z7 board as follows: 
- +
-3. Connect the two Zmods, Scope and AWG, to the Zmod connectors of the Eclypse Z7 board as follows: +
   * Zmod Scope to ZMOD A connector of the Eclypse Z7   * Zmod Scope to ZMOD A connector of the Eclypse Z7
   * Zmod AWG 1411 to ZMOD B connector of the Eclypse Z7   * Zmod AWG 1411 to ZMOD B connector of the Eclypse Z7
  
-4. Connect the BNC adapter to the Analog Discovery 2+3. Connect the Eclypse Z7 board to the host computer using a MicroUSB cable through PROG MicroUSB port and power the board using the 12V Power Supply. Flip its power switch to turn it on. 
 + 
 +4. Connect the BNC adapter to the Analog Discovery 2. Set the CH1 and CH2 coupling jumpers to DC and the W1 termination impedance jumper to "0".
  
 5. Make the following physical connections: 5. Make the following physical connections:
Line 110: Line 117:
 If you are using a variant of the Zmod Scope other than the 1410-105, check the following dropdown for instructions on modifying the project to support your Zmod and rebuilding it. If you are using a variant of the Zmod Scope other than the 1410-105, check the following dropdown for instructions on modifying the project to support your Zmod and rebuilding it.
  
---> FIXME +--> Rebuilding the Project for Other Zmod Scopes 
-FIXME+<WRAP group> 
 +If you are using a Zmod scope variant other than the Zmod Scope 1410-104, you will need to modify and rebuild the project for your Zmod. 
 + 
 +Open the block design. Double click on the Zmod Scope Controller IP to reconfigure it. Pick your Zmod Scope variant from the ZmodID dropdown, then click OK. 
 + 
 +{{ :programmable-logic:eclypse-z7:demos:switch-zmod.png?800 |}} 
 + 
 +---- 
 + 
 +<columns 100% 50% 50%> 
 +If your Zmod Scope has less than 14 bits of resolution, add a Slice IP to the block design to connect the Zmod port's data port (which is 14 bits wide) to the Zmod Scope Controller's data port. To do this, first click Add IP and search for "slice"
 +<newcolumn> 
 +{{ :programmable-logic:eclypse-z7:demos:add-slice-ip.png?800 |}} 
 +</columns> 
 + 
 +<columns 100% 50% 50%> 
 +Double click on the new slice IP to recustomize it, and select the following settings for the IP, depending on the data resolution of your Zmod: 
 +^ Resolution  ^ Din Width  ^ Din From  ^ Din Down To  ^ Dout Width  ^ 
 +| 12  | 14  | 13  | 2  | 12  | 
 +| 10  | 14  | 13  | 4  | 10  | 
 +<newcolumn> 
 +{{ :programmable-logic:eclypse-z7:demos:configure-slice.png?600 |}} 
 +</columns> 
 + 
 +<columns 100% 50% 50%> 
 +Delete the existing net between the dZmodADC_Data_0 port and the dZmodADC_Data_0 of the controller IP. 
 + 
 +Manually connect the Slice IP to each of the endpoints of the deleted net by clicking and dragging from one pin to another. You may need to connect //from// the slice's input port //to// the external port rather than the other way around. 
 +<newcolumn> 
 +{{ :programmable-logic:eclypse-z7:demos:connect-slice.png?600 |}} 
 +</columns> 
 + 
 +---- 
 + 
 +Validate the block design, then click **Generate bitstream** to build the project. When prompted, save the block design, and click Yes to allow Vivado to start both synthesis and implementation. Click **OK** to launch runs, then wait for the bitstream to finish being built. 
 + 
 +{{ :programmable-logic:eclypse-z7:demos:validate-and-build.png?800 |}} 
 + 
 +<columns 100% 50% 50%> 
 +Once you have a bitstream, you are ready to continue setting up the demo. 
 +<newcolumn> 
 +{{ :programmable-logic:eclypse-z7:demos:bitstream-complete.png?400 |}} 
 +</WRAP>
 <-- <--
  
Line 123: Line 172:
 5. Select the .bit file, or make sure it is already selected and is located at the correct path in the dialog (the bit file can be found in the project at ''hw.runs/impl_1/design_1_wrapper.bit''), and program the board. 5. Select the .bit file, or make sure it is already selected and is located at the correct path in the dialog (the bit file can be found in the project at ''hw.runs/impl_1/design_1_wrapper.bit''), and program the board.
  
-6. Open WaveForms, then open the workspace, "EclypseZ7VhdlFilterDemo.dwf3work", included in the folder extracted from the demo archive.+6. Open WaveForms, then open the workspace, "EclypseZ7VhdlFilterDemo.dwf3work", included in the folder extracted from the demo archive. If you are prompted that the configuration of your AD2 will be changed, allow WaveForms to do so.
  
 Hit the Run button of the Network Analyzer instrument. Hit the Run button of the Network Analyzer instrument.
Line 138: Line 187:
 For more guides and example projects for your Eclypse Z7, please visit its [[programmable-logic:eclypse-z7:start|Resource Center]]. For more guides and example projects for your Eclypse Z7, please visit its [[programmable-logic:eclypse-z7:start|Resource Center]].
  
-For more information about how to use the other Digilent products featured in this demo, please visit their respective Resource Centers: \\ [[test-and-measurement:analog-discovery-2:start]], [[test-and-measurement:bnc-adapter-board:start]], [[zmod:zmodadc:start]], [[zmod:zmoddac:start]].+For more information about how to use the other Digilent products featured in this demo, please visit their respective Resource Centers: \\ [[test-and-measurement:analog-discovery-2:start]], [[test-and-measurement:bnc-adapter-board:start]], [[zmod:scope:start]], [[zmod:awg:start]].
  
-For technical support, please visit the [[https://forum.digilentinc.com|Digilent Forums]].+For technical support, please visit the [[https://forum.digilent.com|Digilent Forums]].
  
 {{tag>learn programmable-logic project eclypse-z7}} {{tag>learn programmable-logic project eclypse-z7}}