Change function return value from Verilog_Result to <funcname>_Result
This commit is contained in:
parent
d3b7d7a13d
commit
535ef6be38
|
|
@ -505,8 +505,9 @@ static int draw_function(ivl_scope_t scope, ivl_scope_t parent)
|
|||
func->add_param(new vhdl_param_decl(signame.c_str(), sigtype));
|
||||
break;
|
||||
case IVL_SIP_OUTPUT:
|
||||
// The magic variable Verilog_Result holds the return value
|
||||
signame = "Verilog_Result";
|
||||
// The magic variable <funcname>_Result holds the return value
|
||||
signame = funcname;
|
||||
signame += "_Result";
|
||||
func->set_type(new vhdl_type(*sigtype));
|
||||
default:
|
||||
func->get_scope()->add_decl
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ void vhdl_function::emit(std::ostream &of, int level) const
|
|||
emit_children<vhdl_decl>(of, variables_.get_decls(), level);
|
||||
of << "begin";
|
||||
stmts_.emit(of, level);
|
||||
of << " return Verilog_Result;";
|
||||
of << " return " << name_ << "_Result;";
|
||||
newline(of, level);
|
||||
of << "end function;";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue