-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflattened.v
217 lines (216 loc) · 10.1 KB
/
flattened.v
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/* Generated by Yosys 0.25+83 (git sha1 755b753e1, aarch64-apple-darwin20.2-clang 10.0.0-4ubuntu1 -fPIC -Os) */
/* top = 1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:2.9-13.18" */
module d38_jxlu_pwm(io_in, io_out);
wire _000_;
wire _001_;
wire _002_;
wire _003_;
wire _004_;
wire _005_;
wire _006_;
wire _007_;
wire _008_;
wire _009_;
wire _010_;
wire _011_;
wire _012_;
wire _013_;
wire _014_;
wire _015_;
wire _016_;
wire _017_;
wire _018_;
wire _019_;
wire _020_;
wire _021_;
wire _022_;
wire _023_;
wire _024_;
wire _025_;
wire _026_;
wire _027_;
wire _028_;
wire _029_;
wire _030_;
wire _031_;
wire _032_;
wire _033_;
wire _034_;
wire _035_;
wire _036_;
wire _037_;
wire _038_;
wire _039_;
wire _040_;
wire _041_;
wire _042_;
/* force_downto = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:14.17-14.29|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99|/Users/anish/workspace/oss-cad-suite/libexec/../share/yosys/techmap.v:274.23-274.25" */
wire [5:0] _043_;
/* force_downto = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:24.24-24.38|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99|/Users/anish/workspace/oss-cad-suite/libexec/../share/yosys/techmap.v:270.23-270.24" */
wire [5:0] _044_;
/* force_downto = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:24.24-24.38|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99|/Users/anish/workspace/oss-cad-suite/libexec/../share/yosys/techmap.v:270.26-270.27" */
wire [5:0] _045_;
/* src = "d38_jxlu_pwm/src/wrapper.v:3.26-3.31" */
input [13:0] io_in;
wire [13:0] io_in;
/* src = "d38_jxlu_pwm/src/wrapper.v:4.27-4.33" */
output [13:0] io_out;
wire [13:0] io_out;
/* hdlname = "mchip io_in" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/poisonninja_top.v:4.23-4.28" */
wire [7:0] \mchip.io_in ;
/* hdlname = "mchip io_out" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/poisonninja_top.v:5.24-5.30" */
wire [7:0] \mchip.io_out ;
/* hdlname = "mchip pwm active_duty" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:10.17-10.28|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
reg [5:0] \mchip.pwm.active_duty ;
/* hdlname = "mchip pwm clk" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:4.17-4.20|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
wire \mchip.pwm.clk ;
/* hdlname = "mchip pwm counter" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:9.17-9.24|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
reg [5:0] \mchip.pwm.counter ;
/* hdlname = "mchip pwm duty" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:6.23-6.27|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
wire [5:0] \mchip.pwm.duty ;
/* hdlname = "mchip pwm pwm_signal" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:7.18-7.28|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
reg \mchip.pwm.pwm_signal ;
/* hdlname = "mchip pwm reset" */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:5.17-5.22|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
wire \mchip.pwm.reset ;
assign _002_ = \mchip.pwm.counter [0] & ~(\mchip.pwm.counter [1]);
assign _003_ = \mchip.pwm.counter [2] | \mchip.pwm.counter [3];
assign _004_ = _002_ & ~(_003_);
assign _005_ = ~(\mchip.pwm.counter [5] & \mchip.pwm.counter [4]);
assign _006_ = _004_ & ~(_005_);
assign _000_ = _006_ | io_in[1];
assign _044_[0] = ~\mchip.pwm.counter [0];
assign _007_ = ~(\mchip.pwm.active_duty [0] ^ \mchip.pwm.counter [0]);
assign _008_ = ~(\mchip.pwm.active_duty [1] ^ \mchip.pwm.counter [1]);
assign _009_ = _008_ & _007_;
assign _010_ = ~(\mchip.pwm.active_duty [3] ^ \mchip.pwm.counter [3]);
assign _011_ = \mchip.pwm.active_duty [2] ^ \mchip.pwm.counter [2];
assign _012_ = _010_ & ~(_011_);
assign _013_ = _012_ & _009_;
assign _014_ = ~(\mchip.pwm.active_duty [5] ^ \mchip.pwm.counter [5]);
assign _015_ = \mchip.pwm.active_duty [4] ^ \mchip.pwm.counter [4];
assign _016_ = _014_ & ~(_015_);
assign _017_ = ~(_016_ & _013_);
assign _018_ = \mchip.pwm.active_duty [3] | ~(\mchip.pwm.counter [3]);
assign _019_ = \mchip.pwm.active_duty [2] | ~(\mchip.pwm.counter [2]);
assign _020_ = _010_ & ~(_019_);
assign _021_ = _018_ & ~(_020_);
assign _022_ = \mchip.pwm.active_duty [1] | ~(\mchip.pwm.counter [1]);
assign _023_ = \mchip.pwm.active_duty [0] & ~(\mchip.pwm.counter [0]);
assign _024_ = _008_ & ~(_023_);
assign _025_ = _022_ & ~(_024_);
assign _026_ = _012_ & ~(_025_);
assign _027_ = _021_ & ~(_026_);
assign _028_ = _016_ & ~(_027_);
assign _029_ = \mchip.pwm.active_duty [4] | ~(\mchip.pwm.counter [4]);
assign _030_ = _014_ & ~(_029_);
assign _031_ = \mchip.pwm.counter [5] & ~(\mchip.pwm.active_duty [5]);
assign _032_ = _031_ | _030_;
assign _033_ = _032_ | _028_;
assign _001_ = _017_ & ~(_033_);
assign _045_[1] = \mchip.pwm.counter [1] ^ \mchip.pwm.counter [0];
assign _034_ = ~(\mchip.pwm.counter [1] & \mchip.pwm.counter [0]);
assign _045_[2] = ~(_034_ ^ \mchip.pwm.counter [2]);
assign _035_ = \mchip.pwm.counter [2] & ~(_034_);
assign _045_[3] = _035_ ^ \mchip.pwm.counter [3];
assign _036_ = ~(\mchip.pwm.counter [2] & \mchip.pwm.counter [3]);
assign _037_ = _036_ | _034_;
assign _045_[4] = ~(_037_ ^ \mchip.pwm.counter [4]);
assign _038_ = \mchip.pwm.counter [4] & ~(_037_);
assign _045_[5] = _038_ ^ \mchip.pwm.counter [5];
assign _039_ = ~(io_in[6] & io_in[7]);
assign _040_ = ~(io_in[2] & io_in[3]);
assign _041_ = io_in[4] | io_in[5];
assign _042_ = _040_ & ~(_041_);
assign _043_[5] = _042_ | _039_;
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [0] <= 1'h0;
else \mchip.pwm.counter [0] <= _044_[0];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [1] <= 1'h0;
else \mchip.pwm.counter [1] <= _045_[1];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [2] <= 1'h0;
else \mchip.pwm.counter [2] <= _045_[2];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [3] <= 1'h0;
else \mchip.pwm.counter [3] <= _045_[3];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [4] <= 1'h0;
else \mchip.pwm.counter [4] <= _045_[4];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (_000_) \mchip.pwm.counter [5] <= 1'h0;
else \mchip.pwm.counter [5] <= _045_[5];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (!io_in[1]) \mchip.pwm.pwm_signal <= _001_;
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [0] <= 1'h0;
else \mchip.pwm.active_duty [0] <= io_in[2];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [1] <= 1'h1;
else \mchip.pwm.active_duty [1] <= io_in[3];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [2] <= 1'h0;
else \mchip.pwm.active_duty [2] <= io_in[4];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [3] <= 1'h0;
else \mchip.pwm.active_duty [3] <= io_in[5];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [4] <= 1'h1;
else \mchip.pwm.active_duty [4] <= io_in[6];
/* \always_ff = 32'd1 */
/* src = "d38_jxlu_pwm/src/wrapper.v:8.29-11.14|d38_jxlu_pwm/src/pwm_generator.v:12.5-37.8|d38_jxlu_pwm/src/poisonninja_top.v:9.19-9.99" */
always @(posedge io_in[12])
if (io_in[1])
if (!_043_[5]) \mchip.pwm.active_duty [5] <= 1'h1;
else \mchip.pwm.active_duty [5] <= io_in[7];
assign _043_[4:0] = 5'h00;
assign _044_[5:1] = \mchip.pwm.counter [5:1];
assign _045_[0] = _044_[0];
assign io_out = { 13'h0000, \mchip.pwm.pwm_signal };
assign \mchip.io_in = { io_in[7:1], io_in[12] };
assign \mchip.io_out = { 7'h00, \mchip.pwm.pwm_signal };
assign \mchip.pwm.clk = io_in[12];
assign \mchip.pwm.duty = io_in[7:2];
assign \mchip.pwm.reset = io_in[1];
endmodule