/* Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/ All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * ======== fwkSim.h ======== */ #ifndef _FWK_SIM_H_ #define _FWK_SIM_H_ #include #include // Min, max number of system clock ticks (default tick = 1 msec.) #define RX_ALPHA_MIN_TICKS ( 50 ) // min setting =0 #define RX_ALPHA_MAX_TICKS ( 10000 ) // max setting =RAND_MAX #define RX_ALPHA_DELTA_TICKS ( RX_ALPHA_MAX_TICKS - RX_ALPHA_MIN_TICKS) // Number of system clock ticks between start of Rx, Tx audio timers #define RX_TX_AUDIO_DELTA_TICKS ( 1 ) // Simulated load time in system clock ticks #define DEC_CONTROL_LOAD ( 1 ) #define DEC_ACTIVATE_LOAD ( 1 ) #define DEC_RESET_LOAD ( 1 ) #define DEC_INFO_LOAD ( 1 ) #define DEC_DECODE_LOAD ( 2 ) #define DEC_DEACTIVATE_LOAD ( 1 ) // Global debug counters */ extern Uint32 gTimerRxCnt; // debug counter for timerRxAudio extern Uint32 gTimerTxCnt; // debug counter for timerTxAudio extern Uint32 gClockRxAlphaCnt; // debug counter for clockRxAlpha /* ======== timerRxFxn ======== */ // Simulate Rx audio frame clock. Void timerRxFxn(UArg a0); /* ======== timerTxFxn ======== */ // Simulate Tx audio frame clock. Void timerTxFxn(UArg a0); /* ======== clockRxAlphaFxn ======== */ // Simulate timing of Rx alpha command reception. // Commands are received at randomly computed time. // Commands executed are contained in command list in DSP build. Void clockRxAlphaFxn(UArg a0); // Simulation stop Void simStop(Void); // Simulation initialization Void simInit(Void); // Simulation start Void simStart(Void); // Simulate load Void simLoad(Uint32 loadTime); #endif /* _FWK_SIM_H_ */