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

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = discadv_sim.cpp
  3. //
  4. #define SIM_NAME "DiscAdv"
  5. #define SIM_TITLE "Discrete Advance Testbed 2"
  6. #include "global_stuff.h"
  7. //=====================
  8. // model includes
  9. #include "bitgen.h"
  10. #include "bitwav.h"
  11. #include "disc_delay_tester.h"
  12. #include "discrete_adv_T.h"
  13. #include "siganchr.h"
  14. //=========================================================
  15. main()
  16. {
  17.    #include "sim_preamble.cpp"
  18.   //=========================================================================
  19.   //  Misc special processing
  20.   //=========================================================================
  21.   //  Allocate signals
  22.   BIT_SIGNAL(bit_seq);
  23.   BIT_SIGNAL(bit_clock);
  24.   FLOAT_SIGNAL(test_sig);
  25.   FLOAT_SIGNAL(test_sig_2);
  26.   FLOAT_SIGNAL(advanced_test_sig);
  27.   FLOAT_SIGNAL(baseband_wave);
  28.   //============================================================
  29.   //  Construct, initialize and connect models
  30.  /// EnclaveNumber = 0;
  31.   BitGener* bit_gen = new BitGener( "bit_gen",
  32.                                       CommSystem,
  33.                                       bit_seq );
  34.   BitsToWave* wave_gen = new BitsToWave( "wave_gen",
  35.                                            CommSystem,
  36.                                            bit_seq,
  37.                                            test_sig,
  38.                                            bit_clock );
  39. //  Control<bool>* delay_chg_enab = new Control<bool>( "delay_chg_enab",
  40. //                                                   CommSystem );
  41. //  Control<int>* dynam_int_adv = new Control<int>( "dynam_int_adv",
  42. //                                                   CommSystem );
  43. //  Control<float>* dynam_float_adv = new Control<float>( "dynam_float_adv",
  44. //                                                   CommSystem );
  45. //  DiscreteDelayTester< float >* dyn_delay_knob = new DiscreteDelayTester<float>( 
  46. //                                                  "dyn_delay_knob",
  47. //                                                  CommSystem,
  48. //                                                  test_sig,
  49. //                                                  test_sig_2,
  50. //                                                  dynam_int_adv,
  51. //                                                  delay_chg_enab );
  52.   DiscreteAdvance<float>* advance_1 = new DiscreteAdvance<float>( 
  53.                                                   "advance_1",
  54.                                                   CommSystem,
  55.                                                   test_sig,
  56.                                                   advanced_test_sig);
  57.                                                  // advanced_test_sig,
  58.                                                  // dynam_int_adv,
  59.                                                  // delay_chg_enab );
  60.   SignalAnchor* temp_anchor = new SignalAnchor( "temp_anchor",
  61.                                                 CommSystem,
  62.                                                 test_sig,
  63.                                                 0.125, //samp_rate
  64.                                                 4096 ); //block_size
  65.   //=============================================================
  66.   #include "sim_postamble.cpp"
  67.   return 0;
  68. }