9
9
*
10
10
****************************************************************************/
11
11
12
- // The following is a hack to fix Surelog elaboration. It doesn't seem to
13
- // properly handle generate if-statements with multibit compare, so we use a
14
- // macro to break it down into multiple single-bit comparisons.
15
- // TODO: remove once Surelog is fixed.
16
- `define CELLMAP_COMPARE(CELL) CELLMAP[i* 24 ] == CELL[0 ] && CELLMAP[i* 24 + 1 ] == CELL[1 ] && CELLMAP[i* 24 + 2 ] == CELL[2 ] && CELLMAP[i* 24 + 3 ] == CELL[3 ]
17
-
18
12
module la_ioside
19
13
#(// per side parameters
20
14
parameter SIDE = "NO" , // "NO", "SO", "EA", "WE"
@@ -59,7 +53,7 @@ module la_ioside
59
53
// BIDIR
60
54
// initial
61
55
// $display("cell=%d, pin=%d",i, CELLMAP[(i*24+8)+:8]);
62
- if (`CELLMAP_COMPARE( LA_BIDIR) )
56
+ if (CELLMAP[i * 24 + : 4 ] == LA_BIDIR[ 3 : 0 ] )
63
57
begin : ila_iobidir
64
58
la_iobidir #(.SIDE(SIDE),
65
59
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -82,7 +76,7 @@ module la_ioside
82
76
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
83
77
end
84
78
// INPUT
85
- else if (`CELLMAP_COMPARE( LA_INPUT) )
79
+ else if (CELLMAP[i * 24 + : 4 ] == LA_INPUT[ 3 : 0 ] )
86
80
begin : ila_ioinput
87
81
la_ioinput #(.SIDE(SIDE),
88
82
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -103,7 +97,7 @@ module la_ioside
103
97
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
104
98
end
105
99
// ANALOG
106
- else if (`CELLMAP_COMPARE( LA_ANALOG) )
100
+ else if (CELLMAP[i * 24 + : 4 ] == LA_ANALOG[ 3 : 0 ] )
107
101
begin : ila_ioanalog
108
102
la_ioanalog #(.SIDE(SIDE),
109
103
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -121,7 +115,7 @@ module la_ioside
121
115
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
122
116
end
123
117
// XTAL
124
- else if (`CELLMAP_COMPARE( LA_XTAL) )
118
+ else if (CELLMAP[i * 24 + : 4 ] == LA_XTAL[ 3 : 0 ] )
125
119
begin : ila_ioxtal
126
120
la_ioxtal #(.SIDE(SIDE),
127
121
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -141,7 +135,7 @@ module la_ioside
141
135
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
142
136
end
143
137
// POC
144
- else if (`CELLMAP_COMPARE( LA_POC) )
138
+ else if (CELLMAP[i * 24 + : 4 ] == LA_POC[ 3 : 0 ] )
145
139
begin : ila_iopoc
146
140
la_iopoc #(.SIDE(SIDE),
147
141
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -155,14 +149,14 @@ module la_ioside
155
149
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
156
150
end
157
151
// CUT
158
- else if (`CELLMAP_COMPARE( LA_CUT) )
152
+ else if (CELLMAP[i * 24 + : 4 ] == LA_CUT[ 3 : 0 ] )
159
153
begin : ila_iocut
160
154
la_iocut #(.SIDE(SIDE),
161
155
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
162
156
.RINGW(RINGW))
163
157
i0 (.vss (vss));
164
158
end
165
- else if (`CELLMAP_COMPARE( LA_VDDIO) )
159
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VDDIO[ 3 : 0 ] )
166
160
begin : ila_iovddio
167
161
la_iovddio #(.SIDE(SIDE),
168
162
.TYPE(CELLMAP[((i*24 +8 )+4 )+:4 ]),
@@ -176,7 +170,7 @@ module la_ioside
176
170
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
177
171
end
178
172
// VSSIO
179
- else if (`CELLMAP_COMPARE( LA_VSSIO) )
173
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VSSIO[ 3 : 0 ] )
180
174
begin : ila_iovssio
181
175
la_iovssio #(.SIDE(SIDE),
182
176
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -190,7 +184,7 @@ module la_ioside
190
184
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
191
185
end
192
186
// VDD
193
- else if (`CELLMAP_COMPARE( LA_VDD) )
187
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VDD[ 3 : 0 ] )
194
188
begin : ila_iovdd
195
189
la_iovdd #(.SIDE(SIDE),
196
190
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -204,7 +198,7 @@ module la_ioside
204
198
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
205
199
end
206
200
// VSS
207
- else if (`CELLMAP_COMPARE( LA_VSS) )
201
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VSS[ 3 : 0 ] )
208
202
begin : ila_iovss
209
203
la_iovss #(.SIDE(SIDE),
210
204
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -218,7 +212,7 @@ module la_ioside
218
212
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
219
213
end
220
214
// VDDA
221
- else if (`CELLMAP_COMPARE( LA_VDDA) )
215
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VDDA[ 3 : 0 ] )
222
216
begin : ila_iovdda
223
217
la_iovdda #(.SIDE(SIDE),
224
218
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
@@ -232,7 +226,7 @@ module la_ioside
232
226
.ioring(ioring[CELLMAP[(i*24 +16 )+:8 ]*RINGW+:RINGW]));
233
227
end
234
228
// VSSA
235
- else if (`CELLMAP_COMPARE( LA_VSSA) )
229
+ else if (CELLMAP[i * 24 + : 4 ] == LA_VSSA[ 3 : 0 ] )
236
230
begin : ila_iovssa
237
231
la_iovssa #(.SIDE(SIDE),
238
232
.TYPE(CELLMAP[(i*24 +4 )+:4 ]),
0 commit comments