From ac629b62be5b2741e924c4f6fdfd4b9ecf9cb92f Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 22 May 2025 10:02:38 +0200 Subject: [PATCH] fix again parameter substitution in instance symbol specialization (schematic=... in instance) --- src/token.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/token.c b/src/token.c index 12b5a036..da24ef8b 100644 --- a/src/token.c +++ b/src/token.c @@ -2411,12 +2411,12 @@ int print_spice_element(FILE *fd, int inst) size_t tok_val_len; char *parent_prop_ptr = NULL; char *parent_templ = NULL; - char *parent_sym_extra = NULL; + /* char *parent_sym_extra = NULL; */ if(xctx->currsch > 0) { parent_prop_ptr = xctx->hier_attr[xctx->currsch - 1].prop_ptr; parent_templ = xctx->hier_attr[xctx->currsch - 1].templ; - parent_sym_extra = xctx->hier_attr[xctx->currsch - 1].sym_extra; + /* parent_sym_extra = xctx->hier_attr[xctx->currsch - 1].sym_extra; */ } /* consider this scenario: @@ -2437,15 +2437,8 @@ int print_spice_element(FILE *fd, int inst) */ - if(parent_sym_extra && has_token(parent_sym_extra, token + 1)) { - /* do not translate extra pins with parent instance attributes */ - dbg(1, "print_spice_element(): token: |%s|, parent_sym_extra=|%s|\n", token, parent_sym_extra); - my_strdup2(_ALLOC_ID_, &val, - translate3(token, 0, xctx->inst[inst].prop_ptr, NULL, NULL, NULL)); - } else { - my_strdup2(_ALLOC_ID_, &val, - translate3(token, 0, xctx->inst[inst].prop_ptr, parent_prop_ptr, NULL, NULL)); - } + my_strdup2(_ALLOC_ID_, &val, + translate3(token, 0, xctx->inst[inst].prop_ptr, NULL, NULL, NULL)); /* can not put template in above translate3: ---------------------------^^^^ * if instance has VHI=VHI, format string has VHI=@VHI, and symbol template has VHI=3 * we do not want token @VHI to resolve to 3, but stop at VHI as specified in instance */