This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

interfacing of dac34sh84evm and fpga ml605 to generate sine wave

Other Parts Discussed in Thread: CDCE62005, DAC34SH84

I have to generate a sine wave using look up table. The DAC board uses differential inputs. Should the clock provided also be differential? Also should i provide differential clock pins of the fpga board? or should it be from the lpc connector? How can i provide dataclk? Does it have the same source as DACClk?

This is my code

----------------------------------------------------------------------------------

-- Company:

-- Engineer:

--

-- Create Date:    14:37:49 01/23/2013

-- Design Name:

-- Module Name:    sinediffoutput - Behavioral

-- Project Name:

-- Target Devices:

-- Tool versions:

-- Description:

--

-- Dependencies:

--

-- Revision:

-- Revision 0.01 - File Created

-- Additional Comments:

--

----------------------------------------------------------------------------------

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use ieee.numeric_std.all;

use IEEE.STD_LOGIC_ARITH.ALL;

Library UNISIM;

use UNISIM.vcomponents.all;

 

-- Uncomment the following library declaration if using

-- arithmetic functions with Signed or Unsigned values

--use IEEE.NUMERIC_STD.ALL;

 

-- Uncomment the following library declaration if instantiating

-- any Xilinx primitives in this code.

--library UNISIM;

--use UNISIM.VComponents.all;

 

entity sinediffoutput is

port (clk :in  std_logic;

                 diff_data : out  std_logic_vector(7 downto 0);

    diff_data_n : out std_logic_vector(7 downto 0)

   );

end sinediffoutput;

 

 

architecture Behavioral of sinediffoutput is

                signal i : integer range 0 to 30:=0;

                signal data : std_logic_vector(7 downto 0);

                signal data_temp : std_logic_vector(7 downto 0);

                signal dataout : integer range -128 to 127;

                type memory_type is array (0 to 29) of integer range -128 to 127;

                --ROM for storing the sine values generated by MATLAB.

                signal sine : memory_type :=(0,16,31,45,58,67,74,77,77,74,67,58,45,31,16,0,

                -16,-31,-45,-58,-67,-74,-77,-77,-74,-67,-58,-45,-31,-16);

 

begin

 

                sine_generation: process(clk)

                begin

                                  --to check the rising edge of the clock signal

                                if(rising_edge(clk)) then    

                                                dataout <= sine(i);

                                                i <= i+ 1;

                                                if(i >= 29) then

                                                                i <= 0;

                                                end if;

                                end if;

                end process;

               

                data_buffering: process(clk)

                begin

                                  --to check the rising edge of the clock signal

                                if(rising_edge(clk)) then    

                                                data <= conv_std_logic_vector(dataout, 8);

                                end if;

                end process;     

               

 

 buffer_to_diff7 : OBUFDS

  port map(

    I  => data(7), -- Buffer input

    O  => diff_data(7),

    OB => diff_data_n(7)

  );

  buffer_to_diff6 : OBUFDS

  port map(

    I  => data(6), -- Buffer input

    O  => diff_data(6),

    OB => diff_data_n(6)

  );

  buffer_to_diff5 : OBUFDS

  port map(

    I  => data(5), -- Buffer input

    O  => diff_data(5),

    OB => diff_data_n(5)

  );

  buffer_to_diff4 : OBUFDS

  port map(

    I  => data(4), -- Buffer input

    O  => diff_data(4),

    OB => diff_data_n(4)

  );

  buffer_to_diff3 : OBUFDS

  port map(

    I  => data(3), -- Buffer input

    O  => diff_data(3),

    OB => diff_data_n(3)

  );

  buffer_to_diff2 : OBUFDS

  port map(

    I  => data(2), -- Buffer input

    O  => diff_data(2),

    OB => diff_data_n(2)

  );

  buffer_to_diff1 : OBUFDS

  port map(

    I  => data(1), -- Buffer input

    O  => diff_data(1),

    OB => diff_data_n(1)

  );

  buffer_to_diff0 : OBUFDS

  port map(

    I  => data(0), -- Buffer input

    O  => diff_data(0),

    OB => diff_data_n(0)

  );

 

end Behavioral;

 

  • Jas,

    The DAC34SH84EVM has the J9 CLKIN SMA connector to accept the external single-ended clock source. The J9 connector connects to the CDCE62005 clock distribution chip to generate the differential LVPECL DACCLKp/n for the DAC sampling clock, and also the differential LVDS signal for the FPGA. You can use the FPGA clock from the DAC34SH84EVM as a reference to your ML605EVM.

    The DATACLK and DACCLK must have frequency relationship related to the interpolation ratio. The DAC's FIFO can absorb slight phase/time difference to ease your timing constraints.  

    The DATACLK from your ML605 to the DAC34SH84EVM has to be LVDS DC coupled. It must have the proper setup/hold time with the data coming out of the FPGA.

    For more details, please refer to the DAC34SH84EVM user's guide and design package (including schematics and layout). The DAC34SH84 datasheet application section also decribes the connection methods for the clock input.

    http://www.ti.com/litv/pdf/slau432

    http://www.ti.com/litv/zip/slac518

    -KH

  • Hi Kang,
    Thank you so much for your reply.
    ML605 has a differential 200 Mhz clock source and a 66 MHz single ended clock source. SO, will it be ok if i convert the differential 200 MHz clock to single ended and provide it to the SMA connector of the DAC and use the differential clock for DATACLK?

    Also, do you know the purpose of the differential clocks provided in the lpc connectors? When are they used?
    The clock is LVDS. DO i hav to do anything to make it DC COUPLED LVDS? Actually, this is the first time I am working with fpga's so I had a few doubts.
    THANK YOU

    Regards,
    JAS 

  • Jas,

    Usually the clock source coming from the FPGA may have too much jitter and may degrade the DAC performance. For initially bring-up, you may try the 66MHz single-ended clock source. For evaluation, you may need to think about a lab grade signal generator. The DAC34SH84EVM also has on-board CDCE62005 clock synthesizer, which you can use it to configure the clocks that you need. You may want to refer to the following forum post for some of the example settings that we went through.

    http://e2e.ti.com/support/data_converters/high_speed_data_converters/f/68/t/224608.aspx

    I am not too familiar with the ML605 and the clocks provided in the LPC connector. You will need to refer to the ML605 manual for this.

    For DAC348x DATACLK input and LVDS DATA Input, the DAC has on-chip 100ohm terminations for these inputs. Therefore, if you have configured your FPGA the appropriate LVDS drivers for these input, the connection should be a straight-through between the DAC and FPGA without additional caps or resistors.

    -KH