17#ifndef SC_INCLUDE_DYNAMIC_PROCESSES
18#define SC_INCLUDE_DYNAMIC_PROCESSES
20#include "parallel_pe.h"
25using namespace sc_core;
34void parallel_pe::transport(tlm::tlm_generic_payload& payload,
bool lt_transport) {
35 if(!waiting_ids.size()) {
36 auto id = threads.size();
37 threads.resize(threads.size() + 1);
38 thread_unit& tu = threads.back();
39 tu.hndl = sc_core::sc_spawn(
40 [
this,
id]() ->
void {
41 auto& tu = threads[id];
43 fw_o->transport(*tu.gp, tu.lt_transport);
44 if(
bw_o.get_interface())
45 bw_o->transport(*tu.gp);
49 waiting_ids.push_back(
id);
54 sc_core::sc_gen_unique_name(
"execute"));
57 auto& tu = threads[waiting_ids.front()];
58 waiting_ids.pop_front();
60 tu.lt_transport = lt_transport;
parallel_pe(sc_core::sc_module_name const &nm)
sc_core::sc_port< intor_fw_b > fw_o
sc_port_opt< intor_bw_nb > bw_o
sc_core::sc_export< intor_fw_nb > fw_i