Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/dpv/LogicDPV.m4

raw
1 .PS
2 # Logic.m4
3 log_init(svg_font(sans-serif,11bp__))
4 xgap = 0.5
5 [ dmov = 0.4
6 { {AND_gate ; "`AND_gate'" ljust at last [].w + (xgap,0)}
7 move down dmov; right_
8 {OR_gate ; "`OR_gate'" ljust at last [].w + (xgap,0)}
9 move down dmov; right_
10 {BUFFER_gate ; "`BUFFER_gate'" ljust at last [].w + (xgap,0)}
11 move down dmov; right_
12 {XOR_gate ; "`XOR_gate'" ljust at last [].w + (xgap,0)}
13 }
14
15 xgap = 0.65
16 move right_ 2
17 { { NAND_gate ; "`NAND_gate'" ljust at last [].w + (xgap,0) }
18 move down dmov; right_
19 { Gate: NOR_gate(3)
20 "`NOR_gate(3)'" ljust at last [].w + (xgap,0)
21 thinlines_
22 spline <- from Gate.Out right arrowht*2.0 \
23 then up 0.15 then right 0.05
24 "`Out'" ljust
25 spline <- from Gate.N_Out down arrowht*2.0 \
26 then right 0.1+arrowht*1.5+NOT_rad down 0.15-arrowht*2.0
27 "`N_Out'" ljust
28 for_(1,3,1,
29 `arrow <- left 0.2 down 0.05 from Gate.In`'m4x
30 "In`'m4x" rjust at Here+(0,(2-m4x)*0.02)')
31 }
32 thicklines_
33 move down dmov; right_
34 { NOT_gate ; "`NOT_gate'" ljust at last [].w + (xgap,0) }
35 move down dmov; right_
36 { NXOR_gate ; "`NXOR_gate'" ljust at last [].w + (xgap,0) }
37 }
38 move right_ 2
39 { {B: NAND_gate(,B) ; "`NAND_gate(,B)'" ljust at B.w + (xgap,0)}
40 { line invis right 1.8 from last [].se then down 1}
41 move down dmov; right_
42 move left N_diam*L_unit; right_
43 {NOR_gate(3,NB) ; "`NOR_gate(3,NB)'" ljust at (B.w,last []) + (xgap,0) }
44 move down dmov; right_
45 {BOX_gate(PN,N,,,=1)
46 "`BOX_gate(PN,N,,,=1)'" ljust at (B.w,last []) + (xgap,0)
47 line left 0.15 from last [].In1
48 line left 0.15-NOT_rad*2 from last [].In2
49 line right 0.15 from last [].Out }
50 move down dmov; move right_ N_diam*L_unit
51 {BOX_gate(PP,N,,,=)
52 "`BOX_gate(PP,N,,,=)'" ljust at (B.w,last []) + (xgap,0)
53 line left 0.15 from last [].In1
54 line left 0.15 from last [].In2
55 line right 0.15 from last [].Out }
56 }
57 ]
58 command "</g>" # end font
59 .PE