itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
sim_casdec_x.hpp
1 
7 #ifndef SIM_CASDEC_X_HPP
8 #define SIM_CASDEC_X_HPP
9 
10 #include <complex>
11 
12 #include <itpp/itbase.h>
13 #include <itpp/comm/sequence.h>
14 
15 #include "sim_fir_x.hpp"
16 #include "sim_counter.hpp"
17 
18 
19 using namespace itpp;
20 using namespace std;
21 
22 
23 namespace SIM
24 {
25 
31 {
32  SIM::counter cnt;
33  SIM::fir_x f_x;
34 
35 public:
36 
38  {
39  cnt.set_N(2);
40  cnt.reset();
41  };
42 
44  {
45  };
46 
50  void set_taps(cvec c);
51 
54  void reset();
55 
61  cmat process(const bvec &ce, const cvec &x);
62 
63 };
64 
69 class casdec_x
70 {
71  vector <dec_cell_x> dec_cell_vec;
72  int N;
73  int output_cell_index;
74 
75 public:
76 
78  {
79  N = 0;
80  output_cell_index = 0;
81  };
82 
84  {
85  };
86 
90  void set_decimator_order(int k);
91 
95  void set_decimator_rate(int r);
96 
100  void set_taps(cvec c);
101 
104  void reset();
105 
111  cmat process(const bvec &ce, const cvec &x);
112 
113 };
114 
115 } // SIM
116 #endif //CASDEC_XCASDEC_X
117 
cascade of by 2 complex decimators Core function SIM::casdec_x.process()
Definition: sim_casdec_x.hpp:69
void set_N(int N)
Definition: sim_counter.cpp:14
binary modulo N up counter Core function SIM::counter.generate()
Definition: sim_counter.hpp:24
single cell of casdec_x - /2 complex FIR decimator and /2 counter Core function SIM::dec_cell_x.process()
Definition: sim_casdec_x.hpp:30
SIM layer implements low level simulation models with itpp base classes as operational types...
Definition: sim_amp.hpp:15
void reset()
Definition: sim_counter.hpp:70
Definition: _sci_assert.cpp:35
casdec_x()
Definition: sim_casdec_x.hpp:77
dec_cell_x()
Definition: sim_casdec_x.hpp:37
~casdec_x()
Definition: sim_casdec_x.hpp:83
complex FIR filter Core function: SIM::fir_x.process()
Definition: sim_fir_x.hpp:36
~dec_cell_x()
Definition: sim_casdec_x.hpp:43