15 #ifndef SDF_PROCESS_CONSTRUCTORS_HPP 16 #define SDF_PROCESS_CONSTRUCTORS_HPP 44 template <
typename T0,
typename T1>
52 typedef std::function<void(std::vector<T0>&,
53 const std::vector<T1>&
65 ) :
sdf_process(_name), iport1(
"iport1"), oport1(
"oport1"),
66 o1toks(o1toks), i1toks(i1toks), _func(_func)
68 #ifdef FORSYDE_INTROSPECTION 69 std::string func_name = std::string(basename());
70 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
71 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
72 arg_vec.push_back(std::make_tuple(
"o1toks",std::to_string(o1toks)));
73 arg_vec.push_back(std::make_tuple(
"i1toks",std::to_string(i1toks)));
82 unsigned int o1toks, i1toks;
85 std::vector<T0> o1vals;
86 std::vector<T1> i1vals;
94 o1vals.resize(o1toks);
95 i1vals.resize(i1toks);
100 for (
auto it=i1vals.begin();it!=i1vals.end();it++)
106 _func(o1vals, i1vals);
111 WRITE_VEC_MULTIPORT(oport1, o1vals)
116 #ifdef FORSYDE_INTROSPECTION 119 boundInChans.resize(1);
120 boundInChans[0].port = &iport1;
121 boundOutChans.resize(1);
122 boundOutChans[0].port = &oport1;
130 template <
typename T0,
typename T1,
typename T2>
139 typedef std::function<void(std::vector<T0>&,
140 const std::vector<T1>&,
141 const std::vector<T2>&
154 ) :
sdf_process(_name), iport1(
"iport1"), iport2(
"iport2"), oport1(
"oport1"),
155 o1toks(o1toks), i1toks(i1toks), i2toks(i2toks), _func(_func)
157 #ifdef FORSYDE_INTROSPECTION 158 std::string func_name = std::string(basename());
159 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
160 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
161 arg_vec.push_back(std::make_tuple(
"o1toks",std::to_string(o1toks)));
162 arg_vec.push_back(std::make_tuple(
"i1toks",std::to_string(i1toks)));
163 arg_vec.push_back(std::make_tuple(
"i2toks",std::to_string(i2toks)));
171 unsigned int o1toks, i1toks, i2toks;
174 std::vector<T0> o1vals;
175 std::vector<T1> i1vals;
176 std::vector<T2> i2vals;
184 o1vals.resize(o1toks);
185 i1vals.resize(i1toks);
186 i2vals.resize(i2toks);
191 for (
auto it=i1vals.begin();it!=i1vals.end();it++)
193 for (
auto it=i2vals.begin();it!=i2vals.end();it++)
199 _func(o1vals, i1vals, i2vals);
204 WRITE_VEC_MULTIPORT(oport1, o1vals)
209 #ifdef FORSYDE_INTROSPECTION 212 boundInChans.resize(2);
213 boundInChans[0].port = &iport1;
214 boundInChans[1].port = &iport2;
215 boundOutChans.resize(1);
216 boundOutChans[0].port = &oport1;
224 template <
typename T0,
typename T1,
typename T2,
typename T3>
234 typedef std::function<void(std::vector<T0>&,
235 const std::vector<T1>&,
236 const std::vector<T2>&,
237 const std::vector<T3>&
251 ) :
sdf_process(_name), iport1(
"iport1"), iport2(
"iport2"), iport3(
"iport3"),
253 o1toks(o1toks), i1toks(i1toks), i2toks(i2toks), i3toks(i3toks), _func(_func)
255 #ifdef FORSYDE_INTROSPECTION 256 std::string func_name = std::string(basename());
257 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
258 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
259 arg_vec.push_back(std::make_tuple(
"o1toks",std::to_string(o1toks)));
260 arg_vec.push_back(std::make_tuple(
"i1toks",std::to_string(i1toks)));
261 arg_vec.push_back(std::make_tuple(
"i2toks",std::to_string(i2toks)));
262 arg_vec.push_back(std::make_tuple(
"i3toks",std::to_string(i3toks)));
270 unsigned int o1toks, i1toks, i2toks, i3toks;
273 std::vector<T0> o1vals;
274 std::vector<T1> i1vals;
275 std::vector<T2> i2vals;
276 std::vector<T3> i3vals;
284 o1vals.resize(o1toks);
285 i1vals.resize(i1toks);
286 i2vals.resize(i2toks);
287 i3vals.resize(i3toks);
292 for (
auto it=i1vals.begin();it!=i1vals.end();it++)
294 for (
auto it=i2vals.begin();it!=i2vals.end();it++)
296 for (
auto it=i3vals.begin();it!=i3vals.end();it++)
302 _func(o1vals, i1vals, i2vals, i3vals);
307 WRITE_VEC_MULTIPORT(oport1, o1vals)
312 #ifdef FORSYDE_INTROSPECTION 315 boundInChans.resize(3);
316 boundInChans[0].port = &iport1;
317 boundInChans[1].port = &iport2;
318 boundInChans[2].port = &iport3;
319 boundOutChans.resize(1);
320 boundOutChans[0].port = &oport1;
328 template <
typename T0,
typename T1,
typename T2,
typename T3,
typename T4>
339 typedef std::function<void(std::vector<T0>&,
340 const std::vector<T1>&,
341 const std::vector<T2>&,
342 const std::vector<T3>&,
343 const std::vector<T4>&
358 ) :
sdf_process(_name), iport1(
"iport1"), iport2(
"iport2"), iport3(
"iport3"),
359 iport4(
"iport4"), oport1(
"oport1"),
360 o1toks(o1toks), i1toks(i1toks), i2toks(i2toks), i3toks(i3toks),
361 i4toks(i4toks), _func(_func)
363 #ifdef FORSYDE_INTROSPECTION 364 std::string func_name = std::string(basename());
365 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
366 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
367 arg_vec.push_back(std::make_tuple(
"o1toks",std::to_string(o1toks)));
368 arg_vec.push_back(std::make_tuple(
"i1toks",std::to_string(i1toks)));
369 arg_vec.push_back(std::make_tuple(
"i2toks",std::to_string(i2toks)));
370 arg_vec.push_back(std::make_tuple(
"i3toks",std::to_string(i3toks)));
371 arg_vec.push_back(std::make_tuple(
"i4toks",std::to_string(i4toks)));
379 unsigned int o1toks, i1toks, i2toks, i3toks, i4toks;
382 std::vector<T0> o1vals;
383 std::vector<T1> i1vals;
384 std::vector<T2> i2vals;
385 std::vector<T3> i3vals;
386 std::vector<T4> i4vals;
394 o1vals.resize(o1toks);
395 i1vals.resize(i1toks);
396 i2vals.resize(i2toks);
397 i3vals.resize(i3toks);
398 i4vals.resize(i4toks);
403 for (
auto it=i1vals.begin();it!=i1vals.end();it++)
405 for (
auto it=i2vals.begin();it!=i2vals.end();it++)
407 for (
auto it=i3vals.begin();it!=i3vals.end();it++)
409 for (
auto it=i4vals.begin();it!=i4vals.end();it++)
415 _func(o1vals, i1vals, i2vals, i3vals, i4vals);
420 WRITE_VEC_MULTIPORT(oport1, o1vals)
425 #ifdef FORSYDE_INTROSPECTION 428 boundInChans.resize(4);
429 boundInChans[0].port = &iport1;
430 boundInChans[1].port = &iport2;
431 boundInChans[2].port = &iport3;
432 boundInChans[3].port = &iport4;
433 boundOutChans.resize(1);
434 boundOutChans[0].port = &oport1;
463 ) :
sdf_process(_name), iport1(
"iport1"), oport1(
"oport1"),
466 #ifdef FORSYDE_INTROSPECTION 467 std::stringstream ss;
469 arg_vec.push_back(std::make_tuple(
"init_val", ss.str()));
487 WRITE_MULTIPORT(oport1, init_val)
492 *val = iport1.read();
499 WRITE_MULTIPORT(oport1, *val)
506 #ifdef FORSYDE_INTROSPECTION 509 boundInChans.resize(1);
510 boundInChans[0].port = &iport1;
511 boundOutChans.resize(1);
512 boundOutChans[0].port = &oport1;
540 ) :
sdf_process(_name), iport1(
"iport1"), oport1(
"oport1"),
541 init_val(init_val), ns(n)
543 #ifdef FORSYDE_INTROSPECTION 544 std::stringstream ss;
546 arg_vec.push_back(std::make_tuple(
"init_val", ss.str()));
547 arg_vec.push_back(std::make_tuple(
"n", std::to_string(n)));
566 for (
unsigned int i=0; i<ns; i++)
567 WRITE_MULTIPORT(oport1, init_val)
572 *val = iport1.read();
579 WRITE_MULTIPORT(oport1, *val)
586 #ifdef FORSYDE_INTROSPECTION 589 boundInChans.resize(1);
590 boundInChans[0].port = &iport1;
591 boundOutChans.resize(1);
592 boundOutChans[0].port = &oport1;
615 unsigned long long take=0
617 init_val(init_val), take(take)
620 #ifdef FORSYDE_INTROSPECTION 621 std::stringstream ss;
623 arg_vec.push_back(std::make_tuple(
"init_val", ss.str()));
624 arg_vec.push_back(std::make_tuple(
"take", std::to_string(take)));
633 unsigned long long take;
635 unsigned long long tok_cnt;
641 if (take==0) infinite =
true;
651 if (tok_cnt++ < take || infinite)
652 WRITE_MULTIPORT(oport1, init_val)
658 #ifdef FORSYDE_INTROSPECTION 661 boundOutChans.resize(1);
662 boundOutChans[0].port = &oport1;
680 typedef std::function<void(T&, const T&)>
functype;
689 unsigned long long take=0
691 init_st(init_val), take(take), _func(_func)
693 #ifdef FORSYDE_INTROSPECTION 694 std::string func_name = std::string(basename());
695 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
696 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
697 std::stringstream ss;
699 arg_vec.push_back(std::make_tuple(
"init_val", ss.str()));
700 arg_vec.push_back(std::make_tuple(
"take", std::to_string(take)));
709 unsigned long long take;
712 unsigned long long tok_cnt;
723 WRITE_MULTIPORT(oport1, *cur_st)
724 if (take==0) infinite =
true;
732 _func(*cur_st, *cur_st);
737 if (tok_cnt++ < take || infinite)
738 WRITE_MULTIPORT(oport1, *cur_st)
747 #ifdef FORSYDE_INTROSPECTION 750 boundOutChans.resize(1);
751 boundOutChans[0].port = &oport1;
770 typedef std::function<void(T&, const std::string&)>
functype;
778 std::string file_name
780 file_name(file_name), _func(_func)
782 #ifdef FORSYDE_INTROSPECTION 783 std::string func_name = std::string(basename());
784 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
785 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
786 arg_vec.push_back(std::make_tuple(
"file_name", file_name));
787 arg_vec.push_back(std::make_tuple(
"o1toks", std::to_string(1)));
795 std::string file_name;
811 SC_REPORT_ERROR(name(),
"cannot open the file.");
817 if (!getline(ifs,cur_str))
825 _func(*cur_val, cur_str);
830 WRITE_MULTIPORT(oport1, *cur_val)
839 #ifdef FORSYDE_INTROSPECTION 842 boundOutChans.resize(1);
843 boundOutChans[0].port = &oport1;
864 const std::vector<T>& in_vec
867 #ifdef FORSYDE_INTROSPECTION 868 std::stringstream ss;
870 arg_vec.push_back(std::make_tuple(
"in_vec", ss.str()));
878 std::vector<T> in_vec;
880 typename std::vector<T>::iterator itr;
885 itr = in_vec.begin();
894 if (itr != in_vec.end())
896 WRITE_MULTIPORT(oport1, *itr)
905 #ifdef FORSYDE_INTROSPECTION 908 boundOutChans.resize(1);
909 boundOutChans[0].port = &oport1;
934 ) :
sdf_process(_name), iport1(
"iport1"), _func(_func)
937 #ifdef FORSYDE_INTROSPECTION 938 std::string func_name = std::string(basename());
939 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
940 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
941 arg_vec.push_back(std::make_tuple(
"i1toks", std::to_string(1)));
962 *val = iport1.read();
977 #ifdef FORSYDE_INTROSPECTION 980 boundInChans.resize(1);
981 boundInChans[0].port = &iport1;
999 typedef std::function<void(std::string&, const T&)>
functype;
1007 std::string file_name
1008 ) :
sdf_process(_name), iport1(
"iport1"), file_name(file_name),
1012 #ifdef FORSYDE_INTROSPECTION 1013 std::string func_name = std::string(basename());
1014 func_name = func_name.substr(0, func_name.find_last_not_of(
"0123456789")+1);
1015 arg_vec.push_back(std::make_tuple(
"_func",func_name+std::string(
"_func")));
1016 arg_vec.push_back(std::make_tuple(
"file_name", file_name));
1017 arg_vec.push_back(std::make_tuple(
"i1toks", std::to_string(1)));
1025 std::string file_name;
1038 ofs.open(file_name);
1041 SC_REPORT_ERROR(name(),
"cannot open the file.");
1047 *cur_val = iport1.read();
1052 _func(ostr, *cur_val);
1057 ofs << ostr << std::endl;
1066 #ifdef FORSYDE_INTROSPECTION 1069 boundInChans.resize(1);
1070 boundInChans[0].port = &iport1;
1082 template <
class ITYP>
1105 for (
int i=0;i<iport.size();i++)
1106 std::cout <<
" " << name() <<
"(" << i <<
")";
1107 std::cout << std::endl;
1109 ITYP in_val[iport.size()];
1112 for (
int i=0;i<iport.size();i++)
1113 in_val[i] = iport[i]->read();
1115 for (
int i=0;i<iport.size();i++)
1116 std::cout <<
" " << in_val[i];
1117 std::cout << std::endl;
1125 template <
class T1,
class T2>
1138 unsigned int i1toks,
1140 ) :
sdf_process(_name), iport1(
"iport1"), iport2(
"iport2"), oport1(
"oport1"),
1141 i1toks(i1toks), i2toks(i2toks)
1143 #ifdef FORSYDE_INTROSPECTION 1144 arg_vec.push_back(std::make_tuple(
"i1toks",std::to_string(i1toks)));
1145 arg_vec.push_back(std::make_tuple(
"i2toks",std::to_string(i2toks)));
1157 std::vector<T1> ival1;
1158 std::vector<T2> ival2;
1162 ival1.resize(i1toks);
1163 ival2.resize(i2toks);
1168 for (
auto i=0; i<i1toks; i++)
1169 ival1[i] = iport1.read();
1170 for (
auto i=0; i<i2toks; i++)
1171 ival2[i] = iport2.read();
1178 WRITE_MULTIPORT(oport1,std::make_tuple(ival1,ival2))
1183 #ifdef FORSYDE_INTROSPECTION 1186 boundInChans.resize(2);
1187 boundInChans[0].port = &iport1;
1188 boundInChans[1].port = &iport2;
1189 boundOutChans.resize(1);
1190 boundOutChans[0].port = &oport1;
1198 template <
class... Ts>
1210 std::vector<unsigned> in_toks)
1211 :
sdf_process(_name), oport1(
"oport1"), in_toks(in_toks)
1213 if (in_toks.size()!=
sizeof...(Ts))
1214 SC_REPORT_ERROR(name(),
"Wrong number of production rates provided");
1215 #ifdef FORSYDE_INTROSPECTION 1216 std::stringstream ss;
1218 arg_vec.push_back(std::make_tuple(
"itoks",ss.str()));
1225 std::vector<unsigned> in_toks;
1227 std::tuple<std::vector<Ts>...>* in_val;
1231 in_val =
new std::tuple<std::vector<Ts>...>;
1236 *in_val = sc_fifo_tuple_read<Ts...>(iport, in_toks);
1243 WRITE_MULTIPORT(oport1,*in_val);
1251 template<
size_t N,
class R,
class T>
1252 struct fifo_read_helper
1254 static void read(R& ret, T& t,
const std::vector<unsigned int>& itoks)
1256 fifo_read_helper<N-1,R,T>::read(ret,t,itoks);
1257 for (
unsigned int i=0;i<itoks[N];i++)
1258 std::get<N>(ret).push_back(std::get<N>(t).read());
1262 template<
class R,
class T>
1263 struct fifo_read_helper<0,R,T>
1265 static void read(R& ret, T& t,
const std::vector<unsigned int>& itoks)
1267 for (
unsigned int i=0;i<itoks[0];i++)
1268 std::get<0>(ret).push_back(std::get<0>(t).read());
1272 template<
class... T>
1273 std::tuple<std::vector<T>...> sc_fifo_tuple_read(std::tuple<
SDF_in<T>...>& ports,
1274 const std::vector<unsigned int>& itoks)
1276 std::tuple<std::vector<T>...> ret;
1277 fifo_read_helper<
sizeof...(T)-1,
1278 std::tuple<std::vector<T>...>,
1279 std::tuple<
SDF_in<T>...>>::read(ret,ports,itoks);
1283 #ifdef FORSYDE_INTROSPECTION 1286 boundInChans.resize(
sizeof...(Ts));
1287 register_ports(boundInChans, iport);
1288 boundOutChans.resize(1);
1289 boundOutChans[0].port = &oport1;
1292 template<
size_t N,
class T>
1293 struct register_ports_helper
1295 static void reg_port(std::vector<PortInfo>& boundChans, T& t)
1297 register_ports_helper<N-1,T>::reg_port(boundChans,t);
1298 boundChans[N].port = &std::get<N>(t);
1303 struct register_ports_helper<0,T>
1305 static void reg_port(std::vector<PortInfo>& boundChans, T& t)
1307 boundChans[0].port = &std::get<0>(t);
1311 template<
class... T>
1312 void register_ports(std::vector<PortInfo>& boundChans,
1315 register_ports_helper<
sizeof...(T)-1,
1316 std::tuple<
SDF_in<T>...>&>::reg_port(boundChans,ports);
1325 template <
class T1,
class T2>
1338 unsigned int o1toks,
1341 :
sdf_process(_name), iport1(
"iport1"), oport1(
"oport1"), oport2(
"oport2"),
1342 o1toks(o1toks), o2toks(o2toks)
1344 #ifdef FORSYDE_INTROSPECTION 1345 arg_vec.push_back(std::make_tuple(
"o1toks",std::to_string(o1toks)));
1346 arg_vec.push_back(std::make_tuple(
"o2toks",std::to_string(o2toks)));
1354 unsigned int o1toks, o2toks;
1357 std::tuple<std::vector<T1>,std::vector<T2>>* in_val;
1361 in_val =
new std::tuple<std::vector<T1>,std::vector<T2>>;
1366 *in_val = iport1.read();
1374 WRITE_VEC_MULTIPORT(oport1,std::get<0>(*in_val))
1375 WRITE_VEC_MULTIPORT(oport2,std::get<1>(*in_val))
1383 #ifdef FORSYDE_INTROSPECTION 1386 boundInChans.resize(1);
1387 boundInChans[0].port = &iport1;
1388 boundOutChans.resize(2);
1389 boundOutChans[0].port = &oport1;
1390 boundOutChans[1].port = &oport2;
1398 template <
class... Ts>
1410 std::vector<unsigned> out_toks)
1411 :
sdf_process(_name), iport1(
"iport1"), out_toks(out_toks)
1413 if (out_toks.size()!=
sizeof...(Ts))
1414 SC_REPORT_ERROR(name(),
"Wrong number of production rates provided");
1415 #ifdef FORSYDE_INTROSPECTION 1416 std::stringstream ss;
1418 arg_vec.push_back(std::make_tuple(
"otoks",ss.str()));
1425 std::vector<unsigned> out_toks;
1427 std::tuple<std::vector<Ts>...>* in_val;
1431 in_val =
new std::tuple<std::vector<Ts>...>;
1436 *in_val = iport1.read();
1443 fifo_tuple_write<Ts...>(*in_val, oport);
1451 template<
size_t N,
class R,
class T>
1452 struct fifo_write_helper
1454 static void write(
const R& vals, T& t)
1456 fifo_write_helper<N-1,R,T>::write(vals,t);
1457 for (
unsigned int i=0;i<(std::get<N>(vals)).size();i++)
1458 std::get<N>(t).write(std::get<N>(vals)[i]);
1462 template<
class R,
class T>
1463 struct fifo_write_helper<0,R,T>
1465 static void write(
const R& vals, T& t)
1467 for (
unsigned int i=0;i<(std::get<0>(vals)).size();i++)
1468 std::get<0>(t).write(std::get<0>(vals)[i]);
1472 template<
class... T>
1473 void fifo_tuple_write(
const std::tuple<std::vector<T>...>& vals,
1476 fifo_write_helper<
sizeof...(T)-1,
1477 std::tuple<std::vector<T>...>,
1478 std::tuple<
SDF_out<T>...>>::write(vals,ports);
1481 #ifdef FORSYDE_INTROSPECTION 1484 boundInChans.resize(1);
1485 boundInChans[0].port = &iport1;
1486 boundOutChans.resize(
sizeof...(Ts));
1487 register_ports(boundOutChans, oport);
1490 template<
size_t N,
class T>
1491 struct register_ports_helper
1493 static void reg_port(std::vector<PortInfo>& boundChans, T& t)
1495 register_ports_helper<N-1,T>::reg_port(boundChans,t);
1496 boundChans[N].port = &std::get<N>(t);
1501 struct register_ports_helper<0,T>
1503 static void reg_port(std::vector<PortInfo>& boundChans, T& t)
1505 boundChans[0].port = &std::get<0>(t);
1509 template<
class... T>
1510 void register_ports(std::vector<PortInfo>& boundChans,
1513 register_ports_helper<
sizeof...(T)-1,
1514 std::tuple<
SDF_out<T>...>&>::reg_port(boundChans,ports);
1559 *val = iport1.read();
1566 WRITE_MULTIPORT(oport1, *val)
1573 #ifdef FORSYDE_INTROSPECTION 1576 boundInChans.resize(1);
1577 boundInChans[0].port = &iport1;
1578 boundOutChans.resize(1);
1579 boundOutChans[0].port = &oport1;
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:376
Process constructor for a combinational process with two inputs and one output.
Definition: sdf_process_constructors.hpp:329
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:454
Process constructor for a combinational process (actor) with one input and one output.
Definition: sdf_process_constructors.hpp:45
SDF_in< std::tuple< std::vector< Ts >... > > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:1402
delay(sc_module_name _name, T init_val)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:461
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:629
Process constructor for a file_source process.
Definition: sdf_process_constructors.hpp:764
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:792
sink(sc_module_name _name, functype _func)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:932
SDF_in< T > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:453
SDF_out< std::tuple< std::vector< Ts >... > > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:1203
The namespace for ForSyDe.
Definition: abssemantics.hpp:30
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:607
zip(sc_module_name _name, unsigned int i1toks, unsigned int i2toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1137
SDF_in< T1 > iport1
port for the input channel 1
Definition: sdf_process_constructors.hpp:134
file_sink(sc_module_name _name, functype _func, std::string file_name)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1005
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:875
unzipN(sc_module_name _name, std::vector< unsigned > out_toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1409
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:767
Process constructor for a file_sink process.
Definition: sdf_process_constructors.hpp:993
std::function< void(T &, const std::string &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:770
SDF_in< std::tuple< std::vector< T1 >, std::vector< T2 > > > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:1329
comb(sc_module_name _name, functype _func, unsigned int o1toks, unsigned int i1toks)
The constructor requires the module name ad the number of tokens to be produced.
Definition: sdf_process_constructors.hpp:61
Process constructor for a source process.
Definition: sdf_process_constructors.hpp:674
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:946
SDF_out< T0 > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:231
constant(sc_module_name _name, T init_val, unsigned long long take=0)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:613
Process constructor for a multi-input print process.
Definition: sdf_process_constructors.hpp:1083
Process constructor for a combinational process with two inputs and one output.
Definition: sdf_process_constructors.hpp:131
Process constructor for a source process with vector input.
Definition: sdf_process_constructors.hpp:854
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1223
comb3(sc_module_name _name, functype _func, unsigned int o1toks, unsigned int i1toks, unsigned int i2toks, unsigned int i3toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:245
std::function< void(std::vector< T0 > &, const std::vector< T1 > &, const std::vector< T2 > &, const std::vector< T3 > &, const std::vector< T4 > &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:344
Process constructor for a fan-out process with one input and one output.
Definition: sdf_process_constructors.hpp:1531
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1022
SDF_out< std::tuple< std::vector< T1 >, std::vector< T2 > > > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:1131
The UT_out port is used for output ports of UT processes.
Definition: ut_process.hpp:68
Process constructor for a n-delay element.
Definition: sdf_process_constructors.hpp:526
SDF_out< T0 > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:49
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1545
zipN(sc_module_name _name, std::vector< unsigned > in_toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1209
SDF_in< T3 > iport3
port for the input channel 3
Definition: sdf_process_constructors.hpp:334
SDF_in< T > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:923
SDF_out< T2 > oport2
port for the output channel 2
Definition: sdf_process_constructors.hpp:1331
vsource(const sc_module_name &_name, const std::vector< T > &in_vec)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:863
fanout(sc_module_name _name)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1541
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1351
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:677
std::function< void(T &, const T &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:680
SDF_in< T1 > iport1
port for the input channel 1
Definition: sdf_process_constructors.hpp:228
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:705
std::function< void(std::vector< T0 > &, const std::vector< T1 > &, const std::vector< T2 > &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:142
SDF_in< T > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:529
SDF_in< T3 > iport3
port for the input channel 3
Definition: sdf_process_constructors.hpp:230
SDF_out< T1 > oport1
port for the output channel 1
Definition: sdf_process_constructors.hpp:1330
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:267
SDF_in< T1 > iport1
port for the input channel 1
Definition: sdf_process_constructors.hpp:332
Implements the abstract process in the SDF Model of Computation.
unzip(sc_module_name _name, unsigned int o1toks, unsigned int o2toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1337
delayn(sc_module_name _name, T init_val, unsigned int n)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:537
printSigs(sc_module_name _name)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:1092
SDF_in< T1 > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:48
std::function< void(std::vector< T0 > &, const std::vector< T1 > &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:54
std::function< void(const T &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:926
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:168
comb2(sc_module_name _name, functype _func, unsigned int o1toks, unsigned int i1toks, unsigned int i2toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:149
The process constructor which defines the abstract semantics of execution.
Definition: abssemantics.hpp:212
The unzip process with one input and variable number of outputs.
Definition: sdf_process_constructors.hpp:1399
SDF_in< T2 > iport2
port for the input channel 2
Definition: sdf_process_constructors.hpp:1130
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1150
SDF_in< T1 > iport1
port for the input channel 1
Definition: sdf_process_constructors.hpp:1129
sc_fifo_in< ITYP > iport
multi-port for the input channel
Definition: sdf_process_constructors.hpp:1086
std::function< void(std::vector< T0 > &, const std::vector< T1 > &, const std::vector< T2 > &, const std::vector< T3 > &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:238
The zip process with two inputs and one output.
Definition: sdf_process_constructors.hpp:1126
Process constructor for a constant source process.
Definition: sdf_process_constructors.hpp:604
SDF_out< T0 > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:336
SDF_out< T0 > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:136
comb4(sc_module_name _name, functype _func, unsigned int o1toks, unsigned int i1toks, unsigned int i2toks, unsigned int i3toks, unsigned int i4toks)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:351
The UT_in port is used for input ports of UT processes.
Definition: ut_process.hpp:55
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:474
Process constructor for a combinational process with two inputs and one output.
Definition: sdf_process_constructors.hpp:225
Process constructor for a sink process.
Definition: sdf_process_constructors.hpp:920
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:857
The zip process with variable number of inputs and one output.
Definition: sdf_process_constructors.hpp:1199
SDF_in< T2 > iport2
port for the input channel 2
Definition: sdf_process_constructors.hpp:229
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:530
SDF_in< T > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:1534
Process constructor for a delay element.
Definition: sdf_process_constructors.hpp:450
SDF_in< T2 > iport2
port for the input channel 2
Definition: sdf_process_constructors.hpp:333
The unzip process with one input and two outputs.
Definition: sdf_process_constructors.hpp:1326
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:552
source(sc_module_name _name, functype _func, T init_val, unsigned long long take=0)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:686
SDF_in< T > iport1
port for the input channel
Definition: sdf_process_constructors.hpp:996
file_source(sc_module_name _name, functype _func, std::string file_name)
The constructor requires the module name.
Definition: sdf_process_constructors.hpp:776
std::tuple< SDF_out< Ts >... > oport
tuple of ports for the output channels
Definition: sdf_process_constructors.hpp:1403
SDF_out< T > oport1
port for the output channel
Definition: sdf_process_constructors.hpp:1535
std::tuple< SDF_in< Ts >... > iport
tuple of ports for the input channels
Definition: sdf_process_constructors.hpp:1202
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:78
SDF_in< T4 > iport4
port for the input channel 4
Definition: sdf_process_constructors.hpp:335
std::function< void(std::string &, const T &)> functype
Type of the function to be passed to the process constructor.
Definition: sdf_process_constructors.hpp:999
std::string forsyde_kind() const
Specifying from which process constructor is the module built.
Definition: sdf_process_constructors.hpp:1423
SDF_in< T2 > iport2
port for the input channel 2
Definition: sdf_process_constructors.hpp:135