Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/I2L.m4

raw
1 .PS
2 # I2L.m4
3 log_init
4
5 [
6 down_
7 T1: bi_trans(,R,BC2uEBU)
8 dy = T1.C0.y-T1.C1.y
9 dx = T1.C0.x-T1.Bulk.x
10 up_
11 Q1: bi_trans(,,BC1dEBU) with .C1 at (T1.C2.x+dy+dx+dx,T1.C0.y-dy)
12 Q2: bi_trans(,,BC1dEBU) with .C1 at Q1.E+(0,-dy*2)
13 Q3: bi_tr(,,) with .B at Q2.C0+(2*dy,0)
14 down_
15 T2: bi_trans(,R,BC1uEBU) with .C1 at (Q3.C.x+2*dx+2*dy,Q1.C0.y+dy)
16 up_
17 X1: bi_tr(,,) with .B at (T2.C0.x+dy+dx,Q1.C0.y)
18 X2: bi_tr(,,) with .B at (X1.B,Q3.C)
19
20 line down dx from Q2.E
21 G: dot
22 line from T1.B to (T1.B,G) then to (X1.E.x+dy,G.y) then to X1.E+(dy,0) \
23 then to X1.E
24 line from X2.E right dy; dot
25
26 line from Q1.E down dy then to (T1.B.x,Q1.E.y-dy); dot
27 line from T1.C0 to (Q3.B,T1.C0) then to Q3.B; dot; line to Q2.C0
28
29 A: dot(at (T1.B,Q1.B)-(dx,0)); { "$A$" rjust }
30 line to Q1.B
31 line from T1.C2 to (T1.C2,Q1.B); dot
32
33 line from Q2.B to (A,Q2.B); dot; { "$B$" rjust }
34 line right dy from T1.C1 then down T1.C1.y-Q2.B.y; dot
35
36 VB: dot(at (T2.E.x+2*dx,T1.E.y+dy)); { "$V_B$" ljust }
37 line to (T1.E,Here) then to T1.E
38 line from T2.E to (T2.E,VB); dot
39
40 line from Q1.C1 to (Q3.C,Q1.C1) then to Q3.C; dot; line to X2.B
41
42 line from Q1.C0 to X1.B
43 dot(at Q1.C0+(dy,0)); line to (Here,Q2.C1) then to Q2.C1
44
45 line from Q3.E to (Q3.E,G); dot; ground
46
47 line from T2.B to (T2.B,G); dot
48
49 line from T2.C1 to (T2.C1,X1.B); dot
50 "$\overline{A+B}$" below at Here+(0,-2pt__)
51
52 line from T2.C0 to (X2.B,T2.C0) then to X2.B; dot
53 "$\overline{A+\overline{B}}$" below at (T2.E,Here)+(0pt__,-2pt__)
54
55 ]
56
57 [
58 right_
59
60 jog = AND_ht/2*L_unit
61
62 X1: NOR_gate
63 line right jog from X1.Out; "$\overline{A+B}$" ljust
64 X2: NOR_gate at X1+svec_(0,-AND_ht*3/2)
65 line right jog from X2.Out; "$\overline{A+\overline{B}}$" ljust
66 line left jog from X2.In2
67 right_
68 NOT: NOT_gate with .Out at Here
69 line left jog from NOT.In1 then up X1.In2.y-NOT.In1.y; dot
70 line from X1.In2 to Here chop 0 chop -jog
71 B: dot; "$B$" rjust
72 line from X1.In1 to (B,X1.In1); dot; "$A$" rjust
73 line left jog from X2.In1 then up X1.In1.y-X2.In1.y; dot
74
75 ] with .e at last [].w-(1,0)
76
77 .PE