Jump to content

Cristian.Fatu

Technical Forum Moderator
  • Posts

    223
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Cristian.Fatu got a reaction from Zufaruu in Zmod DAC 1411 4096 Sample Limit?   
    The fact the the project runs in Baremetal is great. It means that you have the proper hardware platform on one hand, and the proper Zmodlib code (which is identical on baremetal and platform) on another hand. So focus on providing the same hardware platform, build the project for linux (be sure you are defining LINUX_APP in your project) and it should work.
    Good luck.
  2. Like
    Cristian.Fatu got a reaction from Zufaruu in ADC-DAC Loopback Using ZMOD AWG-1411 and ZMOD ADC-1410   
    In order to answer the concern from your initial post, I will tell you some words about the trigger.
    ZmodADC, regarded as a data acquisition device, can be configured (through ZMODADC1410 Class functions) to start the acquisition immediately or to start the acquisition only when a specific condition is met. This condition is called trigger condition, and may be defined by setting the trigger level, trigger mode, trigger edge and window position. You can read more details about these on https://digilent.com/reference/zmod/scope/zmodadc1410libraryuserguide.
    The function ZMODADC1410::acquireTriggeredPolling starts by setting the trigger (call to ZMODADC1410::setTrigger), prepares the buffer length, starts the acquisition and then waits until a buffer of acquired data is available by polling the buffer full bit. In this moment acquired data is in the buffer, so the only thing left is to perform the DMA transfer of the acquired data.
    Below is a explanation of the trigger parameters, taken from the above mentioned user guide.

  3. Like
    Cristian.Fatu reacted to bpwilliams in zmodlib development on Eclypse Z7 without SDK   
    Got it working! Here's my cheat sheet to replicate.
    Install PetaLinux 2019.1, my install directory is in /home/bw/Xilinx/petalinux-v2019.1
    *** You will also need Vivado 2019.1 and SDK 2019.1 if you want to run baremetal or modify the actual hardware project (do additional/different stuff on the FPGA).
    *** To collect data with the ADC in Linux using the demo setup, I think you just need Petalinux 2019.1
    Get Ubuntu and Format SD Card (just do steps 2, 5, and 6 in link):
    https://medium.com/developments-and-implementations-on-zynq-7000-ap/install-ubuntu-16-04-lts-on-zynq-zc702-using-petalinux-2016-4-e1da902eaff7
    Get the Digilent Demo for the Eclypse Z7 Zmod ADC 1410:
    git clone --recursive https://github.com/Digilent/Eclypse-Z7 -b zmod_adc/master
    Source your Petalinux:
    source /home/bw/Xilinx/petalinux-v2019.1/settings.sh
    The libuio.git build links do not work in this Eclypse-Z7 petalinux project. My workaround is to go into Eclypse-Z7/os/project-spec/meta-user/recipes-apps
    and delete the 'libuio' folder. Then later you can install libuio manually in the Ubuntu OS running on the Eclypse Z7.
    From Eclypse-Z7/os/ directory run (change to your appropriate directory, probably not "bw"!):
    petalinux-config --get-hw-description=/home/bw/Documents/fpga/Eclypse-Z7/hw/hw_handoff/
    ***In this menu set the rootfs to run from SD card
    petalinux-config -c kernel
    ***In this menu goto device drivers-->userspace I/O-->select (*) all Xilinx UIO options
    ***also              device drivers-->IRQ chipset-->the Xilinx option (not 100% sure you need this)
    ***save the file by entering on save option, quick keys MAY be unreliable
    petalinux-build
    petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot
    Copy image.ub, boot.bin, and system.dtb from images folder into boot parition on SD card.
    You also need a uEnv.txt (given below at end of this).
    You should now also have Ubuntu as a rootfs on the SD card, copy the 'ZmodADC1410_Demo_Linux' and the 'zmodlib' folders into a folder onto the rootfs partion, I put mine into
    /home/ubuntu/RH
    Move ZmodADC1410 demo app from Eclypse-Z7-SW folder onto Eclypse Z7 Ubuntu rootfs
    add LINUX_APP to compile
    for example:
        
        g++ -std=c++11 -Wall -DLINUX_APP dma.c -c
    You need to compile all the .c files within the subfolders of zmodlib
    many files require adding #include <stdbool.h>, those needing it will give you an error about "bool" this or that
    Some may require libuio.h which I got from:
    git clone --recursive https://github.com/Digilent/libuio checkout
    you can then ``make" these files to build a library to put with outher library files in /lib/ for example
    you can also put libuio.h into /usr/include
    list of files to compile: dma.c, libaxidma.c, flash.dma, reg.dma, utils.c, zmod.cpp, zmodadc1410.cpp
    Finally, go to the directory holding main.cpp, for me its /home/ubuntu/RH/ZmodADC1410_Demo_Linux/src/
    Link/compile main.cpp
    g++ -std=c++11 -DLINUX_APP main.cpp -o main -I "../../zmodlib/" -I "../../zmodlib/Zmod/" -I "../../zmodlib/Zmod/linux/" -I "../../zmodlib/Zmod/linux/dma/" -I "../../zmodlib/Zmod/linux/flash/" -I "../../zmodlib/Zmod/linux/reg/" -I "../../zmodlib/ZmodADC1410/" ../../zmodlib/Zmod/linux/reg/reg.o ../../zmodlib/Zmod/linux/flash/flash.o ../../zmodlib/Zmod/linux/dma/dma.o ../../zmodlib/Zmod/linux/dma/libaxidma.o ../../zmodlib/Zmod/linux/utils.o ../../zmodlib/ZmodADC1410/zmodadc1410.o ../../zmodlib/Zmod/zmod.o -luio
    You can now run it with: sudo ./main
    Won't run without sudo, some permission issue with axidma. (perhaps someone knows how to fix?)
    ###################################  uEnv.txt ###################################################
    # Eclypse boot configuration
    #VARIABLES
    #Zmod configuratio to use: adc, dac, adc-dac
    zmod=system
    fdn=0
    bit_addr=0x10000000
    dtb_addr=0x11000000
    img_addr=0x11400000
    img_name=image.ub
    dtb_name=system.dtb
    ####### To evaluate before use
    eval_variables=\
    setenv bit_name zm-${zmod}.bit; \
    setenv dtb_name zm-${zmod}.dtb; \
    setenv bootargs console=ttyPS0,115200 earlyprintk cma=25M uio_pdrv_genirq.of_id=generic-uio root=/dev/mmcblk0p2 rw rootwait;

    ####### To run
    mmc_fpga=load mmc 0:1 $bit_addr $bit_name && fpga loadb $fdn $bit_addr $filesize;
    mmc_dtb=load mmc 0:1 $dtb_addr $dtb_name
    #mmc_boot=load mmc 0:1 $img_addr $img_name && bootm $img_addr:kernel@1 - $img_addr:fdt@system-top.dtb $bootargs;
    mmc_boot=load mmc 0:1 $img_addr $img_name && bootm $img_addr:kernel@1 - $dtb_addr $bootargs;

    ####### Entry point
    uenvcmd=run eval_variables && run mmc_fpga && run mmc_dtb && run mmc_boot;
  4. Like
    Cristian.Fatu got a reaction from Zufaruu in Generates signal from both channels using ZMOD DAC1411   
    You are always welcome,
    I am glad to hear that things work.
    Good luck, and write us when you have questions.
     
  5. Like
    Cristian.Fatu got a reaction from Zufaruu in Generates signal from both channels using ZMOD DAC1411   
    Hello,
    In order to use both (or one) channels you have to:
    1. Call allocChannelsBuffer to allocate the buffer, according to the desired size bufSize. It allocates a buffer of 32 bits values (for both channels).
    2. Populate the buffer: For each sample (0 to bufSize -1), place in buffer a 32 bits value obtained like this: for each desired channels (two or one) call arrangeChannelData or arrangeSignedChannelData, providing a 16 bits value corresponding to that channel. From these 16 bits, only 14 bits will be used.
    3. Call setData function to transfer the buffer to the DAC internal IP buffer
    4. Call start function to start the DAC generation process.
    For more details see https://digilent.com/reference/zmod/awg/zmoddac1411libraryuserguide
  6. Like
    Cristian.Fatu reacted to Zufaruu in Generates signal from both channels using ZMOD DAC1411   
    Thank you very much for the explanation. It's really helpful and it's worked :D
  7. Like
    Cristian.Fatu reacted to tomko in Struggle to tune the scope probes that come with Analog Discovery 2   
    Hi @Cristian.Fatu
    Many thanks - I received them 2 days ago and am now able to adjust the square waves accordingly.
    Kind regards,
    Tom
  8. Like
    Cristian.Fatu reacted to artvvb in Zmod ADC and DAC initialization   
    Hi @Tommy 777
    This looks like it's due to a bug in the DAC example code.
    The following line in your version of the code introduces a rounding error when the amplitude divided by step (5 / 2 = 2.5) is converted to an integer, causing the loop later in the function to count past the end of the allocated buffer, overwriting something critical above it.
    length = ((size_t)(amplitude/step)) << 2; Changing the line to the following should address the problem.
    length = ((size_t)((amplitude * 2.0) / step)) * 2; I'm working to get it addressed in the github sources.
    Thanks,
    Arthur
  9. Like
    Cristian.Fatu got a reaction from tomko in Struggle to tune the scope probes that come with Analog Discovery 2   
    Hello,
    When contacting Digikey you can inform them that Digilent approves this replacement.
    Best Regards,
    Cristian Fatu
  10. Like
    Cristian.Fatu reacted to Ana-Maria Balas in Stopping ZMOD DAC   
    In the Eclypse-SW project, did you right click design_1_wrapper_hw_platform_0 -> Change Hardware Platform Specification -> then selected the downloaded design_1_wrapper.hdf from above?

    Then regenerate the BSP sources:

  11. Like
    Cristian.Fatu reacted to Ana-Maria Balas in Stopping ZMOD DAC   
    Hello @NithinA,
    I added the changes to the AXI_Zmod_DAC1411 IP on branch feature/zmod-support in vivado-library repository.
    https://github.com/Digilent/vivado-library/tree/feature/zmod-support
    If you want to update the hardware project with upgraded IP, you will have to:
    1. git checkout the hw for the zmod_dac demo
    2. cd into repo/vivado-library
    3. git checkout feature/zmod-support with the latest changes
    4. go to Vivado tcl console and create the hw project:
    set argv ""; source digilent-vivado-scripts/digilent-vivado-checkout.tcl 5. in Reports/Report IP Status verify that /ZmodDAC_0/AXI_ZmodDAC1411_v1_0_0 has the Rev.23 (latest revision)
    6. generate bitstream
    7. update the sw project with new bitstream
    In case you don't want to follow the above steps for creating the hardware project, here is the new bitstream file for ZmodDAC1411_Demodesign_1_wrapper.hdf.
     
  12. Like
    Cristian.Fatu got a reaction from SimonH in ZedBoard not turning ON   
    From your description we suspect that something is broken between J20 and SW8. A simple suggestion is to remove the fuse (F5) and replace it with part 0603SFF500F/32-2. If this is not possible you may try to short it.
  13. Like
    Cristian.Fatu got a reaction from shahabamo in JTAG-HS2 firmware erased by accident   
    I have sent you on your e-mail the link to the repair utility and the instructions.
    Since this application should only be used just in emergency situations like this one, we prefer to keep in some kind of "shadow" and we don't want to have it posted on the forum. We provide it when requested.
×
×
  • Create New...