digital_pll.h
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:1k
源码类别:

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = digital_pll.h
  3. //
  4. #ifndef _DIGITAL_PLL_H_
  5. #define _DIGITAL_PLL_H_
  6. #include "signal_T.h"
  7. #include "anlg_filt_iir.h"
  8. class DigitalPLL : public PracSimModel
  9. {
  10. public:
  11.    DigitalPLL( char* instance_nam,
  12.                PracSimModel *outer_model,
  13.                Signal<float> *in_signal,
  14.                Signal<float> *filt_err_signal,
  15.                Signal<float> *ref_signal,
  16.                Signal<float> *vco_freq_sig,
  17.                Signal<float> *ref_phase_sig,
  18.                Signal<float> *out_signal );
  19.    ~DigitalPLL(void);
  20.    void Initialize(void);
  21.    int Execute(void);
  22. private:
  23.    double Samp_Intvl;
  24.    Signal<float> *fsig_Input;
  25.    Signal<float> *fsig_Filtered_Error;
  26.    Signal<float> *fsig_Osc_Output;
  27.    Signal<float> *fsig_Osc_Freq;
  28.    Signal<float> *fsig_Osc_Phase;
  29.    Signal<float> *fsig_Output;
  30.    bool m_UsingDco;
  31.    bool Prev_Input_Positive;
  32.    double Time_Of_Samp;
  33.    double Prev_Filt_Val;
  34.    double Prev_Cap_Val;
  35.    double Supply_Volts;
  36.    double Prev_Time_Zc;
  37.    double Prev_Osc_Phase;
  38.    int Prev_State;
  39.    double Tau_1, Tau_2;
  40.    float Prev_Input_Val;
  41.    double K_Sub_0, K_Sub_D;
  42.    double OscOutput;
  43.    double Phi_Sub_2;
  44.    double Omega_Sub_0;
  45.    double Center_Freq_Hz;
  46.    float Osc_Output_Prev_Val;
  47.    AnalogFilterByIir<float> *Filter_Core;
  48. };
  49. #endif