-
Notifications
You must be signed in to change notification settings - Fork 0
/
and8c.cir
157 lines (137 loc) · 3.4 KB
/
and8c.cir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
* =============================================================================
* Circuit : CMOS AND8 Gate Type C
* Description: AND4B * 2 + AND2 * 1
*
* Author : Wuqiong Zhao ([email protected])
* Date : 2023-06-02
* License : MIT
* =============================================================================
.title CMOS AND8C
* Parameters and Model
* -----------------------------------------------------------------------------
.param VDD='1.0V'
.temp 25
.inc ./FreePDK45/ff.inc
* Supply Voltage Source
* -----------------------------------------------------------------------------
Vdd vdd gnd VDD
* AND8C
* -----------------------------------------------------------------------------
XAND8 gnd in1 in2 in3 in4 in5 in6 in7 in8 out vdd AND8C
.inc ./and8c.inc
* Test Circuit
* -----------------------------------------------------------------------------
XTest gnd
+ ii1 ii2 ii3 ii4 ii5 ii6 ii7 ii8
+ in1 in2 in3 in4 in5 in6 in7 in8
+ out vdd INV2_TEST
.inc ./and8_test_inv2.inc
* Input Signals
* -----------------------------------------------------------------------------
Vii1 ii1 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii2 ii2 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii3 ii3 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii4 ii4 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii5 ii5 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii6 ii6 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii7 ii7 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 3.0ns VDD
+ )
Vii8 ii8 gnd PWL
+ (
+ 0.0ns 0V
+ 0.9ns 0V
+ 1.1ns VDD
+ 1.9ns VDD
+ 2.1ns 0V
+ 3.0ns 0V
+ )
* Analysis
* -----------------------------------------------------------------------------
.ic V(out)=0
.tran 0.005ns 3ns
.control
run
* >>>>> plot >>>>>>
set xgridwidth = 2
set xbrushwidth = 3
* "svgwidth", "svgheight", "svgfont-size", "svgfont-width", "svguse-color", "svgstroke-width", "svggrid-width",
set svg_intopts = ( 1024 256 16 0 1 2 0 )
* "svgbackground", "svgfont-family", "svgfont"
setcs svg_stropts = ( white Arial Arial )
set hcopydevtype = svg
set color1 = black
set color2 = red
set color3 = blue
set color4 = green
hardcopy fig/plot_and8c_t.svg
+ in1 out in8
+ title 'CMOS AND8c'
+ xlabel 't'
+ ylabel 'Voltage'
+ ylimit -0.2 1.2
+ ydelta 0.5
* for MS Windows, using Edge
if $oscompiled = 1 | $oscompiled = 8
shell Start fig/plot_and8c_t.svg
else
if $oscompiled = 7
* macOS (using Safari, no need to install X11)
shell open -a safari fig/plot_and8c_t.svg &
else
* for CYGWIN, Linux, using feh and X11
shell feh --magick-timeout 1 fig/plot_and8c_t.svg &
end
end
* <<<<< plot <<<<<
.endc
* Measurement
* -----------------------------------------------------------------------------
.measure tran tr trig V(out) val='VDD*0.1' rise=1 targ V(out) val='VDD*0.9' rise=1
.measure tran tf trig V(out) val='VDD*0.9' fall=1 targ V(out) val='VDD*0.1' fall=1
.measure tran tpdr trig V(in1) val='VDD/2' rise=1 targ V(out) val='VDD/2' rise=1
.measure tran tpdf trig V(in8) val='VDD/2' fall=1 targ V(out) val='VDD/2' fall=1
.measure tran tpd param='(tpdr+tpdf)/2'
* power dissipation of the AND8 gate
.inc ./and8_test_pow.inc
.end