81 const std::vector<ModuleGenerator::parameter>& ,
82 const std::vector<ModuleGenerator::parameter>& _ports_in,
83 const std::vector<ModuleGenerator::parameter>& _ports_out,
84 const std::vector<ModuleGenerator::parameter>& )
90 const auto top_fid = HLSMgr->CGetCallGraphManager()->GetRootFunction(function_id);
91 const auto top_fname = HLSMgr->CGetFunctionBehavior(top_fid)->CGetBehavioralHelper()->GetMangledFunctionName();
92 const auto& iface_attrs = HLSMgr->module_arch->GetArchitecture(top_fname)->ifaces.at(bundle_name);
94 if(iface_attrs.find(FunctionArchitecture::iface_register) != iface_attrs.end())
96 THROW_ERROR(
"Registered valid interface not yet implemented.");
98 out <<
"parameter ASYNC=0;\n\n";
99 out <<
"reg started, started0;\n\n";
104 reg validated, validated0; 106 << (_ports_in[i_in3].type_size - 1) << R"(:0] stored; 108 always @(posedge clock 1RESET_EDGE) 119 validated <= validated0; 121 << _ports_in[i_in3].name << R"(; 127 started0 = (started | )" 128 << _ports_in[i_start].name << R"() & ~(validated | )" << _ports_in[i_vld].name << R"(); 129 validated0 = (validated | )" 130 << _ports_in[i_vld].name << R"() & ~(started | )" << _ports_in[i_start].name << R"(); 134 << _ports_out[o_out1].name << " = " << _ports_in[
i_vld].name <<
" ? " << _ports_in[
i_in3].name << R
"( : stored; 136 << _ports_out[o_done].name << " = ((started | " << _ports_in[
i_start].name <<
") & " << _ports_in[
i_vld].name
137 <<
") | (validated & " << _ports_in[
i_start].name << R
"(); 141 always @(posedge clock 1RESET_EDGE) 155 started0 = (started | )" 156 << _ports_in[i_start].name << R"() & ~)" << _ports_in[i_vld].name << R"(; 160 << _ports_out[o_out1].name << " = " << _ports_in[
i_in3].name << R
"(; 162 << _ports_out[o_done].name << " = (started | " << _ports_in[
i_start].name <<
") & " << _ports_in[
i_vld].name
Data structure representing the entire HLS information.
#define STR_CST_interface_parameter_keyword
interface_parameter_keyword
const std::string & get_id() const
Return the identifier associated with the structural_object.
This class writes different HDL based descriptions (VHDL, Verilog, SystemC) starting from a structura...
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
void InternalExec(std::ostream &out, structural_objectRef mod, unsigned int function_id, vertex op_v, const HDLWriter_Language language, const std::vector< ModuleGenerator::parameter > &_p, const std::vector< ModuleGenerator::parameter > &_ports_in, const std::vector< ModuleGenerator::parameter > &_ports_out, const std::vector< ModuleGenerator::parameter > &_ports_inout) final
Read_validModuleGenerator(const HLS_managerRef &HLSMgr)
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
This class describes all classes used to represent a structural object.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
A brief description of the C++ Header File.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...