File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,4 +1192,5 @@ X(HCLK_OUT3)
1192
1192
X(BUFG)
1193
1193
X(CLOCK)
1194
1194
1195
-
1195
+ // Globally routed
1196
+ X(GLOBALLY_ROUTED)
Original file line number Diff line number Diff line change @@ -196,7 +196,10 @@ struct GowinGlobalRouter
196
196
}
197
197
if (routed == NOT_ROUTED) {
198
198
ctx->unbindWire (src);
199
+ } else {
200
+ net->attrs [id_GLOBALLY_ROUTED] = Property (" YES" );
199
201
}
202
+
200
203
return routed;
201
204
}
202
205
@@ -233,6 +236,8 @@ struct GowinGlobalRouter
233
236
}
234
237
if (routed == NOT_ROUTED) {
235
238
ctx->unbindWire (src);
239
+ } else {
240
+ net->attrs [id_GLOBALLY_ROUTED] = Property (" YES" );
236
241
}
237
242
238
243
// b) route net before buf from whatever to the buf input
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ struct GowinImpl : HimbaechelAPI
41
41
42
42
// wires
43
43
bool checkPipAvail (PipId pip) const override ;
44
+ bool checkPipAvailForNet (PipId pip, const NetInfo *net) const override ;
44
45
45
46
// Cluster
46
47
bool isClusterStrict (const CellInfo *cell) const { return true ; }
@@ -188,6 +189,16 @@ void GowinImpl::init(Context *ctx)
188
189
// We do not allow the use of global wires that bypass a special router.
189
190
bool GowinImpl::checkPipAvail (PipId pip) const { return !gwu.is_global_pip (pip); }
190
191
192
+ bool GowinImpl::checkPipAvailForNet (PipId pip, const NetInfo *net) const {
193
+ if (gwu.is_global_pip (pip)) {
194
+ // Available for a globally routed net
195
+ auto prop = net->attrs .find (id_GLOBALLY_ROUTED);
196
+ return prop != net->attrs .end () && prop->second == Property (" YES" );
197
+ }
198
+
199
+ return true ;
200
+ }
201
+
191
202
void GowinImpl::pack ()
192
203
{
193
204
if (ctx->settings .count (ctx->id (" cst.filename" ))) {
You can’t perform that action at this time.
0 commit comments