diff modules/bluespec/Pygar/core/AudioCoreSystem.h @ 13:6d461680c6d9 pygar svn.14

[svn r14] more stuff
author punk
date Tue, 27 Apr 2010 09:03:28 -0400
parents
children 0cfbb1e2de22
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/modules/bluespec/Pygar/core/AudioCoreSystem.h	Tue Apr 27 09:03:28 2010 -0400
     1.3 @@ -0,0 +1,56 @@
     1.4 +//
     1.5 +// INTEL CONFIDENTIAL
     1.6 +// Copyright (c) 2008 Intel Corp.  Recipient is granted a non-sublicensable 
     1.7 +// copyright license under Intel copyrights to copy and distribute this code 
     1.8 +// internally only. This code is provided "AS IS" with no support and with no 
     1.9 +// warranties of any kind, including warranties of MERCHANTABILITY,
    1.10 +// FITNESS FOR ANY PARTICULAR PURPOSE or INTELLECTUAL PROPERTY INFRINGEMENT. 
    1.11 +// By making any use of this code, Recipient agrees that no other licenses 
    1.12 +// to any Intel patents, trade secrets, copyrights or other intellectual 
    1.13 +// property rights are granted herein, and no other licenses shall arise by 
    1.14 +// estoppel, implication or by operation of law. Recipient accepts all risks 
    1.15 +// of use.
    1.16 +//
    1.17 +
    1.18 +// possibly use include paths to hide existing modules?
    1.19 +
    1.20 +#ifndef __AUDIO_CORE_CONNECTED_APPLICATION__
    1.21 +#define __AUDIO_CORE_CONNECTED_APPLICATION__
    1.22 +
    1.23 +#include <stdio.h>
    1.24 +#include <pthread.h>
    1.25 +#include <semaphore.h>
    1.26 +
    1.27 +#include "asim/provides/virtual_platform.h"
    1.28 +
    1.29 +#include "asim/rrr/client_stub_AUDIOCORERRRSYSTEM.h"
    1.30 +
    1.31 +typedef enum {
    1.32 +  EndOfFile = 0,
    1.33 +  Data = 1
    1.34 +} AudioProcessorControl; 
    1.35 +
    1.36 +
    1.37 +typedef class CONNECTED_APPLICATION_CLASS* CONNECTED_APPLICATION;
    1.38 +class CONNECTED_APPLICATION_CLASS : public PLATFORMS_MODULE_CLASS
    1.39 +{
    1.40 +  private:
    1.41 +    AUDIOCORERRR_CLIENT_STUB clientStub;
    1.42 +    static sem_t throttle;
    1.43 +    static pthread_mutex_t lock;
    1.44 +    static pthread_cond_t  cond;    
    1.45 +
    1.46 +  public:
    1.47 +    CONNECTED_APPLICATION_CLASS(VIRTUAL_PLATFORM vp);
    1.48 +    ~CONNECTED_APPLICATION_CLASS();
    1.49 +    static void EndSimulation();
    1.50 +    static void UpdateSemaphore();
    1.51 +
    1.52 +    // init
    1.53 +    void Init();
    1.54 +
    1.55 +    // main
    1.56 +    void Main();
    1.57 +};
    1.58 +
    1.59 +#endif