Changeset 9296
- Timestamp:
- 04/28/09 15:02:08 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/mcarrick/ossiedev-trunk/components/CostasLoop/CostasLoopFPGAInterface.c
r9294 r9296 26 26 if( memfd == -1 ) 27 27 { 28 printf("C an't open /dev/mem.\n");28 printf("CL-Interface: Can't open /dev/mem.\n"); 29 29 exit(EXIT_FAILURE); 30 30 } 31 printf(" /dev/mem opened.\n");31 printf("CL-Interface: /dev/mem opened.\n"); 32 32 33 33 mapped_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, memfd, dev_base & ~MAP_MASK); 34 34 if( mapped_base == (void *) -1 ) 35 35 { 36 printf("C an't map the memory to user space.\n");36 printf("CL-Interface: Can't map the memory to user space.\n"); 37 37 exit(EXIT_FAILURE); 38 38 } 39 printf(" Memory mapped at address %p.\n", mapped_base);39 printf("CL-Interface: Memory mapped at address %p.\n", mapped_base); 40 40 41 41 mapped_dev_base = mapped_base + (dev_base & MAP_MASK); … … 65 65 if (val != 0xDEADDEAD) 66 66 { 67 printf("C aught exit sequence on the bus, stopping poll loop\n");68 printf(" Waited for %d cycles\n", j);67 printf("CL-Interface: Caught exit sequence on the bus, stopping poll loop\n"); 68 printf("CL-Interface: Waited for %d cycles\n", j); 69 69 samples[0] = val; 70 70 stop = 1; // stop waiting for FPGA circuit, start reading … … 75 75 if (stop == 0) 76 76 { 77 printf(" Never received ready flag\n");77 printf("CL-Interface: Never received ready flag\n"); 78 78 } 79 79 else 80 80 { 81 printf(" Reading back 512 samples\n");81 printf("CL-Interface: Reading back 512 samples\n"); 82 82 83 83 // read back 512 samples … … 93 93 for (p = 0; p < 512; p++) 94 94 { 95 printf(" Sample %d: #%x\n", p, samples[p]);95 printf("CL-Interface: Sample %d: #%x\n", p, samples[p]); 96 96 } 97 97 } … … 102 102 if( munmap(mapped_base, MAP_SIZE) == -1 ) 103 103 { 104 printf("C an't unmap memory from user space.\n");104 printf("CL-Interface: Can't unmap memory from user space.\n"); 105 105 exit(EXIT_FAILURE); 106 106 }