Mercurial > pygar
comparison modules/bluespec/Pygar/core/AudioCoreRRR.cpp @ 52:49049f97312c pygar svn.53
[svn r53] sends to two cores (but has issues)
author | punk |
---|---|
date | Thu, 06 May 2010 08:57:53 -0400 |
parents | 2c8166d205d5 |
children | 2991344775f8 |
comparison
equal
deleted
inserted
replaced
51:9fe5ed4af92d | 52:49049f97312c |
---|---|
22 | 22 |
23 printf("rlm: init called\n\n"); | 23 printf("rlm: init called\n\n"); |
24 outputFile = NULL; | 24 outputFile = NULL; |
25 memory = NULL; | 25 memory = NULL; |
26 fflush(stdout); | 26 fflush(stdout); |
27 count = 0; | |
27 } | 28 } |
28 | 29 |
29 // destructor | 30 // destructor |
30 AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS() | 31 AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS() |
31 { | 32 { |
88 memory->Write(0,(UINT64) address, sizeof(UINT32), &data); | 89 memory->Write(0,(UINT64) address, sizeof(UINT32), &data); |
89 } | 90 } |
90 */ | 91 */ |
91 | 92 |
92 void | 93 void |
94 AUDIOCORERRR_SERVER_CLASS::SendTerminate(UINT32 flag) | |
95 { | |
96 printf("lsp: Received Process Termination\n"); | |
97 CONNECTED_APPLICATION_CLASS::EndSimulation(); | |
98 } | |
99 | |
100 void | |
93 | 101 |
94 AUDIOCORERRR_SERVER_CLASS::SendProcessedStream(UINT16 control, UINT16 data) | 102 AUDIOCORERRR_SERVER_CLASS::SendProcessedStream(UINT16 control, UINT16 data) |
95 { | 103 { |
96 | 104 |
97 // printf("rlm: SendProcessedStream called,\n"); | 105 // printf("rlm: SendProcessedStream called,\n"); |
110 fflush(outputFile); | 118 fflush(outputFile); |
111 fclose(outputFile); | 119 fclose(outputFile); |
112 } | 120 } |
113 | 121 |
114 // Long term this should be in the data portion. But until I have code running, keep it here. | 122 // Long term this should be in the data portion. But until I have code running, keep it here. |
115 CONNECTED_APPLICATION_CLASS::EndSimulation(); | 123 count++; |
124 if (count == 2) | |
125 CONNECTED_APPLICATION_CLASS::EndSimulation(); | |
116 break; | 126 break; |
117 | 127 |
118 case Data: | 128 case Data: |
119 if(outputFile == NULL) { | 129 if(outputFile == NULL) { |
120 outputFile = fopen("out_hw.pcm","w"); | 130 outputFile = fopen("out_hw.pcm","w"); |