/******************************************************************************
 * Copyright (c) 2010 Texas Instruments Incorporated - http://www.ti.com
 * 
 *  Redistribution and use in source and binary forms, with or without 
 *  modification, are permitted provided that the following conditions 
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright 
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the 
 *    documentation and/or other materials provided with the   
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 ****************************************************************************
 *
 * Project     EVM
 * @file       main.c
 * 
 * @brief      EVM srio test example functions
 *  
 * @ingroup    EVM_SRIO_TEST
 *
 ****************************************************************************
 *                                                                                          
 * "$Revision: 1.2 $"
 * "$Date: 2011/02/24 15:59:18 $"
 *
 ***************************************************************************/


/****************************************************************************
 *                                 Includes                                 *
 ****************************************************************************/

#include "srio_tst.h"
#include "mydebug.h"
#define TRACEBUFFLEN 3072

 
/****************************************************************************
 *                                  Types                                   *
 ****************************************************************************/


/****************************************************************************
 *                             Public Functions                             *
 ****************************************************************************/

void main(void)
{
    char GlobalBuffer[TRACEBUFFLEN];
    char LocalBuffer[TRACEBUFFLEN];

    //Initialize debug trace buffer for myprintf
    SetMyDebugBuffer(GlobalBuffer,LocalBuffer, TRACEBUFFLEN);

    // Test Dsp internal srio loopback, port 0 in 4X mode at 5Gb without srio switch
    //do_SRIO_Test(SRIOTST_INTERNAL_LOOPBACK_4x_P0);
    
    // Test inter Dsp communication, port 2 in 1X mode at 5Gb without srio switch
    //do_SRIO_Test(SRIOTST_INTERDSP_1X_P2);

    // Test inter Dsp communication, port 3 in 1X mode at 5Gb without srio switch
    //do_SRIO_Test(SRIOTST_INTERDSP_1X_P3);

    // Test inter Dsp communication, port 2 in 2X mode at 5Gb without srio switch
    do_SRIO_Test(SRIOTST_INTERDSP_2X_P2);

    // Test inter Dsp communication, port 0 in 1X mode at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_INTERDSP_SWITCH_1X_P0);

    // Test inter Dsp communication, port 1 in 1X mode at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_INTERDSP_SWITCH_1X_P1);

    // Test Dsp srio switch loopback, port 0 in 1x mode at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_SWITCH_LOOPBACK_1X_P0);
    
    // Test Dsp srio switch loopback, port 1 in 1x mode at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_SWITCH_LOOPBACK_1X_P1);

    // Test SRIO dsp loopback through AMC, port0 1x mode (needs external AMC loopback jig) at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_AMC_LOOPBACK_1X_P0);
    
    // Test SRIO dsp loopback through AMC, port1 1x mode (needs external AMC loopback jig) at 5Gb, through srio switch
    //do_SRIO_Test(SRIOTST_AMC_LOOPBACK_1X_P1);
}

/*****************************************************************************\
* End of main.c
\*****************************************************************************/


