diff --git a/doc/xschem_man/tutorial_ngspice_backannotation.html b/doc/xschem_man/tutorial_ngspice_backannotation.html index 729204a7..9246ac3c 100644 --- a/doc/xschem_man/tutorial_ngspice_backannotation.html +++ b/doc/xschem_man/tutorial_ngspice_backannotation.html @@ -48,18 +48,40 @@ lappend tcl_files ${XSCHEM_SHAREDIR}/ngspice_backannotate.tcl ** referenced file in netlist/simulation directory. .include "models_cmos_example.txt" .control - op - save all - write cmos_example.raw +op +save all +write cmos_example.raw .endc
The important parts are in red in above text. This ensures all variables are saved into the raw file.
These instructions are for an interactive ngspice run.
+ You may have other simulations saved in the raw file (dc, tran, ac) however one operating point
+ must also be present:
+
+.temp 30
+** models are generally not free: you must download
+** SPICE models for active devices and put them into the below
+** referenced file in netlist/simulation directory.
+.include "models_cmos_example.txt"
+.control
+save all
+dc vplus 2.3 2.7 0.001
+write cmos_example.raw
+set appendwrite
+op
+save all
+write cmos_example.raw
+.endc
+
+
When done open the Simulation-> Configure simulators and tools dialog box and ensure the
Ngspice simulator is selected (not Ngspice batch). Also ensure the spice netlist mode is
- selected (Options -> Spice netlist).
+ selected (Options -> Spice netlist).
- If there are no errors we are ready and set.
+ If there are no errors we are ready and set.
+ you can load also a specific file:
+xschem [~] xschem annotate_op $netlist_dir/cmos_example_ngspice.raw +
@@ -93,7 +119,6 @@ xschem [~] In addition to specific probe elements also net labels will show voltage values and ammeters / voltage sources will show currents.
-To ensure all currents are saved modify the STIMULI attributes as follows:
@@ -121,8 +146,6 @@ write cmos_example.raw
Run again the simulation and the xschem annotate_op command and values will be updated. - If you enable View -> Show hidden texts net labels, voltage sources and ammeters will also show - voltages and currents.
diff --git a/scconfig/src/default/find_cc.c b/scconfig/src/default/find_cc.c
index 986007e1..bccadbed 100644
--- a/scconfig/src/default/find_cc.c
+++ b/scconfig/src/default/find_cc.c
@@ -933,11 +933,13 @@ static int try_dll_or_so(int logdepth, int is_dll, const char *lib_ldflags, cons
lib_filename = file_name(libname);
lib_dirname = dir_name(libname);
+ len = strlen(lib_filename) - strlen(libname_ext);
if (!is_dll) {
- len = strlen(lib_filename) - strlen(libname_ext);
for (ii=3; ii