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.

Representing captured data in sine wave form

Hi,

I'm using the LM97600 to capture the data from an analog signal using WaveVision. However, I've recently attempted to capture the data using Matlab instead and I am able to capture the data, however I have a few questions regarding how the data is encoded. In Wavevision, I'm able to view the captured data in the form of a sine wave, however when I'm trying to plot the data captured in Matlab, I'm not getting a sine wave. Is there something that I'm missing ?

Thanks!

  • Hi Syed

    Wavevision applies some formatting/parsing to the raw data transferred from the board. I think that is probably the issue. I'll track down the details of how the data is handled for that board and post back here.

    Best regards,

    Jim B

  • Thanks for your help with this Jim. Any updates on this ?

  • Jim, 

    I believe I've narrowed down the issue and it looks like the data that I'm getting from the board is invalid. I was able to reproduce the issue with WaveVision as well and got similar waveforms to the ones that I was getting in Matlab. I was able to resolve the issue with WaveVision by using the Sync Req option before capturing the data but I'm not sure what action WaveVision performs when using that option so that I can implement that functionality in Matlab as well. Can you shed some light on it ? Thanks!

  • Hi Syed

    The Sync Req item in the script sends some configuration and control information to the FPGA.

    The relevant code from the script (spio5.5_xc5vsx95t_LM97600.dut.cpp) is:

    /*
        -------------------------------------------------------------------------
        BEGIN: lm97600_Sync_GTP_Link

        Example call: ret = lm97600_Sync_GTP_Link(data);
        -------------------------------------------------------------------------
    */
    Interface_Ret lm97600_Sync_GTP_Link(Adc08s5000_Data* data) {
        Interface_Ret ret; 
        WvWord temp_read;
     
        script_debug_out_pre("lm97600_Sync_GTP_Link");
        script_debug_out_endl();

        ret = lm97600_Check_GTP_Link(data);
        if (ret == INTERFACE_RET_OK) {
            // Don't perform sync if link is good
            return script_process_return(ret, "lm97600_Sync_GTP_Link: Good link status, don't perform sync");
        }

        script_debug_out_pre("lm97600_Sync_GTP_Link: performing Re-sync\n");
        // setup sync pulse width to a healthy amount: default = 0x80
        data->fpga_adc_sync_width = FPGA_ADC_SYNC_WIDTH_DEFAULT;
        script_request_mm_wr(0, FPGA_ADC_SYNC_WIDTH_ADDR, data->fpga_adc_sync_width);

        // Ensure that the following are set to 0. default=0x00
        //    Bit[7](R/W) - man_sync_req_ur (R/W for now, should be self clearing)
        //    Bit[6](R/W) - man_sync_en_ur Manual Sync Enable
        //    Bit[5](R/W) - static_sync (static sync level)
        //    Bit[4](R/W) - static_sync_en (static sync enable, overrides manual one shot)
        //    Bits [3:0] (R) read only, not affected by write.
        data->fpga_adc_sync_csr = FPGA_ADC_SYNC_CSR_DEFAULT;
        script_request_mm_wr(0, FPGA_ADC_SYNC_CSR_ADDR, data->fpga_adc_sync_csr);

        // Enable man_sync_en_ur and write to FPGA
        script_util_set_bits(
     1,
     FPGA_ADC_SYNC_CSR_MAN_SYNC_EN_UR_P,
     FPGA_ADC_SYNC_CSR_MAN_SYNC_EN_UR_S,
     &data->fpga_adc_sync_csr
            );   
        script_request_mm_wr(0, FPGA_ADC_SYNC_CSR_ADDR, data->fpga_adc_sync_csr);

        // Enable man_sync_req_ur and write to FPGA
        script_util_set_bits(
     1,
     FPGA_ADC_SYNC_CSR_MAN_SYNC_REQ_UR_P,
     FPGA_ADC_SYNC_CSR_MAN_SYNC_REQ_UR_S,
     &data->fpga_adc_sync_csr
            );   
        script_request_mm_wr(0, FPGA_ADC_SYNC_CSR_ADDR, data->fpga_adc_sync_csr);
       
        // Set all back to 0x00 to return to default state.
        data->fpga_adc_sync_csr = FPGA_ADC_SYNC_CSR_DEFAULT;
        script_request_mm_wr(0, FPGA_ADC_SYNC_CSR_ADDR, data->fpga_adc_sync_csr);   

        script_debug_out_pre("lm97600_Sync_GTP_Link: Re-sync done, checking link\n");
       
        ret = lm97600_Check_GTP_Link(data);
        if (ret != INTERFACE_RET_OK) {
            // Sync was unsuccessful
            return script_process_return(ret, "lm97600_Sync_GTP_Link: Re-sync was unsuccessful");
        }

        return script_process_return(
            INTERFACE_RET_OK,
            "lm97600_Sync_GTP_Link: Re-sync performed successfully and Link is okay"
            );

    /*
        -------------------------------------------------------------------------
        END: lm97600_Sync_GTP_Link
        -------------------------------------------------------------------------
    */

    There is another section that follows that allows checking status as well.

    Unfortunately that's about all of the help I am able to provide. The software engineer who wrote the C++ script is no longer at TI.

    I hope this information is helpful.

    Best regards,

    Jim B

  • Thanks a lot for your help so far Jim! Could you tell me a bit on how WaveVision actually interacts with the C++ script ? I believe this is general for all DUTs and the way Wavevision is setup.

  • Hi Syed

    Unfortunately we don't really have much support for the software side of things, especially on the Wavevision tools. You might be able to find what you're looking for in a few other threads which have documentation, links and discussion among other customers doing the same kind of thing.

    http://e2e.ti.com/support/data_converters/high_speed_data_converters/w/design_notes/1783.aspx

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

    I hope this is helpful.

    Best regards,

    Jim B