fix netlist error if in symbol attributes model="xxx@name" is given, @name was looked up in symbol template instead of again in instance properties.

This commit is contained in:
stefan schippers 2025-02-12 23:26:00 +01:00
parent 95cbd80767
commit 4517ff3b87
1 changed files with 2 additions and 1 deletions

View File

@ -2411,7 +2411,8 @@ int print_spice_element(FILE *fd, int inst)
* 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 */
if(strchr(val, '@')) {
my_strdup2(_ALLOC_ID_, &val, translate3(val, 0, template, NULL, NULL, NULL));
my_strdup2(_ALLOC_ID_, &val,
translate3(val, 0, xctx->inst[inst].prop_ptr, parent_prop_ptr, template, NULL));
}
/* nmos instance format string: @model --> @modeln */
dbg(1, "print_spice_element(): 1st round: val: |%s|\n", val);