Topic: Understanding Fmc15xAPP  (Read 12661 times)

JoaoFerreira November 27, 2014, 01:55 PM

  • Member
  • *
  • Posts: 31
Hello,


after reading all the documents and trying to understand all the code of Fmc15xAPP, i'm now trying to change this APP to make it do the things that i want.


What i want to do is to input a sinewave in the ADC0 and retrieve it in DAC0 output. So i came up with a method but i don't know if i can do it like this or if i have to change the firmware first.


Method:


1 - Enable ADC0 and DAC 0 using the function " fmc15x_ctrl_enable_channel() "
2 - ARM DAC0 and make ADC FIFO ready to store data after a trigger event using "fmc15x_ctrl_arm_dac()"
3 - Send a trigger event to ADC0  using "fmc15x_ctrl_sw_trigger()"
4 - Load new data in the DAC WFM using "fmc15x_ctrl_prepare_wfm_load()"


My method is in the right way or i really have to change the firmware?


Other thing that i have a doubt is about the max and min input voltage, in the FMC 150 user manual it says that the input voltage range is 2Vp-p, this means that for example the max amplitude of my sinewave is 1V?


Thanks in advance

lmunoz November 28, 2014, 07:40 PM (#1)

  • Member
  • *
  • Posts: 160
Hi,

First keep in mind that the ADC is going at 250 Msps 14-bit and the DAC is going at 800 Msps 16-bit, so if you just capture ADC data and send it to the DAC you might not get the output you expect.

You can capture data from the ADC to the host computer then upload it to the DAC using the method you describe, i.e., using the functions provided. This is not in real time, you have to change the firmware for that.  But again you will probably not get the expected output without doing some signal processing on the data because of the different sampling rates and the discontinuity.


2Vp-p means the signal oscillates between max 1V and min -1V because it is AC coupled.
 

Regards,
Luis

JoaoFerreira November 29, 2014, 01:53 PM (#2)

  • Member
  • *
  • Posts: 31
But what i want is to input a sinewave in ADC, put the data from ADC in a BUFFER and then input that data in the DAC and get the output from the DAC to an oscilloscope to see if the input sinewave is correctly processed by the ADC and DAC.

So i think using the method i explained, in the previous post, i can get what i want because in the FMC15xAPP code provided the ADC is working 250 MSPS and the DAC at 125 MSPS if i'm not wrong. And as my input will be a 30 MHZ sinewave i think there i'll not have problems or will i have??

Thanks for the help
Joao

arnaudNL December 01, 2014, 06:43 AM (#3)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Joao,


You are trying to change FMC150 star to be streaming. Generally removing wave form memories, increasing the data bus width or clock, etc..


As Luis explained, you will need to make sure the ADC samples are aligned properly for the DAC.


According to Nyquist, you would need 60Msps in order to sample a 30MHz signal.


These aspects are really outside the scope of standard technical support. The reference design is doing the reverse way round, output something from the DAC, loopback that to ADC (using loopback cables) and making sure what we sample is correct.


I hope that helps,
Arnaud

JoaoFerreira December 01, 2014, 02:27 PM (#4)

  • Member
  • *
  • Posts: 31
So basically what you are saying is that i have to change the firmware of FMC150 star to do what i want, right? And to do that i have to change the VHD sip_fmc150 file?


I know that according to Nyquist, i need 60Msps in order to sample a 30MHz signal, that means the DAC should work at that frequency not bigger or smaller? And the ADC should work at that rythm too?


I know that thus is outside the scope of standard technical support and i really appreciate the help you gave.


Best regards,
Joao

arnaudNL December 01, 2014, 06:42 PM (#5)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Hello Joao,


I am not able to really go in depth in such inquiries. According the elements in your email, the ADC is sampling at 250Msps.


The DAC have a waveform memory. This goes against what you try to achieve I believe, once again thinking out of the box, you want to have the DAC playing one sample each time a sample is pushed to its input wormhole. The DAC have interpolation settings to look at and so on. But this is what I mean by streaming, you want to remove the waveform memory from the DAC side and then connect both wormholes (input and output) with it other.


There might be format difference in the output data (coming from the A/D) and the input data (expected from the D/A) you need to compensate from.


It is surely a fun design to implement. You could place a "DSP" star on the path, a custom star you create doing a 180 degree phase inversion.


I hope this extra information helps you out. Always feel free to ask, we are always glad to help our customer when we can!


Best Regards,
Arnaud

JoaoFerreira December 01, 2014, 07:02 PM (#6)

  • Member
  • *
  • Posts: 31
First of all, thanks again for the help.


I know that you are doing something you don't need to do, but i think i'm not understanding correctly and i'm confused. Correct me if 'im wrong please, so what you are saying is that i need to change the VHD file (sip_fmc150) in order to remove the waveform memory from DAC, and to conect DAC output to ADC input or i just need to change the stellar ip design? Probably both things.


Sorry again about the confusion


 
  • « Last Edit: December 01, 2014, 07:05 PM by JoaoFerreira »

arnaudNL December 02, 2014, 05:18 AM (#7)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Dear Joao,


This is what I expect yes. You would need to change FMC150 star vhdl code to bypass the waveform memory in the source fmc150 star code in your library and modify your stellarIP schematic to connect input ports to output ports.


You can also decide to only focus on modifying the ISE project created by StellarIP; Modify FMC150 code as well as the top level.


I hope that helps!


Best Regards,
Arnaud

arnaudNL December 03, 2014, 06:46 AM (#8)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Dear Joao,


Was this information sufficient, can I close this topic?


Best Regards,
Arnaud

JoaoFerreira December 03, 2014, 01:55 PM (#9)

  • Member
  • *
  • Posts: 31

You can also decide to only focus on modifying the ISE project created by StellarIP; Modify FMC150 code as well as the top level.



I understand almost everything you said, the only thing that i have doubt is what i quoted above. Correct me if i'm wrong, what you said is that i can generate the ISE project and try to modify it to do what i want, but i need to modify the FMC 150  VHDL code as well?


After some brainstorming, i came to an hypothesis, so since i need to change sip_fmc150 vhdl file to make it connect ADC0 to DAC0, i thought well if i just want to do that and while doing that recording some samples, in a txt file for example, i just need a similar stellar ip star for FMC 150, but without DAC0 and DAC1 wormhole in and ADC1 out wormhole, and insert a DAC0 wormhole out.


So basically i do that out wormholes to process the samples and recording them to a txt file with the help of zedboard connection. And i just have to connect in FMCxAPP the ADC with DAC to make the internal operation of do a bypass from data of ADC to DAC.


In other hand, i'm thinking that this internal bypass is probably needed to program in stellar IP. But that seems strange because i just need to connect the ADC0 wormhole out to DAC0 wormhole in, and i can do this in the reference design given. Of course then in the FMCxAPP how should i input data in ADC? I assume that if i put a sinewave in the ADC input port of FMC150 it is already acquiring data? And  probably doing this bypass means that i'll connect ADC to DAC directly and assuming that ADC is acquiring data, it is transmiting data to DAC at the same time.

Thanks for all the help and patience.


Best regards,


Joao
  • « Last Edit: December 03, 2014, 03:47 PM by JoaoFerreira »

arnaudNL December 04, 2014, 05:00 AM (#10)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Joao,


If you want to reference design to behave differently than it does you will indeed need to modify the project and its source files yeah..


If you need extra guidance, please contact sales@4dsp.com or saleseurope@4dsp.com to discuss some training or custom project for your needs.


Best Regards,
Arnaud

arnaudNL December 09, 2014, 12:08 PM (#11)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
This topic is being closed because the issue is considered as resolved by 4DSP. Feel free to create a new topic for any further inquiries.