82 const std::vector<ModuleGenerator::parameter>& ,
83 const std::vector<ModuleGenerator::parameter>& _ports_in,
84 const std::vector<ModuleGenerator::parameter>& _ports_out,
85 const std::vector<ModuleGenerator::parameter>& )
91 const auto top_fid = HLSMgr->CGetCallGraphManager()->GetRootFunction(function_id);
92 const auto top_fname = HLSMgr->CGetFunctionBehavior(top_fid)->CGetBehavioralHelper()->GetMangledFunctionName();
93 const auto& iface_attrs = HLSMgr->module_arch->GetArchitecture(top_fname)->ifaces.at(bundle_name);
95 if(iface_attrs.find(FunctionArchitecture::iface_register) != iface_attrs.end())
97 THROW_ERROR(
"Registered AXI-Stream interface not yet implemented.");
99 out <<
"reg started, started_0;\n" 100 <<
"reg done_0;\n\n";
102 out <<
"always @(posedge clock 1RESET_EDGE)\n" 104 <<
" if (1RESET_VALUE)\n" 106 <<
" started <= 0;\n" 110 <<
" started <= started_0;\n" 114 out <<
"always @(*)\n" 116 <<
" started_0 = (started || " << _ports_in[
i_start].name <<
") & ~" << _ports_in[
i_tvalid].name <<
";\n" 117 <<
" done_0 = (started | " << _ports_in[
i_start].name <<
") & " << _ports_in[
i_tvalid].name <<
";\n" 120 out <<
"assign " << _ports_out[
o_out1].name <<
" = {" << _ports_in[
i_tvalid].name <<
", " << _ports_in[
i_tdata].name
122 out <<
"assign " << _ports_out[
o_done].name <<
" = done_0;\n";
123 out <<
"assign " << _ports_out[
o_ready].name <<
" = done_0;\n";
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...
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
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Read_axisModuleGenerator(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 ...