Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame] | 1 | %! PostScript set of library objects for XCircuit |
| 2 | % Version: 3.9 |
| 3 | % Library name is: ngspice |
| 4 | % Author: <tim@stravinsky> |
| 5 | % |
| 6 | |
| 7 | % Depend ngspice::Vsource analog::source |
| 8 | % Depend ngspice::ACsource analog::source generic::sinusoid |
| 9 | % Depend ngspice::Vpwl analog::source |
| 10 | % Depend ngspice::Switch generic::circle generic::arrowhead |
| 11 | % Depend ngspice::Vpulse analog::source |
| 12 | |
| 13 | % XCircuitLib library objects |
| 14 | /generic::arrowhead { |
| 15 | % nonetwork |
| 16 | begingate |
| 17 | 8 -28 beginpath |
| 18 | 3 -18 3 -15 0 0 curveto |
| 19 | -3 -15 -3 -18 -8 -28 curveto |
| 20 | -2 -26 2 -26 8 -28 curveto |
| 21 | 249 |
| 22 | 1.000 endpath |
| 23 | endgate |
| 24 | } def |
| 25 | |
| 26 | /analog::source { |
| 27 | % hidden |
| 28 | begingate |
| 29 | 1 1.000 0 0 32 0.000 360.000 xcarc |
| 30 | 1 1.000 0 32 0 64 2 polygon |
| 31 | 1 1.000 0 -32 0 -64 2 polygon |
| 32 | endgate |
| 33 | } def |
| 34 | |
| 35 | /ngspice::Vsource { |
| 36 | <</p_yps 16 /p_xps 48 /p_rot 0 /@class (V) /@index (?) /@value (5) /p_jst 20 >> begingate |
| 37 | 1.000 360.000 0 0 analog::source |
| 38 | (+) {/Symbol cf} 2 5 p_rot 1.000 0 14 label |
| 39 | (-) {/Symbol cf} 2 5 p_rot 1.000 0 -22 label |
| 40 | 1.000 0.000 0.000 scb |
| 41 | (v.p) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 42 | (v.m) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 43 | 0.180 0.545 0.341 scb |
| 44 | mark @value ( %pv.p %pv.m ) @index @class (spice:) {/Times-Roman cf} ctmk 20 |
| 45 | 360.000 1.000 -96 -160 infolabel |
| 46 | 0.647 0.165 0.165 scb |
| 47 | mark (V) {hS} @value {/Times-Roman cf} ctmk p_jst p_rot 0.700 48 -16 label |
| 48 | 0.000 0.000 1.000 scb |
| 49 | mark @index @class {/Times-Roman cf} ctmk 20 p_rot 0.700 p_xps p_yps label |
| 50 | endgate |
| 51 | } def |
| 52 | |
| 53 | 1.000 270.000 <</p_xps -48 /p_yps -16 /p_rot 270 >> /ngspice::Vsource libinst |
| 54 | |
| 55 | /generic::sinusoid { |
| 56 | % hidden |
| 57 | begingate |
| 58 | 1 0.800 0 -48 0 48 -16 0 16 0 spline |
| 59 | endgate |
| 60 | } def |
| 61 | |
| 62 | /ngspice::ACsource { |
| 63 | <</p_yps1 -24 /p_xps1 48 /p_yps 32 /p_xps 48 /p_rot 0 /@index (?) /@value (5) /@offset |
| 64 | (0) /@freq (1) /@units (k) /p_jst 20 >> begingate |
| 65 | 1.000 0.000 0 0 analog::source |
| 66 | 1.000 0.000 0.000 scb |
| 67 | (s.p) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 68 | (s.m) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 69 | 0.180 0.545 0.341 scb |
| 70 | mark (\)) @units @freq ( ) @value ( ) @offset ( %ps.p %ps.m SIN\() @index |
| 71 | (spice:V) {/Times-Roman cf} ctmk 20 0.000 1.000 -336 -160 infolabel |
| 72 | 0.647 0.165 0.165 scb |
| 73 | mark (Hz) @units {hS} @freq {CR} (offset) {ss} (V) {hS} @offset {CR} (p-p) {ss} |
| 74 | (V) {hS} @value {/Times-Roman cf} ctmk p_jst p_rot 0.750 p_xps1 p_yps1 label |
| 75 | sce |
| 76 | 1.000 p_rot 0 0 generic::sinusoid |
| 77 | 0.000 0.000 1.000 scb |
| 78 | mark @index (V) {/Times-RomanISO cf} ctmk 16 p_rot 0.700 p_xps p_yps label |
| 79 | endgate |
| 80 | } def |
| 81 | |
| 82 | 1.000 90.000 <</p_xps -48 /p_yps -16 /p_xps1 80 /p_yps1 -40 /p_rot 270 >> /ngspice::ACsource libinst |
| 83 | |
| 84 | /ngspice::Vpwl { |
| 85 | <</p_yps1 -16 /p_xps1 48 /@pwl (0 0 1u 5 2u 5 3u 0) /p_jst 20 /@index (?) /@class |
| 86 | (V) /p_rot 0 /p_xps 48 /p_yps 16 >> begingate |
| 87 | 1.000 360.000 0 0 analog::source |
| 88 | (+) {/Symbol cf} 2 5 p_rot 1.000 0 14 label |
| 89 | (-) {/Symbol cf} 2 5 p_rot 1.000 0 -22 label |
| 90 | 1.000 0.000 0.000 scb |
| 91 | (1) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 92 | (2) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 93 | 0.000 0.000 1.000 scb |
| 94 | mark @index @class {/Times-Roman cf} ctmk p_jst p_rot 0.700 p_xps p_yps label |
| 95 | 0.180 0.545 0.341 scb |
| 96 | mark (\)) @pwl ( %p1 %p2 PWL\() @index @class (spice:) {/Times-Roman cf} ctmk |
| 97 | 16 0.000 1.000 -304 -176 infolabel |
| 98 | 0.647 0.165 0.165 scb |
| 99 | mark @pwl {/Times-Roman cf} ctmk p_jst p_rot 0.700 p_xps1 p_yps1 label |
| 100 | endgate |
| 101 | } def |
| 102 | |
| 103 | 1.000 270.000 <</p_yps1 -112 /p_rot 270 /p_xps -56 /p_yps -16 /p_xps1 56 >> /ngspice::Vpwl libinst |
| 104 | |
Tim Edwards | 6e20d4f | 2021-02-14 17:57:57 -0500 | [diff] [blame] | 105 | /ngspice::Capacitor { |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame] | 106 | <</p_yps1 16 /p_xps1 48 /p_yps -16 /p_xps 48 /@class (C) /@value (1.0) /@units |
| 107 | (p) /@index (?) /p_jst 20 /p_rot 0 >> begingate |
| 108 | 1 1.000 0 -64 0 -6 2 polygon |
| 109 | 1 1.000 0 64 0 6 2 polygon |
| 110 | 1 1.000 -32 6 32 6 2 polygon |
| 111 | 1.000 0.000 0.000 scb |
| 112 | (1) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 113 | (2) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 114 | 0.180 0.545 0.341 scb |
| 115 | mark @units @value ( %p1 %p2 ) @index @class (spice:) {/Times-Roman cf} ctmk 4 |
| 116 | 0.000 1.000 -208 -160 infolabel |
| 117 | (sim:e %p1 %p2) {/Times-Roman cf} 2 4 0.000 1.000 -208 -208 infolabel |
| 118 | 0.647 0.165 0.165 scb |
| 119 | mark (F) @units {hS} @value {/Times-Roman cf} ctmk p_jst p_rot 0.700 p_xps |
| 120 | p_yps label |
| 121 | 0.180 0.545 0.341 scb |
| 122 | mark @index @class (pcb:) {/Times-Roman cf} ctmk 20 0.000 1.000 -208 -256 |
| 123 | infolabel |
| 124 | 0.000 0.000 1.000 scb |
| 125 | mark @index @class {/Times-Roman cf} ctmk 20 p_rot 0.700 p_xps1 p_yps1 label |
| 126 | sce |
| 127 | 1 1.000 -32 -6 32 -6 2 polygon |
| 128 | endgate |
| 129 | } def |
| 130 | |
| 131 | 1.000 90.000 <</p_xps 56 /p_yps1 -16 /p_xps1 -56 /p_yps -32 /p_rot 270 >> /ngspice::Capacitor libinst |
| 132 | |
| 133 | /ngspice::Resistor { |
| 134 | <</@class (R) /@value (1.0) /@units (k) /@index (?) /p_jst 20 /p_rot 0 /p_xps |
| 135 | 32 /p_yps -16 /p_xps1 32 /p_yps1 16 >> begingate |
| 136 | 1 1.000 0 64 0 36 2 polygon |
| 137 | 1 1.000 0 -64 0 -36 2 polygon |
| 138 | 1 1.000 0 -36 14 -30 -14 -18 14 -6 -14 6 14 18 -14 30 0 36 8 polygon |
| 139 | 1.000 0.000 0.000 scb |
| 140 | (1) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 141 | (2) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 142 | 0.180 0.545 0.341 scb |
| 143 | mark @units @value ( %p1 %p2 ) @index @class (spice:) {/Times-Roman cf} ctmk 4 |
| 144 | 0.000 1.000 -208 -160 infolabel |
| 145 | mark @index @class (pcb:) {/Times-Roman cf} ctmk 20 0.000 1.000 -208 -256 |
| 146 | infolabel |
| 147 | (sim:r %p1 %p2) {/Times-Roman cf} 2 4 0.000 1.000 -208 -208 infolabel |
| 148 | 0.647 0.165 0.165 scb |
| 149 | mark (W) {/Symbol cf} @units {hS} @value {/Times-Roman cf} ctmk p_jst p_rot |
| 150 | 0.700 p_xps p_yps label |
| 151 | 0.000 0.000 1.000 scb |
| 152 | mark @index @class {/Times-Roman cf} ctmk p_jst p_rot 0.700 p_xps1 p_yps1 label |
| 153 | endgate |
| 154 | } def |
| 155 | |
| 156 | 1.000 90.000 <</p_yps1 -16 /p_xps1 -32 /p_yps -32 /p_rot 270 >> /ngspice::Resistor libinst |
| 157 | |
| 158 | /generic::circle { |
| 159 | % trivial |
| 160 | begingate |
| 161 | 1 1.000 16 0 6 0.000 360.000 xcarc |
| 162 | 1 1.000 0 0 10 0 2 polygon |
| 163 | 1.000 0.000 0.000 scb |
| 164 | (out) {/Times-Roman cf} 2 4 -0.000 1.000 16 0 pinlabel |
| 165 | (out) {/Times-Roman cf} 2 7 -0.000 1.000 0 0 pinlabel |
| 166 | endgate |
| 167 | } def |
| 168 | |
| 169 | /ngspice::Switch { |
| 170 | <</@model (switch) /@class (S) /@index (?) >> begingate |
| 171 | 1 1.300 32 32 2 -43 2 polygon |
| 172 | 1 0.600 8 -24 57 49.000 90.000 xcarc |
| 173 | -1.000 /sv 90.000 0 -64 generic::circle |
| 174 | 1.000 90.000 0 48 generic::circle |
| 175 | 1.000 0.000 0.000 scb |
| 176 | (1) {/Times-Roman cf} 2 9 0.000 1.000 0 48 pinlabel |
| 177 | (2) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 178 | sce |
| 179 | 1 1.000 32 -16 96 -16 2 polygon |
| 180 | -1.000 /sv 270.000 16 -16 generic::arrowhead |
| 181 | 1.000 0.000 0.000 scb |
| 182 | (3) {/Times-Roman cf} 2 20 0.000 1.000 96 -16 pinlabel |
| 183 | (4) {/Times-Roman cf} 2 20 0.000 1.000 96 -48 pinlabel |
| 184 | 0.180 0.545 0.341 scb |
| 185 | mark @model ( %p1 %p2 %p3 %p4 ) @index @class (spice1:) {/Times-Roman cf} ctmk |
| 186 | 16 0.000 0.700 -128 -192 infolabel |
| 187 | sce |
| 188 | (+) {/Symbol cf} 2 17 0.000 0.700 96 -8 label |
| 189 | (-) {/Symbol cf} 2 17 0.000 0.700 96 -40 label |
| 190 | 1 1.000 96 -48 72 -48 72 -64 3 polygon |
| 191 | 1 1.000 54 -64 90 -64 2 polygon |
| 192 | 1 1.000 62 -72 82 -72 2 polygon |
| 193 | 1 1.000 70 -80 74 -80 2 polygon |
| 194 | 0.180 0.545 0.341 scb |
| 195 | mark ( sw) @model (spice@1:.model ) {/Times-Roman cf} ctmk 16 0.000 0.700 -128 |
| 196 | -160 infolabel |
| 197 | endgate |
| 198 | } def |
| 199 | |
| 200 | /ngspice::Vpulse { |
| 201 | <</@period (10.0u) /@pwidth (1.0u) /@t_fall (1.0u) /@t_rise (1.0u) /@t_delay |
| 202 | (0.0) /@vpulse (3.3) /@vinit (0.0) /p_jst 20 /@index (?) /@class (V) /p_rot 0 /p_xps |
| 203 | 48 /p_yps 16 >> begingate |
| 204 | 1.000 360.000 0 0 analog::source |
| 205 | 1.000 0.000 0.000 scb |
| 206 | (v.p) {/Times-Roman cf} 2 9 0.000 1.000 0 64 pinlabel |
| 207 | (v.m) {/Times-Roman cf} 2 13 0.000 1.000 0 -64 pinlabel |
| 208 | 0.180 0.545 0.341 scb |
| 209 | mark (\)) @period ( ) @pwidth ( ) @t_fall ( ) @t_rise ( ) @t_delay ( ) @vpulse |
| 210 | ( ) @vinit ( PULSE\() @vpulse ( %pv.p %pv.m DC=) @index @class (spice:) |
| 211 | {/Times-Roman cf} ctmk 20 360.000 1.000 -96 -160 infolabel |
| 212 | 0.647 0.165 0.165 scb |
| 213 | mark (V) {hS} @vpulse (\261) @vinit {/Times-Roman cf} ctmk p_jst p_rot 0.700 48 |
| 214 | -16 label |
| 215 | 0.000 0.000 1.000 scb |
| 216 | mark @index @class {/Times-Roman cf} ctmk 20 p_rot 0.700 p_xps p_yps label |
| 217 | sce |
| 218 | 1 1.000 -24 -12 -16 -12 -16 12 -8 12 -8 -12 0 -12 0 12 8 12 8 -12 16 -12 16 12 |
| 219 | 24 12 12 polygon |
| 220 | mark (s) @period (T=) {0.647 0.165 0.165 scb} {/Times-Roman cf} ctmk 16 0.000 |
| 221 | 0.700 48 -52 label |
| 222 | (+) {/Times-Roman cf} 2 21 0.000 0.600 0 22 label |
| 223 | endgate |
| 224 | } def |
| 225 | |
| 226 | |
| 227 | % EndLib |