1use crate::*;
2
3#[derive(Clone, Debug, PartialEq, Node)]
6pub enum GateInstantiation {
7 Cmos(Box<GateInstantiationCmos>),
8 Enable(Box<GateInstantiationEnable>),
9 Mos(Box<GateInstantiationMos>),
10 NInput(Box<GateInstantiationNInput>),
11 NOutput(Box<GateInstantiationNOutput>),
12 PassEn(Box<GateInstantiationPassEn>),
13 Pass(Box<GateInstantiationPass>),
14 Pulldown(Box<GateInstantiationPulldown>),
15 Pullup(Box<GateInstantiationPullup>),
16}
17
18#[derive(Clone, Debug, PartialEq, Node)]
19pub struct GateInstantiationCmos {
20 pub nodes: (
21 CmosSwitchtype,
22 Option<Delay3>,
23 List<Symbol, CmosSwitchInstance>,
24 Symbol,
25 ),
26}
27
28#[derive(Clone, Debug, PartialEq, Node)]
29pub struct GateInstantiationEnable {
30 pub nodes: (
31 EnableGatetype,
32 Option<DriveStrength>,
33 Option<Delay3>,
34 List<Symbol, EnableGateInstance>,
35 Symbol,
36 ),
37}
38
39#[derive(Clone, Debug, PartialEq, Node)]
40pub struct GateInstantiationMos {
41 pub nodes: (
42 MosSwitchtype,
43 Option<Delay3>,
44 List<Symbol, MosSwitchInstance>,
45 Symbol,
46 ),
47}
48
49#[derive(Clone, Debug, PartialEq, Node)]
50pub struct GateInstantiationNInput {
51 pub nodes: (
52 NInputGatetype,
53 Option<DriveStrength>,
54 Option<Delay2>,
55 List<Symbol, NInputGateInstance>,
56 Symbol,
57 ),
58}
59
60#[derive(Clone, Debug, PartialEq, Node)]
61pub struct GateInstantiationNOutput {
62 pub nodes: (
63 NOutputGatetype,
64 Option<DriveStrength>,
65 Option<Delay2>,
66 List<Symbol, NOutputGateInstance>,
67 Symbol,
68 ),
69}
70
71#[derive(Clone, Debug, PartialEq, Node)]
72pub struct GateInstantiationPassEn {
73 pub nodes: (
74 PassEnSwitchtype,
75 Option<Delay2>,
76 List<Symbol, PassEnableSwitchInstance>,
77 Symbol,
78 ),
79}
80
81#[derive(Clone, Debug, PartialEq, Node)]
82pub struct GateInstantiationPass {
83 pub nodes: (PassSwitchtype, List<Symbol, PassSwitchInstance>, Symbol),
84}
85
86#[derive(Clone, Debug, PartialEq, Node)]
87pub struct GateInstantiationPulldown {
88 pub nodes: (
89 Keyword,
90 Option<PulldownStrength>,
91 List<Symbol, PullGateInstance>,
92 Symbol,
93 ),
94}
95
96#[derive(Clone, Debug, PartialEq, Node)]
97pub struct GateInstantiationPullup {
98 pub nodes: (
99 Keyword,
100 Option<PullupStrength>,
101 List<Symbol, PullGateInstance>,
102 Symbol,
103 ),
104}
105
106#[derive(Clone, Debug, PartialEq, Node)]
107pub struct CmosSwitchInstance {
108 pub nodes: (
109 Option<NameOfInstance>,
110 Paren<(
111 OutputTerminal,
112 Symbol,
113 InputTerminal,
114 Symbol,
115 NcontrolTerminal,
116 Symbol,
117 PcontrolTerminal,
118 )>,
119 ),
120}
121
122#[derive(Clone, Debug, PartialEq, Node)]
123pub struct EnableGateInstance {
124 pub nodes: (
125 Option<NameOfInstance>,
126 Paren<(
127 OutputTerminal,
128 Symbol,
129 InputTerminal,
130 Symbol,
131 EnableTerminal,
132 )>,
133 ),
134}
135
136#[derive(Clone, Debug, PartialEq, Node)]
137pub struct MosSwitchInstance {
138 pub nodes: (
139 Option<NameOfInstance>,
140 Paren<(
141 OutputTerminal,
142 Symbol,
143 InputTerminal,
144 Symbol,
145 EnableTerminal,
146 )>,
147 ),
148}
149
150#[derive(Clone, Debug, PartialEq, Node)]
151pub struct NInputGateInstance {
152 pub nodes: (
153 Option<NameOfInstance>,
154 Paren<(OutputTerminal, Symbol, List<Symbol, InputTerminal>)>,
155 ),
156}
157
158#[derive(Clone, Debug, PartialEq, Node)]
159pub struct NOutputGateInstance {
160 pub nodes: (
161 Option<NameOfInstance>,
162 Paren<(List<Symbol, OutputTerminal>, Symbol, InputTerminal)>,
163 ),
164}
165
166#[derive(Clone, Debug, PartialEq, Node)]
167pub struct PassSwitchInstance {
168 pub nodes: (
169 Option<NameOfInstance>,
170 Paren<(InoutTerminal, Symbol, InoutTerminal)>,
171 ),
172}
173
174#[derive(Clone, Debug, PartialEq, Node)]
175pub struct PassEnableSwitchInstance {
176 pub nodes: (
177 Option<NameOfInstance>,
178 Paren<(InoutTerminal, Symbol, InoutTerminal, Symbol, EnableTerminal)>,
179 ),
180}
181
182#[derive(Clone, Debug, PartialEq, Node)]
183pub struct PullGateInstance {
184 pub nodes: (Option<NameOfInstance>, Paren<OutputTerminal>),
185}