This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
resources:eval:user-guides:ad-fmcadc4-ebz [22 Feb 2017 18:16] – [Downloads (Hardware)] Update Schematic and BOM Andrei Grozav | resources:eval:user-guides:ad-fmcadc4-ebz [13 Mar 2018 13:53] – 2017_r1 - Updates (remove ILA and 1.24G config) Andrei Grozav | ||
---|---|---|---|
Line 51: | Line 51: | ||
- Clone [[https:// | - Clone [[https:// | ||
- | - Checkout the ' | + | - Checkout the latest release |
- | - Change the directory to `ad-fmcadc4-ebz/zc706`. | + | - Change the directory to `fmcadc4/ |
- | - Make the elf file by running `make HDF-FILE=< | + | - Make the elf file by running |
+ | - `make run` to download trough JTAG the hdl bitstream and software elf, this will also start the processor | ||
+ | - `make capture` read through the memory debugger the captured samples in RAM. Tha data will be saved in .csv files | ||
- | The make will build the default ' | + | If you are more comfortable with the GUI, import all the files (or folders) that the make uses. |
A typical run looks like this: | A typical run looks like this: | ||
Line 81: | Line 83: | ||
</ | </ | ||
- | The folder contains a zc706.tcl file that you can launch with xmd. You can also run it using Vivado or SDK - up to you. | + | For the `make run` case. You can also run it using Vivado or SDK - up to you. |
< | < | ||
- | [~/ | + | [~/ |
- | rlwrap: warning: your $TERM is ' | + | |
- | + | ||
- | ****** Xilinx Microprocessor Debugger (XMD) Engine | + | |
- | ****** XMD v2015.2 (64-bit) | + | |
- | **** SW Build 1266856 on Fri Jun 26 16:35:25 MDT 2015 | + | |
- | ** Copyright 1986-2015 Xilinx, Inc. All Rights Reserved. | + | |
- | + | ||
- | Executing user script : zc706.tcl | + | |
- | Configuring Device 2 (xc7z045) with Bitstream -- hw/ | + | |
- | ....................10...................20...................30....................40...................50...................60....................70...................80...................90....................Done | + | |
- | Successfully downloaded bit file. | + | |
- | + | ||
- | JTAG chain configuration | + | |
- | -------------------------------------------------- | + | |
- | Device | + | |
- | | + | |
- | | + | |
- | + | ||
- | + | ||
- | JTAG chain configuration | + | |
- | -------------------------------------------------- | + | |
- | Device | + | |
- | | + | |
- | | + | |
- | + | ||
- | -------------------------------------------------- | + | |
- | Enabling extended memory access checks for Zynq. | + | |
- | Writes to reserved memory are not permitted and reads return 0. | + | |
- | To disable this feature, | + | |
- | -------------------------------------------------- | + | make run |
+ | xsdb ../../../no-OS/ | ||
+ | attempting to launch hw_server | ||
- | CortexA9 Processor Configuration | + | ****** Xilinx hw_server v2017.4.1 |
- | ------------------------------------- | + | **** Build date : Jan 30 2018-15: |
- | Version.............................0x00000003 | + | ** Copyright 1986-2017 Xilinx, Inc. All Rights Reserved. |
- | User ID.............................0x00000000 | + | |
- | No of PC Breakpoints................6 | + | |
- | No of Addr/Data Watchpoints.........4 | + | |
- | Connected | + | INFO: hw_server application started |
- | Starting GDB server for " | + | INFO: Use Ctrl-C |
- | Processor stopped | + | |
- | Processor Reset .... DONE | + | INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121 |
- | Downloading Program -- zc706.elf | + | |
- | section, .text: 0x00100000-0x0010656b | + | |
- | section, .init: 0x0010656c-0x00106583 | + | |
- | section, .fini: 0x00106584-0x0010659b | + | |
- | section, | + | |
- | section, | + | |
- | section, | + | |
- | section, .mmu_tbl: 0x00108000-0x0010bfff | + | |
- | section, .ARM.exidx: 0x0010c000-0x0010c007 | + | |
- | section, .init_array: | + | |
- | section, .fini_array: | + | |
- | section, .bss: 0x0010c014-0x0010c0a7 | + | |
- | section, .heap: 0x0010c0a8-0x0010e0af | + | |
- | section, .stack: 0x0010e0b0-0x001118af | + | |
- | Download Progress..10.20.30.40.50.60.70.80.90.Done | + | |
- | Setting PC with Program Start Address 0x00100000 | + | |
- | Processor started. Type " | + | |
- | RUNNING> Disconnected from Target 64 | + | 100% 6MB |
+ | Downloading Program -- ~/ | ||
+ | section, .text: 0x00100000 - 0x00113487 | ||
+ | section, .init: 0x00113488 - 0x0011349f | ||
+ | section, .fini: 0x001134a0 - 0x001134b7 | ||
+ | section, .rodata: 0x001134b8 - 0x00114387 | ||
+ | section, .data: 0x00114388 - 0x00114de3 | ||
+ | section, .eh_frame: 0x00114de4 - 0x00114de7 | ||
+ | section, .mmu_tbl: 0x00118000 - 0x0011bfff | ||
+ | section, .ARM.exidx: 0x0011c000 - 0x0011c007 | ||
+ | section, .init_array: | ||
+ | section, .fini_array: | ||
+ | section, .bss: 0x0011c010 - 0x0011c373 | ||
+ | section, .heap: 0x0011c374 - 0x0011e37f | ||
+ | section, .stack: 0x0011e380 - 0x00121b7f | ||
+ | 100% 0MB | ||
+ | Setting PC to Program Start Address 0x00100000 | ||
+ | Successfully downloaded ~/ | ||
- | Disconnected from Target 352 | ||
</ | </ | ||
Line 155: | Line 125: | ||
< | < | ||
- | AD9528 successfully initialized. | + | QPLL ENABLE |
- | AD9680 PLL is locked. | + | Rx link is enabled |
- | AD9680 successfully initialized. | + | Measured Link Clock: 250 MHz |
- | AD9680 PLL is locked. | + | Link status: DATA |
- | AD9680 successfully initialized. | + | SYSREF captured: Yes |
- | JESD204B successfully | + | adc_setup adc core initialized (1000 MHz). |
- | ADC Core Initialized | + | adc_setup adc core initialized |
- | ADC Core Initialized | + | RX capture |
- | Initialization done. | + | |
- | + | ||
- | Capture | + | |
</ | </ | ||
- | |||
A brief background information on what is happening. Let's look at the No-OS main function. | A brief background information on what is happening. Let's look at the No-OS main function. | ||
First, it configures and sets the GPIO based on the board. | First, it configures and sets the GPIO based on the board. | ||
- | <xterm> | + | <code c> |
- | adc4_gpio_ctl(GPIO_DEVICE_ID); | + | |
- | </xterm> | + | ad_gpio_set(GPIO_AD9528_RSTN, |
+ | ad_gpio_set(GPIO_AD9528_RSTN, | ||
+ | </code> | ||
The clock chip is programmed to output the desired clocks and sys-ref signals. The default setting is 1GHz for the AD9680 and 500MHz for the FPGA. | The clock chip is programmed to output the desired clocks and sys-ref signals. The default setting is 1GHz for the AD9680 and 500MHz for the FPGA. | ||
< | < | ||
- | ad9528_setup(SPI_DEVICE_ID, 0, ad9528_pdata_lpc); | + | ad9528_setup(& |
</ | </ | ||
Line 184: | Line 152: | ||
< | < | ||
- | jesd204b_gt_initialize(FMCADC4_GT_BASEADDR, | + | xcvr_setup(& |
</ | </ | ||
Line 190: | Line 158: | ||
< | < | ||
- | ad9680_setup(SPI_DEVICE_ID, 1); | + | ad9680_setup(& |
- | ad9680_setup(SPI_DEVICE_ID, 2); | + | ad9680_setup(& |
</ | </ | ||
- | The design uses Xilinx's JESD IP- it needs to be programmed to match the device settings (frame count, byte count, scrambling and such). | + | The design uses ADI's JESD IP- it needs to be programmed to match the device settings (frame count, byte count, scrambling and such). |
< | < | ||
- | jesd204b_setup(AD9680_JESD_BASEADDR, | + | jesd_setup(ad9680_jesd); |
</ | </ | ||
Line 203: | Line 171: | ||
< | < | ||
- | | + | axi_jesd204_rx_status_read(ad9680_jesd); |
</ | </ | ||
Line 209: | Line 177: | ||
< | < | ||
- | adc_setup(ad9680_0, 2); | + | adc_setup(ad9680_0_core); |
- | adc_setup(ad9680_1, | + | |
</ | </ | ||
Line 218: | Line 185: | ||
< | < | ||
- | ad9680_spi_write(1, AD9680_REG_DEVICE_INDEX, | + | ad9680_test(& |
- | | + | |
- | | + | |
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
</ | </ | ||
Line 229: | Line 191: | ||
< | < | ||
- | adc_pn_mon(ad9680_0, 2, 1); | + | adc_pn_mon(ad9680_0_core, ADC_PN9) |
- | adc_pn_mon(ad9680_1, | + | |
</ | </ | ||
- | If you don't see any other messages in the UART other than the ones mentioned above- all is well. You can open up Vivado and see things in ILA also. | + | If you don't see any other messages in the UART other than the ones mentioned above- all is well. |
- | Let's see now how we can change the sampling rate to 1.24 GHz. The AD9680 maximum sampling rate is 1.25GHz. However the board uses a 80MHz crystal as the reference clock to AD9528. Unless you change it, this limits the maximum clock output on the banks to 1.24GHz. Also note that the Kintex 7 SOC on ZC706 is a -2 device. The maximum lane rate is limited to 10Gbps. However, it should be possible to over clock the transceiver (but do so at your own risk). Officially, you must get a -3 device to run the link at 12.4Gbps. | + | Here is the ILA plot screen capture |
- | + | < | |
- | Going back to our program. | + | |
- | + | ||
- | < | + | |
- | #ifdef MODE_1_24G | + | |
- | ad9528_pdata_lpc.pll2_ndiv_a_cnt = 1; | + | |
- | ad9528_pdata_lpc.pll2_ndiv_b_cnt = 23; | + | |
- | ad9528_pdata_lpc.pll2_n2_div = 31; | + | |
- | ad9528_pdata_lpc.pll2_vco_diff_m1 = 3; | + | |
- | #endif | + | |
- | </ | + | |
- | + | ||
- | Let's define that macro somewhere on that file. | + | |
- | + | ||
- | < | + | |
- | [~/ | + | |
- | 71a72 | + | |
- | > #define MODE_1_24G | + | |
- | </ | + | |
- | + | ||
- | And re-run the make. | + | |
- | + | ||
- | < | + | |
- | [~/ | + | |
- | arm-xilinx-eabi-gcc -DXILINX -Ibsp/ | + | |
- | </ | + | |
- | + | ||
- | The UART should now show this. | + | |
- | + | ||
- | < | + | |
- | AD9528 successfully initialized. | + | |
- | AD9680 PLL is locked. | + | |
- | AD9680 successfully initialized. | + | |
- | AD9680 PLL is locked. | + | |
- | AD9680 successfully initialized. | + | |
- | JESD204B successfully initialized. | + | |
- | ADC Core Initialized (1240 MHz). | + | |
- | ADC Core Initialized (1240 MHz). | + | |
- | Initialization done. | + | |
- | + | ||
- | Capture done. | + | |
- | </ | + | |
- | + | ||
- | The clocks reported by the core is 1240MHz instead of the previous 1000MHz. There are no error messages and PRBS locks. This is all there is to it. There is no need for HDL modifications. However, if you ran into trouble here are a couple of things to try. | + | |
- | + | ||
- | * If you have ran this back to back- try running 1.24GHz option from power up. | + | |
- | * Modify the HDL to use a -3 device and change the constraints to run at 12.40Gbps | + | |
- | * Upgrade the device on board to a -3 device. | + | |
- | + | ||
- | Here is the UART window | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | The application leaves the device in a ramp pattern, and if you are looking at the data using ILA should see it. If you would like to switch it to the analog input, do the following. In this case I am changing only the fourth channel (SMA - J301D). | + | |
- | + | ||
- | < | + | |
- | ad9680_spi_write(1, | + | |
- | ad9680_spi_write(1, | + | |
- | ad9680_spi_write(1, | + | |
- | + | ||
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
- | + | ||
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
- | ad9680_spi_write(2, | + | |
- | adc_write(ad9680_1, | + | |
- | </xterm> | + | |
- | + | ||
- | Here is the ILA plot screen capture. | + | |
{{: | {{: | ||
- | |||
- | |||
- | |||
===== Downloads (Hardware) ===== | ===== Downloads (Hardware) ===== | ||
Line 330: | Line 218: | ||
===== Downloads (Linux) ===== | ===== Downloads (Linux) ===== | ||
- | * [[/ | + | * [[/ |
* [[/ | * [[/ | ||
* [[/ | * [[/ | ||