Topic: Sending a digital signal through the FMC151  (Read 14261 times)

lmunoz May 27, 2014, 05:24 PM (#15)

  • Member
  • *
  • Posts: 160
We use Visual Studio Express 2012, which is free.  But it should work with any c++ compiler you just need to set your build paths to have:

C:\Program Files (x86)\4dsp\4FM Core Development Kit\Incs
C:\Program Files (x86)\4dsp\4FM Core Development Kit\Libs
  • « Last Edit: May 27, 2014, 05:28 PM by lmunoz »

erikmeade May 29, 2014, 02:19 PM (#16)

  • Member
  • *
  • Posts: 14
Thanks, I downloaded that and compiled with no problems, however, still no cigar. Graphs look pretty similar but I'll attach them anyway.

I'm out of attachments for the last 2 variations, but they look pretty much the same, anything else I can try?

lmunoz May 29, 2014, 07:59 PM (#17)

  • Member
  • *
  • Posts: 160
Hi Erik,

I want to confirm a few things. What revision of the ML605 do you have? I have an ML605 + FMC151 with me so I tried a few tests for you, attached are my results.

ml605_fmc151.txt - Your console output should pretty much look exactly the same

fmc151_clock0.png - default settings for tapiod_clk, loooks good to me

fmc151_clock7.png - I set tapiod_clk = 0x7, now my signal is distorted


My distorted signal looks similar to yours. My guess is you have a different revision of the ML605 than me and the IODELAY must need to be adjusted.


Can you go into fmc15x_adc.cpp and at line 140 add the following:

Code: [Select]
        if(rc!=SIPIF_ERR_OK)
            return rc;
        Sleep(10);
        rc = sipif_writesipreg(bar_adc_phy+0, 0x08);
        if(rc!=SIPIF_ERR_OK)
            return rc;
        Sleep(10);
    }

printf("%x \n", tapiod_clk);    ////////////////// // ADD THIS
printf("%x \n", tapiod_data);  ///////////////// // ADD THIS

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // ADC SPI Test, read back one of the programmed registers to see programming was succesfull
    rc = fmc15x_adc_readreg(bar_adc, 0x50, &dword);


Now try changing the tap values to

tapiod_clk = 0x07; tapiod_data = 0x05;

Can you attach your your console output and both your adc0.txt and adc1.txt. This will allow me to confirm your software build and firmware is working correctly.

If that all works then I think it is a matter of adjusting tapiod_clk to the correct delay.


Regards,
Luis

erikmeade May 30, 2014, 02:01 PM (#18)

  • Member
  • *
  • Posts: 14
Sure thing!

So the ML605 board I have is revision D. Also, just to check one more time, the .bit file is supposed to be this one: C:\Program Files (x86)\4dsp\Common\Firmware\Recovery\418_ml605_fmc151\ml605_fmc151.bit right? Mine has a size of 4544 kb, just to further verify.

I only have the adc0 hooked up currently, but since both channels go to the same texas instruments adc, it shouldn't be an issue, if you really want me to hook up both to a dac, I can.

Attached is the clk 07 and data 05 results. Along with the program output.

Also, I'd like to say a big thank you to you guys for helping me troubleshoot this.




lmunoz May 30, 2014, 03:37 PM (#19)

  • Member
  • *
  • Posts: 160
From your console it looks like everything as far as firmware / software is correct.  What is the serial number of your FMC151, I can look up the test records of your board before it was shipped out. Also seeing ADC1 would be useful information just to make sure it is behaving the same.

The most likely cause of the problem we are seeing is that the clock and data are not being aligned correctly.  Like I said I can reproduce your problem my adding delay on the clock. You've tried delays of 7, 14, and 21. Can you try a few more and see if you get any better results.


 tapiod_clk = 0x03; tapiod_data = 0x00;
 tapiod_clk = 0x0A; tapiod_data = 0x00;
 tapiod_clk = 0x0F; tapiod_data = 0x00;
 tapiod_clk = 0x12; tapiod_data = 0x00;
 tapiod_clk = 0x19; tapiod_data = 0x00;
 tapiod_clk = 0x1e; tapiod_data = 0x00;

This should pretty much cover the range.


lmunoz May 30, 2014, 05:16 PM (#20)

  • Member
  • *
  • Posts: 160
Hi Erik,

There is someone having the same issue as you here:

http://www.4dsp.nl/forum/index.php/topic,2922.msg15758.html#msg15758

For him a delay of 26 works.  Download and try the Fmc15xAPP_Search_Tapiod_clk.rar linked in that post. It will try all taps and save them to a text file then you can see which is a good range. An automatically calibration will be available in the near future.



Regards,
Luis

erikmeade June 02, 2014, 10:20 AM (#21)

  • Member
  • *
  • Posts: 14
Success!

Here are my results for both 26 and 27.

It's nice to have figured this out.

The serial number appears to be KDJV 000024.

paulleons June 02, 2014, 01:32 PM (#22)

  • Member
  • *
  • Posts: 30
Hello Eric,


I use the same board as yours (FMC 151) and I have the same problem as yours. If a tap_delay of 26 is given, I get a much better sine wave.  I wonder if this was a mistake in board design itself as we have the same problem with the same fix to the problem.


4DSP has agreed to have long term fix to this problem, but I am skeptical on how they are going to fix it.


For now, the tap_delay of 26 works for the reference design, but once, we do make changes to reference design (add custom IP's etc) , then the tap_delay of 26 may not work.




Paul

lmunoz June 02, 2014, 02:27 PM (#23)

  • Member
  • *
  • Posts: 160
Paul that is true.

What you are running is a reference design for the FMC151 made to run on many different carrier boards. Different carrier boards will have variations in trace lengths and termination schemes etc., so there is a calibration step that is required to interface to the ADC.

If you are rebuilding the firmware you might also need to re-calibrate if the interface is changing, you can use a PLL or BUG or BUFR and they get placed in different locations etc, so different delays can result from changes in firmware as well.

Ideally there would be an automatic calibration sequence before sampling begins, which we have in other reference designs. Unfortunately for the FMC151 reference design this is done manually in software at the moment.

  • « Last Edit: June 02, 2014, 02:32 PM by lmunoz »

erikmeade June 03, 2014, 03:25 PM (#24)

  • Member
  • *
  • Posts: 14
Hey paul, have you gotten the reference design to work by adjusting the CLK_IDELAY to 26 or 27?


For me, using the fmc15xapp produces good sine waves, however using the reference design I have yet to find a valid CLK_IDELAY value, if you've found one, let me know. :)

paulleons June 03, 2014, 07:19 PM (#25)

  • Member
  • *
  • Posts: 30
Hello Eric,

Good to hear from you.

As far as I understand, the tap_delay of 26 will only work for their bitstream located in the following directory.

C:\Program Files (x86)\4dsp\Common\Firmware\Recovery\418_ml605_fmc151

If you create an ISE project from  Steller IP and create a bit-stream, this tap_delay may not work. If you create your custom IP to this design, firstly you should make sure that the design meets the timing requirements.

I was provided with an exe file that would generate tap_delay of 0 to 31 and generate text files when you run FMC150xAPP (attached in the post). I also created a matlab file which accepts a tap_delay and plot's the graph corresponding to tap delay using Matlab(attached in post).

My plan is to generate text files for all tap_delay, plot these text files in Matlab and select a tap_delay which gives decent results. Then adding this tap_delay in the visual studio, you could Build-Generate-Run a new FMC150xAPP application. Technically, this should fix the issue related to synchronization. 
[/size]
4DSP do not do any kind of support for custom design unless a support contract is purchased. So, I feel that it would be great if we could help each other and solve problem related to our custom design. [/font]Please feel free to contact me through email at paulleons@gmail.com if you need anything. [/font]

[/size]regards,
[/size]Paul Leons
[/size]

erikmeade June 04, 2014, 10:48 AM (#26)

  • Member
  • *
  • Posts: 14
Hey paul,


So yeah with the Stellar IP generated ISE project and VHDL code, I ran the FMC15xAPP for the 0-31 and noticed that at delays 0, 1, 2, 3, 8, and 11 that I got a normal wave. So in order to tailor the board to my purposes I think I will be working with this VHDL code. Timing delay issues will probably rise up again but hopefully it's not too bad.


Also, that sounds great. Likewise, if you run into any problems, you can contact me at emeade@imra.com, because I might have previously encountered the same problem.

arnaudNL June 13, 2014, 08:08 AM (#27)

  • 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.