#include #include #include #include "ti_dsp.h" /* ---------------------------------------------------------------------- Send data to the input FPGA. This routine copies 32-bit words from memory area s2 into the input FPGA at address s1, stopping after wc words have been copied. This routine is also used to send data to the dual-port RAM. The Offline flag is set high by this routine. Clearing the Offline flag is caller's responsibility. ---------------------------------------------------------------------- */ void ti_dpcpy(ti_dsp_p dsp, unsigned int s1, unsigned int *s2, int wc) { int i; /* --- Make sure the FPGA can receive data */ if ((dsp->controlWord & CW_OFFLINE) == 0){ dsp->controlWord |= CW_OFFLINE; vme_dsp_write(dsp, TI_CONTROL, dsp->controlWord); } /* --- Set the address register */ vme_dsp_write(dsp, TI_DP_ADDR, s1); /* --- Send the data */ #ifdef SLOW for(i=0; i 1){ int i; unsigned int* data = (unsigned int *) malloc(wc*sizeof(int)); if (data == NULL){ perror("ti_dpset:malloc()"); exit(1); } for(i=0; i