diff --git a/src/spice_netlist.c b/src/spice_netlist.c index b1b87f30..230a3132 100644 --- a/src/spice_netlist.c +++ b/src/spice_netlist.c @@ -222,7 +222,10 @@ static int spice_netlist(FILE *fd, int spice_stop ) if(strchr(val, '@')) m = translate(i, val); if(m[0]) str_hash_lookup(&model_table, model_name(m), m, XINSERT); else { - m = get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "device_model", 0); + my_strdup2(_ALLOC_ID_, &val, + get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "device_model", 2)); + m = val; + if(strchr(val, '@')) m = translate(i, val); if(m[0]) str_hash_lookup(&model_table, model_name(m), m, XINSERT); } my_free(_ALLOC_ID_, &model_name_result); diff --git a/src/token.c b/src/token.c index 0851dddd..a7c9b09c 100644 --- a/src/token.c +++ b/src/token.c @@ -1000,12 +1000,6 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 } else my_mstrcat(_ALLOC_ID_, &result, value, NULL); } - #if 0 /* Disabled: no hierarchy traversal while netlisting */ - else if(strcmp(token,"@path")==0) - { - my_mstrcat(_ALLOC_ID_, &result, xctx->sch_path[xctx->currsch] + 1, NULL); - } - #endif else if(strcmp(token,"@symref")==0) { const char *s = get_sym_name(inst, 9999, 1); @@ -2237,15 +2231,6 @@ int print_spice_element(FILE *fd, int inst) /* fputs(value,fd); */ } } - #if 0 /* Disabled: no hierarchy traversal while netlisting */ - else if (strcmp(token,"@path")==0) /* of course path must not be present in attributes */ - { - const char *s = xctx->sch_path[xctx->currsch] + 1; - /* result_pos += my_snprintf(result + result_pos, tmp, "%s", s); */ - my_mstrcat(_ALLOC_ID_, &result, s, NULL); - /* fputs(s,fd); */ - } - #endif else if(strcmp(token,"@symref")==0) { const char *s = get_sym_name(inst, 9999, 1); @@ -2671,12 +2656,6 @@ void print_tedax_element(FILE *fd, int inst) { fputs(value,fd); } - #if 0 /* Disabled: no hierarchy traversal while netlisting */ - else if(strcmp(token,"@path")==0) - { - fputs(xctx->sch_path[xctx->currsch] + 1, fd); - } - #endif else if(strcmp(token,"@symref")==0) { const char *s = get_sym_name(inst, 9999, 1); @@ -2939,12 +2918,6 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level } else my_mstrcat(_ALLOC_ID_, &result, value, NULL); } - #if 0 /* Disabled: no hierarchy traversal while netlisting */ - else if(strcmp(token,"@path")==0) - { - my_mstrcat(_ALLOC_ID_, &result, xctx->sch_path[xctx->currsch] + 1, NULL); - } - #endif else if(strcmp(token,"@symref")==0) { const char *s = get_sym_name(inst, 9999, 1);