discadv_sim.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:3k
- //
- // File = discadv_sim.cpp
- //
- #define SIM_NAME "DiscAdv "
- #define SIM_TITLE "Discrete Advance Testbed 2 "
- #include "global_stuff.h"
- //=====================
- // model includes
- #include "bitgen.h"
- #include "bitwav.h"
- #include "disc_delay_tester.h"
- #include "discrete_adv_T.h"
- #include "siganchr.h"
- //=========================================================
- main()
- {
- #include "sim_preamble.cpp"
- //=========================================================================
- // Misc special processing
- //=========================================================================
- // Allocate signals
- BIT_SIGNAL(bit_seq);
- BIT_SIGNAL(bit_clock);
- FLOAT_SIGNAL(test_sig);
- FLOAT_SIGNAL(test_sig_2);
- FLOAT_SIGNAL(advanced_test_sig);
- FLOAT_SIGNAL(baseband_wave);
- //============================================================
- // Construct, initialize and connect models
- /// EnclaveNumber = 0;
- BitGener* bit_gen = new BitGener( "bit_gen ",
- CommSystem,
- bit_seq );
- BitsToWave* wave_gen = new BitsToWave( "wave_gen ",
- CommSystem,
- bit_seq,
- test_sig,
- bit_clock );
- // Control<bool>* delay_chg_enab = new Control<bool>( "delay_chg_enab ",
- // CommSystem );
- // Control<int>* dynam_int_adv = new Control<int>( "dynam_int_adv ",
- // CommSystem );
- // Control<float>* dynam_float_adv = new Control<float>( "dynam_float_adv ",
- // CommSystem );
- // DiscreteDelayTester< float >* dyn_delay_knob = new DiscreteDelayTester<float>(
- // "dyn_delay_knob ",
- // CommSystem,
- // test_sig,
- // test_sig_2,
- // dynam_int_adv,
- // delay_chg_enab );
- DiscreteAdvance<float>* advance_1 = new DiscreteAdvance<float>(
- "advance_1 ",
- CommSystem,
- test_sig,
- advanced_test_sig);
- // advanced_test_sig,
- // dynam_int_adv,
- // delay_chg_enab );
- SignalAnchor* temp_anchor = new SignalAnchor( "temp_anchor ",
- CommSystem,
- test_sig,
- 0.125, //samp_rate
- 4096 ); //block_size
- //=============================================================
- #include "sim_postamble.cpp"
- return 0;
- }