diff --git a/doc/xschem_man/backannotation10.png b/doc/xschem_man/backannotation10.png index 1f94c33e..829ac51b 100644 Binary files a/doc/xschem_man/backannotation10.png and b/doc/xschem_man/backannotation10.png differ diff --git a/doc/xschem_man/backannotation14.png b/doc/xschem_man/backannotation14.png index 61067a48..3a84a43d 100644 Binary files a/doc/xschem_man/backannotation14.png and b/doc/xschem_man/backannotation14.png differ diff --git a/doc/xschem_man/backannotation4.png b/doc/xschem_man/backannotation4.png deleted file mode 100644 index 5322169f..00000000 Binary files a/doc/xschem_man/backannotation4.png and /dev/null differ diff --git a/doc/xschem_man/backannotation5.png b/doc/xschem_man/backannotation5.png deleted file mode 100644 index ee744ea3..00000000 Binary files a/doc/xschem_man/backannotation5.png and /dev/null differ diff --git a/doc/xschem_man/backannotation6.png b/doc/xschem_man/backannotation6.png deleted file mode 100644 index 03d007bb..00000000 Binary files a/doc/xschem_man/backannotation6.png and /dev/null differ diff --git a/doc/xschem_man/backannotation7.png b/doc/xschem_man/backannotation7.png deleted file mode 100644 index 9c4206d8..00000000 Binary files a/doc/xschem_man/backannotation7.png and /dev/null differ diff --git a/doc/xschem_man/backannotation8.png b/doc/xschem_man/backannotation8.png deleted file mode 100644 index 74c27864..00000000 Binary files a/doc/xschem_man/backannotation8.png and /dev/null differ diff --git a/doc/xschem_man/tutorial_ngspice_backannotation.html b/doc/xschem_man/tutorial_ngspice_backannotation.html index da77b8f4..2703e62e 100644 --- a/doc/xschem_man/tutorial_ngspice_backannotation.html +++ b/doc/xschem_man/tutorial_ngspice_backannotation.html @@ -72,59 +72,26 @@ lappend tcl_files ${XSCHEM_SHAREDIR}/ngspice_backannotate.tcl You can close the simulator since we need only the cmos_example.raw file that is now saved in the simulation directory (usually ~/.xschem/simulations/cmos_example.raw).
Now verify that xschem is able to read the raw file: issue this command in the xschem console:
- ngspice::annotate + xschem annotate_op

-xschem [~] ngspice::annotate
-Raw file read ...
-xschem [~] 
+xschem [~] xschem annotate_op
+Raw file data read: /home/schippes/.xschem/simulations/cmos_example.raw
+points=1, vars=38, datasets=1
+0
+xschem [~]
  

If there are no errors we are ready and set.

-

PUSH ANNOTATION METHOD

+

ANNOTATION

- Start placing some probe elements into the schematic. - The first element is the devices/spice_probe.sym component. This must be attached to - some schematic wires to show the voltage value. -

- -

- Place some of these elements on various nets, issue the above mentioned ngspice::annotate - command and see the voltage values in the schematic. -

- -

- Another useful component is the devices/ammeter.sym one which allow to monitor branch currents. - Break some wires and insert this component as shown here: -

- -

- IMPORTANT: When inserting current probes the circuit topology changes (new nodes are created) so you need to - re-create the netlist and re-run the simulation -


-

- Doing again the ngspice::annotate command after simulation will update the ammeters showing - the branch currents. -

- -

- These voltage and current values are inserted in the probe components as attributes and thus can be saved - to file. Remember that if you change the circuit the values shown in the probe elements are no longer valid, - you should update the values with a new simulation + annotate operation when done with the changes.

- What i have described so far is the simplest annotation procedure based on a push method: a tcl script - reads the simulation raw file and 'pushes' voltage and current values into the probe components as instance - attributes. If you do an edit attribute on one of these elements you see the attribute 'pushed' into it by the - annotate script. The advantage of this method is that values pushed into probes can be saved to file and are - thus persistent. -

- - -

PULL ANNOTATION METHOD

-

- There is another annotation procedure that is based on a pull method: the probe objects have tcl commands - embedded that fetch simulation data from a table that has been read by the annotate script. + The annotation procedure is based on a pull method: the probe objects have atributes + or tcl commands + embedded that fetch simulation data from a table that has been read by Xschem. + In addition to specific probe elements also net labels will show voltage values and + ammeters / voltage sources will show currents.

@@ -153,7 +120,9 @@ write cmos_example.raw

- Run again the simulation and the ngspice::annotate command and values will be updated. + 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.

@@ -164,7 +133,7 @@ write cmos_example.raw

Data annotated into the schematic using these components allows more simulation parameters to be viewed into the schematic, not being restricted to currents and voltages. Since these components get data using a pull method - data is not persistent and not saved to file. After reloading the file just do a ngspice::annotate + data is not persistent and not saved to file. After reloading the file just do a xschem annotate_op to view data again.

diff --git a/xschem_library/examples/cmos_example.sch b/xschem_library/examples/cmos_example.sch index 2a8baa7f..b7200d14 100644 --- a/xschem_library/examples/cmos_example.sch +++ b/xschem_library/examples/cmos_example.sch @@ -10,8 +10,8 @@ y1=1.16665 y2=5.05705 divy=4 subdivy=1 -x1=2.3 -x2=2.7 +x1=2.28 +x2=2.68 divx=6 subdivx=1 node="v(diffout) @@ -25,8 +25,8 @@ y1=0 y2=130 divy=4 subdivy=1 -x1=2.3 -x2=2.7 +x1=2.28 +x2=2.68 divx=6 subdivx=1 node="\\"GAIN;diffout deriv()\\"" @@ -46,44 +46,84 @@ T {This is an example of a code block that will be placed as a header in the netlist. use 'place=header' attribute and set the header text as a 'value' attribute} 440 -750 0 0 0.4 0.4 {} -N 30 -310 30 -280 {} -N 30 -310 60 -310 {} -N 260 -240 260 -190 {} -N 260 -190 300 -190 {} -N 300 -190 300 -160 {} -N 300 -160 530 -160 {} -N 500 -290 520 -290 {} -N 670 -290 690 -290 {} -N 500 -260 690 -260 {} -N 440 -290 460 -290 {} -N 730 -290 750 -290 {} -N 690 -490 740 -490 {} -N 450 -490 500 -490 {} -N 540 -490 650 -490 {} -N 540 -490 540 -460 {} -N 500 -460 540 -460 {} -N 690 -560 690 -520 {} -N 500 -560 690 -560 {} -N 500 -560 500 -520 {} -N 570 -580 570 -560 {} -N 690 -420 830 -420 {} -N 30 -440 30 -410 {} -N 30 -440 60 -440 {} -N 30 -590 30 -560 {} -N 30 -590 60 -590 {} -N 570 -130 570 -100 {} -N 570 -130 590 -130 {} -N 590 -160 590 -130 {} -N 570 -160 590 -160 {} -N 260 -130 260 -100 {} -N 240 -130 260 -130 {} -N 240 -160 240 -130 {} -N 240 -160 260 -160 {} -N 690 -460 690 -380 {} -N 500 -460 500 -380 {} -N 570 -260 570 -250 {} -N 500 -380 500 -320 {} -N 570 -250 570 -190 {} +N 30 -310 30 -280 { +lab=VCC} +N 30 -310 60 -310 { +lab=VCC} +N 260 -240 260 -190 { +lab=GN} +N 260 -190 300 -190 { +lab=GN} +N 300 -190 300 -160 { +lab=GN} +N 300 -160 530 -160 { +lab=GN} +N 500 -290 520 -290 { +lab=0} +N 670 -290 690 -290 { +lab=0} +N 500 -260 690 -260 { +lab=#net1} +N 440 -290 460 -290 { +lab=PLUS} +N 730 -290 750 -290 { +lab=MINUS} +N 690 -490 740 -490 { +lab=VCC} +N 450 -490 500 -490 { +lab=VCC} +N 540 -490 650 -490 { +lab=G} +N 540 -490 540 -460 { +lab=G} +N 500 -460 540 -460 { +lab=G} +N 690 -560 690 -520 { +lab=VCC} +N 500 -560 690 -560 { +lab=VCC} +N 500 -560 500 -520 { +lab=VCC} +N 570 -580 570 -560 { +lab=VCC} +N 690 -420 830 -420 { +lab=DIFFOUT} +N 30 -440 30 -410 { +lab=PLUS} +N 30 -440 60 -440 { +lab=PLUS} +N 30 -590 30 -560 { +lab=MINUS} +N 30 -590 60 -590 { +lab=MINUS} +N 570 -130 570 -100 { +lab=0} +N 570 -130 590 -130 { +lab=0} +N 590 -160 590 -130 { +lab=0} +N 570 -160 590 -160 { +lab=0} +N 260 -130 260 -100 { +lab=0} +N 240 -130 260 -130 { +lab=0} +N 240 -160 240 -130 { +lab=0} +N 240 -160 260 -160 { +lab=0} +N 690 -460 690 -400 { +lab=DIFFOUT} +N 500 -460 500 -380 { +lab=G} +N 570 -260 570 -250 { +lab=#net1} +N 500 -380 500 -320 { +lab=G} +N 570 -250 570 -190 { +lab=#net1} +N 690 -340 690 -320 { +lab=#net2} C {lab_pin.sym} 750 -360 0 0 {name=p20 lab=0 net_name=true} C {lab_pin.sym} 30 -220 0 0 {name=p17 lab=0 net_name=true} C {title.sym} 160 -30 0 0 {name=l1 author="Stefan Schippers" net_name=true} @@ -1502,7 +1542,7 @@ AAAAAAAUQAAAAAAAAAAAsNOBK6VIGr83mZmZmZkFQAAAAAAAAAAALEMc6+I2Gj8ulnI1PmwuPwAAAAAA qATYwoHxPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPMYWeXiNho/AAAAAAAAAAAAAAAAAAAAAH/C5o3VGEA/AAAAAAAAAABoaaYTROgVPwAAAAAAAAAAAAAAAAAAAADz CM4WDmYpPwAAAAAAAAAAgcd9hMKB8T4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLuyUYROgVPwAAAAAAAAAAAAAAAAAAAADEUmEID4QTQIWFPStEFwhAgE0obp729D8A AAAAAAAEQK/MmE1vlvc/N5mZmZmZBUAAAAAAAAAAAAAAAAAAABRAAAAAAAAAAADsyD76tEgavw=="} -C {ammeter.sym} 690 -350 0 1 {name=Vmeas} +C {ammeter.sym} 690 -370 0 1 {name=Vmeas} C {simulator_commands.sym} 920 -360 0 0 {name=COMMANDS simulator=ngspice only_toplevel=true @@ -1545,3 +1585,7 @@ value=".temp 30 .dc vplus 2.3 2.7 0.001 "} +C {ngspice_get_value.sym} 520 -310 0 0 {name=r6 node=i(@$\{path\}m4[id]) +descr="I="} +C {ngspice_get_value.sym} 670 -310 0 1 {name=r7 node=i(@$\{path\}m5[id]) +descr="I="}