52           sc_time sample_period,     
    54           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"),
    55               sample_period(sample_period), op_mode(op_mode)
    57 #ifdef FORSYDE_INTROSPECTION    60         arg_vec.push_back(std::make_tuple(
"sample_period", ss.str()));
    63         arg_vec.push_back(std::make_tuple(
"op_mode", ss.str()));
    71     sc_time sample_period;
    75     CTTYPE previousVal, currentVal;
    82         currentVal = previousVal = 0;
    88         currentVal = (
CTTYPE)from_abst_ext(iport1.read(), previousVal);
    93         set_range(subsig, sample_period*iter, sample_period*(iter+1));
    97             set_function(subsig,[pv](
const sc_time& t)
   105             CTTYPE dv = currentVal - previousVal;
   107             unsigned long itr = iter;
   108             sc_time sp = sample_period;
   109             set_function(subsig,[pv,itr,sp,dv](
const sc_time& t)
   111                 return (t-itr*sp)/sp*dv + pv;
   118         WRITE_MULTIPORT(oport1, subsig)
   119         wait(get_end_time(subsig) - sc_time_stamp());
   121         previousVal = currentVal;
   126 #ifdef FORSYDE_INTROSPECTION   129         boundInChans.resize(1);     
   130         boundInChans[0].port = &iport1;
   131         boundOutChans.resize(1);    
   132         boundOutChans[0].port = &oport1;
   154           sc_time sample_period      
   155           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"),
   156               sample_period(sample_period)
   158 #ifdef FORSYDE_INTROSPECTION   159         std::stringstream ss;
   161         arg_vec.push_back(std::make_tuple(
"sample_period", ss.str()));
   169     sc_time sample_period;
   174     sc_time local_time, sampling_time;
   179         local_time = sampling_time = SC_ZERO_TIME;
   184         while (sampling_time >= local_time)
   186             in_ss = iport1.read();
   187             local_time = get_end_time(in_ss);
   193         out_val = in_ss(sampling_time);
   198         WRITE_MULTIPORT(oport1, out_val)
   199         wait(sampling_time - sc_time_stamp());
   200         sampling_time += sample_period;
   205 #ifdef FORSYDE_INTROSPECTION   208         boundInChans.resize(1);     
   209         boundInChans[0].port = &iport1;
   210         boundOutChans.resize(1);    
   211         boundOutChans[0].port = &oport1;
   235           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1")
   244     std::vector<sub_signal > vecCTsignal; 
   248     unsigned int samplingType, iter;
   261         auto e = iport2.read();
   262         samplingType = unsafe_from_abst_ext(get_value(e)); 
   263         samplingT = get_time(e);
   279                     vecCTsignal.push_back(f);
   281             if((samplingT >= get_start_time(f)) && (samplingT < get_end_time(f)))
   283                 WRITE_MULTIPORT(oport1,
ttn_event<T>(f(samplingT), samplingT))
   284                 wait(samplingT - sc_time_stamp());
   286             else if(samplingT >= get_end_time(f))
   290                     vecCTsignal.push_back(f);
   291                 if ((samplingT >= get_start_time(f)) && (samplingT < get_end_time(f)))
   293                     WRITE_MULTIPORT(oport1,
ttn_event<T>(f(samplingT), samplingT))
   294                     wait(samplingT - sc_time_stamp());
   298                     while(samplingT >= get_end_time(f))
   302                             vecCTsignal.push_back(f);
   304                     WRITE_MULTIPORT(oport1,
ttn_event<T>(f(samplingT), samplingT))
   305                     wait(samplingT - sc_time_stamp());
   311                 while(!vecCTsignal.empty())
   313                     if(samplingT >= get_end_time(vecCTsignal.front()))
   314                         vecCTsignal.erase(vecCTsignal.begin());
   317                         WRITE_MULTIPORT(oport1,
ttn_event<T>(vecCTsignal.front()(samplingT), samplingT))
   318                         wait(samplingT - sc_time_stamp());
   322                 if(vecCTsignal.empty())
   329             while(!vecCTsignal.empty())
   331                 if(samplingT >= get_end_time(vecCTsignal.front()))
   332                     vecCTsignal.erase(vecCTsignal.begin());
   336             if(vecCTsignal.empty())
   344 #ifdef FORSYDE_INTROSPECTION   347         boundInChans.resize(2);     
   348         boundInChans[0].port = &iport1;
   349         boundInChans[1].port = &iport2;
   350         boundOutChans.resize(1);    
   351         boundOutChans[0].port = &oport1;
   375           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"), samp_period(samp_period)
   385     sc_time local_time, sampling_time;
   391         local_time = sampling_time = SC_ZERO_TIME;
   396         while (sampling_time >= local_time)
   398             in_ss = iport1.read();
   399             local_time = get_end_time(in_ss);
   410         WRITE_MULTIPORT(oport1,
ttn_event<T>(out_val, sampling_time))
   411         wait(sampling_time - sc_time_stamp());
   412         sampling_time += samp_period;
   417 #ifdef FORSYDE_INTROSPECTION   420         boundInChans.resize(1);     
   421         boundInChans[0].port = &iport1;
   422         boundOutChans.resize(1);    
   423         boundOutChans[0].port = &oport1;
   450           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"),
   453 #ifdef FORSYDE_INTROSPECTION   454         std::stringstream ss;
   456         arg_vec.push_back(std::make_tuple(
"op_mode", ss.str()));
   467     CTTYPE previousVal, currentVal;
   468     sc_time previousT, currentT;
   474         previousVal = currentVal = 0;
   475         previousT = currentT = SC_ZERO_TIME;
   480         while (currentT <= previousT)
   482             auto in_ev = iport1.read();
   483             currentVal = (double)from_abst_ext(get_value(in_ev), previousVal);
   484             currentT = get_time(in_ev);
   490         set_range(subsig, previousT, currentT);
   494             set_function(subsig,[=](sc_time t){
   500             CTTYPE dv = currentVal - previousVal;
   501             sc_time dt = currentT - previousT;
   502             sc_time pt = previousT;
   504             set_function(subsig,[=](sc_time t)->
CTTYPE{
   505                     return ((t-pt)/dt*dv + pv);
   512         WRITE_MULTIPORT(oport1, subsig)
   513         wait(get_end_time(subsig) - sc_time_stamp());
   514         previousVal = currentVal;
   515         previousT = currentT;
   520 #ifdef FORSYDE_INTROSPECTION   523         boundInChans.resize(1);     
   524         boundInChans[0].port = &iport1;
   525         boundOutChans.resize(1);    
   526         boundOutChans[0].port = &oport1;
   548           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1")
   550 #ifdef FORSYDE_INTROSPECTION   551         std::stringstream ss;
   553         arg_vec.push_back(std::make_tuple(
"o1toks", ss.str()));
   573         auto tok = iport1.read();
   574         while (is_absent(tok))
   576         *val = unsafe_from_abst_ext(tok);
   583         WRITE_MULTIPORT(oport1, *val)
   591 #ifdef FORSYDE_INTROSPECTION   594         boundInChans.resize(1);     
   595         boundInChans[0].port = &iport1;
   596         boundOutChans.resize(1);    
   597         boundOutChans[0].port = &oport1;
   619           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1")
   621 #ifdef FORSYDE_INTROSPECTION   622         std::stringstream ss;
   624         arg_vec.push_back(std::make_tuple(
"i1toks", ss.str()));
   644         *val = iport1.read();
   656 #ifdef FORSYDE_INTROSPECTION   659         boundInChans.resize(1);     
   660         boundInChans[0].port = &iport1;
   661         boundOutChans.resize(1);    
   662         boundOutChans[0].port = &oport1;
   684           sc_time sample_period     
   685           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"),
   686               sample_period(sample_period)
   688 #ifdef FORSYDE_INTROSPECTION   689         std::stringstream ss;
   691         arg_vec.push_back(std::make_tuple(
"sample_period", ss.str()));
   699     sc_time sample_period;
   711         cur_time = SC_ZERO_TIME;
   716         *tok = iport1.read();
   717         if (is_present(*tok))
   718             *val = unsafe_from_abst_ext(*tok);
   725         WRITE_MULTIPORT(oport1, 
tt_event<T>(*val,cur_time))
   726         wait(cur_time - sc_time_stamp());
   727         cur_time += sample_period;
   736 #ifdef FORSYDE_INTROSPECTION   739         boundInChans.resize(1);     
   740         boundInChans[0].port = &iport1;
   741         boundOutChans.resize(1);    
   742         boundOutChans[0].port = &oport1;
   764           sc_time sample_period     
   765           ) : 
process(_name), iport1(
"iport1"), oport1(
"oport1"),
   766               sample_period(sample_period)
   768 #ifdef FORSYDE_INTROSPECTION   769         std::stringstream ss;
   771         arg_vec.push_back(std::make_tuple(
"sample_period", ss.str()));
   779     sc_time sample_period;
   791         cur_time = SC_ZERO_TIME;
   792         *tok = iport1.read();
   797         while (get_time(*tok) <= cur_time)
   799             *prev_val = get_value(*tok);
   800             *tok = iport1.read();
   809         cur_time += sample_period;
   814 #ifdef FORSYDE_INTROSPECTION   817         boundInChans.resize(1);     
   818         boundInChans[0].port = &iport1;
   819         boundOutChans.resize(1);    
   820         boundOutChans[0].port = &oport1;
 Time-tagged data types. 
Definition: tt_event.hpp:32
 
SDF::SDF_in< T > iport1
port for the input channel 
Definition: mis.hpp:610
 
SY2SDF(sc_module_name _name)
The constructor requires the module name. 
Definition: mis.hpp:547
 
The sub-signal type used to construct a CT signal. 
Definition: sub_signal.hpp:38
 
DDE::DDE_in< T > iport1
port for the input channel 
Definition: mis.hpp:755
 
SY::SY_out< CTTYPE > oport1
port for the output channel 
Definition: mis.hpp:146
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:696
 
CT2SY(sc_module_name _name, sc_time sample_period)
The constructor requires the module name. 
Definition: mis.hpp:153
 
double CTTYPE
Type of the values used in the CT MoC (currently fixed) 
Definition: sub_signal.hpp:27
 
DDE2CT(sc_module_name _name, A2DMode op_mode=HOLD)
The constructor requires the module name. 
Definition: mis.hpp:448
 
The namespace for ForSyDe. 
Definition: abssemantics.hpp:30
 
Process constructor for a DDE2CT MoC interfaces. 
Definition: mis.hpp:437
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:629
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:776
 
SDF::SDF_out< T > oport1
port for the output channel 
Definition: mis.hpp:540
 
A2DMode
Operation modes for the SY2CT converter. 
Definition: mis.hpp:30
 
Process constructor for a SY2DDE MoC interfaces. 
Definition: mis.hpp:672
 
CT::CT_in iport1
port for the input channel 
Definition: mis.hpp:365
 
SY::SY_out< T > oport1
port for the output channel 
Definition: mis.hpp:611
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:68
 
CT::CT_in iport1
port for the input channel 
Definition: mis.hpp:145
 
The UT_out port is used for output ports of UT processes. 
Definition: ut_process.hpp:68
 
The CT_out port is used for output ports of CT processes. 
Definition: ct_process.hpp:64
 
SDF2SY(sc_module_name _name)
The constructor requires the module name. 
Definition: mis.hpp:618
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:379
 
SY::SY_in< T > iport1
port for the input channel 
Definition: mis.hpp:539
 
Process constructor for a SY2SDF MoC interfaces. 
Definition: mis.hpp:536
 
DDE::DDE_out< T > oport1
port for the output channel 
Definition: mis.hpp:676
 
SY::SY_out< T > oport1
port for the output channel 
Definition: mis.hpp:756
 
Process constructor for a SDF2SY MoC interface. 
Definition: mis.hpp:607
 
CT::CT_out oport1
port for the output channel 
Definition: mis.hpp:44
 
Process constructor for a CT2DDE MoC interface. 
Definition: mis.hpp:222
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:166
 
DDE::DDE_out< T > oport1
port for the output channel 
Definition: mis.hpp:227
 
The process constructor which defines the abstract semantics of execution. 
Definition: abssemantics.hpp:212
 
CT2DDEf(sc_module_name _name, sc_time samp_period)
The constructor requires the module name. 
Definition: mis.hpp:373
 
SY2CT(sc_module_name _name, sc_time sample_period, A2DMode op_mode=HOLD)
The constructor requires the module name. 
Definition: mis.hpp:51
 
Process constructor for a CT2SY MoC interface. 
Definition: mis.hpp:142
 
CT2DDE(sc_module_name _name)
The constructor requires the module name. 
Definition: mis.hpp:234
 
Absent-extended data types. 
Definition: abst_ext.hpp:32
 
CT::CT_in iport1
port for the input channel 
Definition: mis.hpp:225
 
DDE2SY(sc_module_name _name, sc_time sample_period)
The constructor requires the module name. 
Definition: mis.hpp:763
 
Process constructor for a CT2DDEf MoC interface. 
Definition: mis.hpp:362
 
The UT_in port is used for input ports of UT processes. 
Definition: ut_process.hpp:55
 
The CT_in port is used for input ports of CT processes. 
Definition: ct_process.hpp:53
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:461
 
DDE::DDE_out< T > oport1
port for the output channel 
Definition: mis.hpp:366
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:558
 
The DDE_out port is used for output ports of DDE processes. 
Definition: dde_process.hpp:69
 
DDE::DDE_in< unsigned int > iport2
port for the sampling channel 
Definition: mis.hpp:226
 
Process constructor for a SY2CT MoC interfaces. 
Definition: mis.hpp:40
 
DDE::DDE_in< T > iport1
port for the input channel 
Definition: mis.hpp:440
 
std::string forsyde_kind() const 
Specifying from which process constructor is the module built. 
Definition: mis.hpp:239
 
SY::SY_in< CTTYPE > iport1
port for the input channel 
Definition: mis.hpp:43
 
SY2DDE(sc_module_name _name, sc_time sample_period)
The constructor requires the module name. 
Definition: mis.hpp:683
 
SY::SY_in< T > iport1
port for the input channel 
Definition: mis.hpp:675
 
Process constructor for a DDE2SY MoC interface. 
Definition: mis.hpp:752
 
CT::CT_out oport1
port for the output channel 
Definition: mis.hpp:441