#include #include #include #include #include #include #include #include #include #include "f_map_pipe.h" #include "tests_ioxos.h" /* JAM2021: try different length for this test */ #define MBSPIPE_BASE 0x40000000 #define MBSPIPE_LEN 0x30000000 unsigned long PipeBase = MBSPIPE_BASE; unsigned long PipeLen = MBSPIPE_LEN; struct timeval ti, to; struct timezone tz; int check_data_buf( int *buf, int size, int data) { int i; int errors=0; for( i = 0; i < size/sizeof(int); i++) { if( buf[i] != data+i) { //printf("data error: %08x != %08x\n", buf[i], data+i); errors++; //break; } } return errors; } int main (int argc, char *argv[]) { volatile int *cnt_A, *cnt_B; int i, j, cnt, iex; int dt; long errorcount=0; long totalwords=0; printf("entering consumer_ioxos, chunksize=0x%x ...\n", IOXOS_CHUNK_SIZE_INTS); int* pipebase = f_map_pipe (PipeBase, PipeLen); if (pipebase == 0) { printf ("ERROR in %s: could not map pipe at base 0x%x with length 0x%x \n", basename (argv[0]), PipeBase, PipeLen); exit (EXIT_FAILURE); } printf("pipebase = %p : %x\n", pipebase, *pipebase); for (j=0;j