diff --git a/doc/xschem_man/netlisting.html b/doc/xschem_man/netlisting.html index e12068e2..df8b4392 100644 --- a/doc/xschem_man/netlisting.html +++ b/doc/xschem_man/netlisting.html @@ -25,12 +25,28 @@ p{padding: 15px 30px 10px;} VHDL. Netlisting mode can be set in the Options menu (Vhdl, Verilog Spice radio buttons) or with the <Shift>V key. Once a netlist mode is set, hitting the - Netlist button on the top-right of the menu bar or the <Shift>N - key will produce the netlist file in the defined simulation directory. + Netlist button on the top-right of the menu bar or the n + key will produce the netlist file in the defined simulation directory.
The simulation directory is one important path that is specified in the xschemrc - file, if no one is defined XSCHEM will prompt for a directory. + file with the tcl variable netlist_dir (default if unset is ~/.xschem/simulations) + if netlist_dir is set to empty value (set netlist_dir {}) + xschem will prompt user the first time the netlist is created.
The path where netlists are produced can be changed with the - Simulation->Set netlist dir menu entry. + Simulation->Set netlist dir menu entry or simply by changing the + netlist_dir variable, either + in the xschemrc file or interactively by giving tcl commands.
+ + + If you use xschem interactively by giving tcl commands you may do something like:
+ + set netlist_dir [xschem get current_dirname]/spice; xschem netlist
+ + to have the netlist saved into a spice/ folder into the directory containing the current + schematic (this directory is not necessarily the current directory, like 'pwd'). + + There is also a local_netlist_dir variable. If this variable is set to 1 + (default setting if unspecified is 0) instead of using ~/.xschem/simulations + the netlist will be saved in (directory of current schematic)/simulation The netlist filename is cellname.ext where cellname is the name of the top-level schematic from which the netlist has been generated, and ext is the file extension:

diff --git a/src/actions.c b/src/actions.c index 646a8e9f..643a2e11 100644 --- a/src/actions.c +++ b/src/actions.c @@ -105,7 +105,7 @@ const char *get_text_floater(int i) if(xctx->text[i].floater_instname) instname = xctx->text[i].floater_instname; else - instname = get_tok_value(xctx->text[i].prop_ptr, "floater", 0); + instname = get_tok_value(xctx->text[i].prop_ptr, "name", 0); inst = get_instance(instname); if(inst >= 0) { if(xctx->text[i].floater_ptr) { @@ -744,9 +744,9 @@ int set_text_flags(xText *t) t->flags |= strcmp(str, "bold") ? 0 : TEXT_BOLD; str = get_tok_value(t->prop_ptr, "hide", 0); t->flags |= strcmp(str, "true") ? 0 : HIDE_TEXT; - str = get_tok_value(t->prop_ptr, "floater", 0); + str = get_tok_value(t->prop_ptr, "name", 0); t->flags |= xctx->tok_size ? TEXT_FLOATER : 0; - my_strdup2(_ALLOC_ID_, &t->floater_instname, get_tok_value(t->prop_ptr, "floater", 0)); + my_strdup2(_ALLOC_ID_, &t->floater_instname, str); } return 0; } diff --git a/src/xinit.c b/src/xinit.c index a00e1448..410764d8 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2415,11 +2415,13 @@ int Tcl_AppInit(Tcl_Interp *inter) /* set tcl netlist_dir if netlist_dir given on cmdline */ if(cli_opt_netlist_dir[0]) tclsetvar("netlist_dir", cli_opt_netlist_dir); - if(!set_netlist_dir(0, NULL)) { - const char *n; - n = tclgetvar("netlist_dir"); - fprintf(errfp, "problems creating netlist directory %s\n", n ? n : ""); - } + /* + * if(!set_netlist_dir(0, NULL)) { + * const char *n; + * n = tclgetvar("netlist_dir"); + * fprintf(errfp, "problems creating netlist directory %s\n", n ? n : ""); + * } + */ if(cli_opt_initial_netlist_name[0]) my_strncpy(xctx->netlist_name, cli_opt_initial_netlist_name, S(cli_opt_initial_netlist_name)); enable_layers(); diff --git a/src/xschemrc b/src/xschemrc index e5f7befd..a4ed6a7c 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -98,6 +98,10 @@ #### If unset $USER_CONF_DIR/simulations is assumed (normally ~/.xschem/simulations) # set netlist_dir $env(HOME)/.xschem/simulations +##### if this is set to '1' netlists and simulations will go into a simulation/ folder +##### inside the directory containing the top level schematic. Default: not set (0) +# set local_netlist_dir 1 + ########################################################################### #### NETLIST AND HIERARCHICAL PRINT EXCLUDE PATTERNS ########################################################################### diff --git a/xschem_library/ngspice/solar_panel.sch b/xschem_library/ngspice/solar_panel.sch index e282dc92..44ea2b45 100644 --- a/xschem_library/ngspice/solar_panel.sch +++ b/xschem_library/ngspice/solar_panel.sch @@ -177,20 +177,14 @@ T {set between 0 and 1 to simulate sun radiation level} 10 -440 0 0 0.2 0.2 {} -T {@name} 875 -698.75 0 0 0.3 0.3 {floater=L2 -layer=7} -T {@value} 875 -673.75 0 0 0.3 0.3 {floater=L2 -layer=7} -T {m=@m} 875 -648.75 0 0 0.3 0.3 {floater=L2 -layer=7} +T {@name} 875 -698.75 0 0 0.3 0.3 {layer=7 name=L2} +T {@value} 875 -673.75 0 0 0.3 0.3 {layer=7 name=L2} +T {m=@m} 875 -648.75 0 0 0.3 0.3 {layer=7 name=L2} T {Floater text example} 850 -820 0 0 0.4 0.4 {} -T {@name} 985 -308.75 0 1 0.3 0.3 {floater=C1 -layer=7} -T {@value} 985 -286.25 0 1 0.3 0.3 {floater=C1 -layer=7} -T {m=@m} 985 -263.75 0 1 0.3 0.3 {floater=C1 -layer=7} +T {@name} 985 -308.75 0 1 0.3 0.3 {layer=7 name=C1} +T {@value} 985 -286.25 0 1 0.3 0.3 {layer=7 name=C1} +T {m=@m} 985 -263.75 0 1 0.3 0.3 {layer=7 name=C1} T {Floater text example} 870 -440 0 0 0.4 0.4 {} N 1010 -210 1100 -210 {lab=0}