rsp_regr_vu_mac.c 2.94 KB
#include <sys/types.h>
#ifdef __sgi__
#include <sys/sbd.h>
#endif
#include <sys/stat.h>
#include <sys/mman.h>
#ifdef __sgi__
#include <sys/sema.h>
#endif
#include <netinet/in.h>

#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <getopt.h>

#include <rcp.h>
#include <rsp.h>

/* From $ROOT/usr/include/ide, which is installed from PR/diags/include */
#include "diag.h"
#include "dbg_comm.h"

#define RSP_TEST_BASE	001

static int NumFailures = 0;

/* From rsp_regr_common.c: */
extern int generic_rsp_regression (const char *file_name);
extern void imem_init(FILE *file_p);
extern int rsp_regrInit();
extern int rsp_regrDo(TEST_REF *test_ref);
extern int rsp_regr(TEST_REF TestRefs[]);

int vmacf_clamp();
int vmacf_h();
int vmacf_q();
int vmacf_v();
int vmacf_w();
int vmacq_v();
int vmacq_v1();
int vmacq_v2();
int vmacu_clamp();
int vmacu_h();
int vmacu_q();
int vmacu_v();
int vmacu_w();

/*
 * An array of tests, each of which corresponds to a separate menu
 * item callable from the master ide menu.
 */
static TEST_REF TestRefs[] = {
  {"vmacf_clamp", 		RSP_TEST_BASE+0, vmacf_clamp},
  {"vmacf_h", 			RSP_TEST_BASE+1, vmacf_h},
  {"vmacf_q", 			RSP_TEST_BASE+2, vmacf_q},
  {"vmacf_v", 			RSP_TEST_BASE+3, vmacf_v},
  {"vmacf_w", 			RSP_TEST_BASE+4, vmacf_w},
  {"vmacq_v", 			RSP_TEST_BASE+5, vmacq_v},
  {"vmacq_v1", 			RSP_TEST_BASE+6, vmacq_v1},
  {"vmacq_v2", 			RSP_TEST_BASE+7, vmacq_v2},
  {"vmacu_clamp", 		RSP_TEST_BASE+8, vmacu_clamp},
  {"vmacu_h", 			RSP_TEST_BASE+9, vmacu_h},
  {"vmacu_q", 			RSP_TEST_BASE+10, vmacu_q},
  {"vmacu_v", 			RSP_TEST_BASE+11, vmacu_v},
  {"vmacu_w", 			RSP_TEST_BASE+12, vmacu_w},
    {"",0,0}
};

static int failed_tests[512];

/*
 * diagnostic entry point:
 *
 * Each separately invokable ide diagnostic command corresponds to an
 * independent ".c" module; the entry point herein must match
 * the test name as specified in the rspcmd.awk script.  These command
 * names correspond to the names you see from the ide menu.  For this
 * module, there will be an ide command "rsp_regr".
 */

int rsp_regr_vu_mac(void) {rsp_regr(TestRefs);}

/*
 * Tests
 */

int vmacf_clamp() {return generic_rsp_regression("tests/vmacf_clamp");}
int vmacf_h() {return generic_rsp_regression("tests/vmacf_h");}
int vmacf_q() {return generic_rsp_regression("tests/vmacf_q");}
int vmacf_v() {return generic_rsp_regression("tests/vmacf_v");}
int vmacf_w() {return generic_rsp_regression("tests/vmacf_w");}
int vmacq_v() {return generic_rsp_regression("tests/vmacq_v");}
int vmacq_v1() {return generic_rsp_regression("tests/vmacq_v1");}
int vmacq_v2() {return generic_rsp_regression("tests/vmacq_v2");}
int vmacu_clamp() {return generic_rsp_regression("tests/vmacu_clamp");}
int vmacu_h() {return generic_rsp_regression("tests/vmacu_h");}
int vmacu_q() {return generic_rsp_regression("tests/vmacu_q");}
int vmacu_v() {return generic_rsp_regression("tests/vmacu_v");}
int vmacu_w() {return generic_rsp_regression("tests/vmacu_w");}