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

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = dftdelay_sim.cpp
  3. //
  4. #define SIM_NAME "DftDelay"
  5. #define SIM_TITLE "DFT Delay Testbed"
  6. #include "global_stuff.h"
  7. //=====================
  8. // model includes
  9. #include "bitgen.h"
  10. #include "bitwav.h"
  11. #include "multi_tone_gen.h"
  12. #include "contin_delay_tester.h"
  13. #include "discrete_delay_T.h"
  14. #include "dft_delay_T.h"
  15. #include "siganchr.h"
  16. //=========================================================
  17. main()
  18. {
  19.    #include "sim_preamble.cpp"
  20.   //=========================================================================
  21.   //  Misc special processing
  22.   //=========================================================================
  23.   //  Allocate signals
  24.   BIT_SIGNAL(bit_seq);
  25.   FLOAT_SIGNAL(i_test_sig);
  26.   FLOAT_SIGNAL(q_test_sig);
  27.   FLOAT_SIGNAL(test_sig);
  28.   FLOAT_SIGNAL(test_sig_2);
  29.   FLOAT_SIGNAL(delayed_test_sig);
  30.   FLOAT_SIGNAL(restored_test_sig);
  31.   FLOAT_SIGNAL(baseband_wave);
  32.   //============================================================
  33.   //  Construct, initialize and connect models
  34.   MultipleToneGener* sine_gen_1 = new MultipleToneGener( "sine_gen_1",
  35.                                           CommSystem,
  36.                                           test_sig );
  37.   Control<bool>* delay_chg_enab = new Control<bool>( "delay_chg_enab",
  38.                                                    CommSystem );
  39.   Control<float>* dynam_float_dly = new Control<float>( "dynam_float_dly",
  40.                                                    CommSystem );
  41.   ContinuousDelayTester< float >* dyn_delay_knob = 
  42.                             new ContinuousDelayTester< float >( 
  43.                                                   "dyn_delay_knob",
  44.                                                   CommSystem,
  45.                                                   test_sig,
  46.                                                   test_sig_2,
  47.                                                   dynam_float_dly,
  48.                                                   delay_chg_enab );
  49.   
  50.   DftDelay<float>* delay_1 = new DftDelay<float>( "delay_1",
  51.                                     CommSystem,
  52.                                     test_sig_2,
  53.                                     delayed_test_sig);
  54.   DftDelay<float>* delay_2 = new DftDelay<float>( "delay_2",
  55.                                     CommSystem,
  56.                                     delayed_test_sig,
  57.                                     restored_test_sig);
  58. //  RateChanger* rate_changer = new RateChanger("rate_changer",
  59. //                                                       CommSystem,
  60. //                                                       test_sig,
  61. //                                                       baseband_wave);
  62. //  SignalAnchor* temp_anchor = new SignalAnchor( "temp_anchor",
  63. //                                                CommSystem,
  64. //                                                test_sig,
  65. //                                                0.0078125, //samp_rate
  66. //                                                4096 ); //block_size
  67. //  SignalAnchor* temp_anchor_3 = new SignalAnchor( "temp_anchor_3",
  68. //                                                CommSystem,
  69. //                                                ref_seq,
  70. //                                                1.0, //samp_rate
  71. //                                                128 ); //block_size
  72.   //=============================================================
  73.   #include "sim_postamble.cpp"
  74.   return 0;
  75. }