comparison modules/bluespec/Pygar/core/AudioCoreSystem.cpp @ 65:cf8bb3038cbd pygar svn.66

[svn r66] sim passes
author punk
date Tue, 11 May 2010 09:05:22 -0400
parents bf08daea854e
children 44cc00df1168
comparison
equal deleted inserted replaced
64:bf08daea854e 65:cf8bb3038cbd
33 { 33 {
34 34
35 printf("InitSend Side\n"); 35 printf("InitSend Side\n");
36 pthread_mutex_init(&lock, NULL); 36 pthread_mutex_init(&lock, NULL);
37 pthread_cond_init(&cond, NULL); 37 pthread_cond_init(&cond, NULL);
38 sem_init(&throttle, 0, 64); 38 sem_init(&throttle, 0, 256);
39 39
40 // enable stats 40 // enable stats
41 //STATS_DEVICE_SERVER_CLASS::GetInstance()->SetupStats(); 41 //STATS_DEVICE_SERVER_CLASS::GetInstance()->SetupStats();
42 } 42 }
43 43
101 assert(inputFile1); 101 assert(inputFile1);
102 assert(inputFile); 102 assert(inputFile);
103 103
104 int count = 0; 104 int count = 0;
105 105
106 sleep(1);
106 printf("main:samples about to start sending %d\n", count); 107 printf("main:samples about to start sending %d\n", count);
107 108
108 //rlm: here we read both files. later refactor into a function. 109 //rlm: here we read both files. later refactor into a function.
109 // also, this will terminate when the FIRST file reaches its end. 110 // also, this will terminate when the FIRST file reaches its end.
110 while( (fread(&sample, 2, 1, inputFile)) || (fread(&sample1, 2 , 1, inputFile1))) 111 while( (fread(&sample, 2, 1, inputFile)) || (fread(&sample1, 2 , 1, inputFile1)))
118 { 119 {
119 printf("\n***SOFT_CORE PASSED***\n"); 120 printf("\n***SOFT_CORE PASSED***\n");
120 coreFin = true; 121 coreFin = true;
121 } 122 }
122 */ 123 */
123 124 sem_wait(&throttle);
125
124 if(count%1000 == 0) 126 if(count%1000 == 0)
125 printf("main: %d\n", count); 127 printf("main: %d\n", count);
126 count++; 128 count++;
127 129
128 //rlm: two files. 130 //rlm: two files.