annotate modules/bluespec/Pygar/common/AudioProcessor.h @ 8:74716e9a81cc pygar svn.9

[svn r9] Pygar now has the proper directory structure to play nicely with awb. Also, the apm file for audio-core willcompile successfully.
author rlm
date Fri, 23 Apr 2010 02:32:05 -0400
parents
children
rev   line source
rlm@8 1 //
rlm@8 2 // INTEL CONFIDENTIAL
rlm@8 3 // Copyright (c) 2008 Intel Corp. Recipient is granted a non-sublicensable
rlm@8 4 // copyright license under Intel copyrights to copy and distribute this code
rlm@8 5 // internally only. This code is provided "AS IS" with no support and with no
rlm@8 6 // warranties of any kind, including warranties of MERCHANTABILITY,
rlm@8 7 // FITNESS FOR ANY PARTICULAR PURPOSE or INTELLECTUAL PROPERTY INFRINGEMENT.
rlm@8 8 // By making any use of this code, Recipient agrees that no other licenses
rlm@8 9 // to any Intel patents, trade secrets, copyrights or other intellectual
rlm@8 10 // property rights are granted herein, and no other licenses shall arise by
rlm@8 11 // estoppel, implication or by operation of law. Recipient accepts all risks
rlm@8 12 // of use.
rlm@8 13 //
rlm@8 14
rlm@8 15 // possibly use include paths to hide existing modules?
rlm@8 16
rlm@8 17 #ifndef __AUDIO_PROCESSOR_CONNECTED_APPLICATION__
rlm@8 18 #define __AUDIO_PROCESSOR_CONNECTED_APPLICATION__
rlm@8 19
rlm@8 20 #include <stdio.h>
rlm@8 21 #include <pthread.h>
rlm@8 22 #include <semaphore.h>
rlm@8 23
rlm@8 24 #include "asim/provides/virtual_platform.h"
rlm@8 25
rlm@8 26 #include "asim/rrr/client_stub_AUDIOPROCESSORRRR.h"
rlm@8 27
rlm@8 28 typedef enum {
rlm@8 29 EndOfFile = 0,
rlm@8 30 Data = 1
rlm@8 31 } AudioProcessorControl;
rlm@8 32
rlm@8 33
rlm@8 34 typedef class CONNECTED_APPLICATION_CLASS* CONNECTED_APPLICATION;
rlm@8 35 class CONNECTED_APPLICATION_CLASS : public PLATFORMS_MODULE_CLASS
rlm@8 36 {
rlm@8 37 private:
rlm@8 38 AUDIOPROCESSORRRR_CLIENT_STUB clientStub;
rlm@8 39 static sem_t throttle;
rlm@8 40 static pthread_mutex_t lock;
rlm@8 41 static pthread_cond_t cond;
rlm@8 42
rlm@8 43 public:
rlm@8 44 CONNECTED_APPLICATION_CLASS(VIRTUAL_PLATFORM vp);
rlm@8 45 ~CONNECTED_APPLICATION_CLASS();
rlm@8 46 static void EndSimulation();
rlm@8 47 static void UpdateSemaphore();
rlm@8 48
rlm@8 49 // init
rlm@8 50 void Init();
rlm@8 51
rlm@8 52 // main
rlm@8 53 void Main();
rlm@8 54 };
rlm@8 55
rlm@8 56 #endif