VHDL: fix spurious resize seen in pr2911213
Another case when ivl_scope_sig list was used instead of ivl_scope_param.
This commit is contained in:
parent
5fad844c30
commit
47d3b3365b
|
|
@ -533,7 +533,6 @@ static vhdl_expr *translate_ufunc(ivl_expr_t e)
|
|||
vhdl_fcall *fcall = new vhdl_fcall(funcname, rettype);
|
||||
|
||||
int nparams = ivl_expr_parms(e);
|
||||
int func_scope_sig = 0;
|
||||
for (int i = 0; i < nparams; i++) {
|
||||
vhdl_expr *param = translate_expr(ivl_expr_parm(e, i));
|
||||
if (NULL == param) {
|
||||
|
|
@ -542,10 +541,8 @@ static vhdl_expr *translate_ufunc(ivl_expr_t e)
|
|||
}
|
||||
|
||||
// Ensure the parameter has the correct VHDL type
|
||||
ivl_signal_t param_sig;
|
||||
do {
|
||||
param_sig = ivl_scope_sig(defscope, func_scope_sig++);
|
||||
} while (ivl_signal_port(param_sig) != IVL_SIP_INPUT);
|
||||
// Parameter number is i + 1 since 0th parameter is return value
|
||||
ivl_signal_t param_sig = ivl_scope_port(defscope, i + 1);
|
||||
vhdl_type *param_type =
|
||||
vhdl_type::type_for(ivl_signal_width(param_sig),
|
||||
ivl_signal_signed(param_sig) != 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue