aboutsummaryrefslogtreecommitdiffstats
path: root/generic/viaduct/fabulous/fabulous.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2023-04-05 14:33:07 +0200
committermyrtle <gatecat@ds0.me>2023-04-05 15:45:18 +0200
commit23f2877ddee51e7e69fdf2b1caaa0337e2459ce9 (patch)
tree71b480f0653c5f9cc57926ac717e448c764e8ee0 /generic/viaduct/fabulous/fabulous.cc
parent20b7f760d925c0c102f5a4d03adeb3f3af4ca6f6 (diff)
downloadnextpnr-23f2877ddee51e7e69fdf2b1caaa0337e2459ce9.tar.gz
nextpnr-23f2877ddee51e7e69fdf2b1caaa0337e2459ce9.tar.bz2
nextpnr-23f2877ddee51e7e69fdf2b1caaa0337e2459ce9.zip
fabulous: Fix bel names for pass bels in v2 format
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'generic/viaduct/fabulous/fabulous.cc')
-rw-r--r--generic/viaduct/fabulous/fabulous.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/generic/viaduct/fabulous/fabulous.cc b/generic/viaduct/fabulous/fabulous.cc
index 00c8909b..6141974e 100644
--- a/generic/viaduct/fabulous/fabulous.cc
+++ b/generic/viaduct/fabulous/fabulous.cc
@@ -349,9 +349,19 @@ struct FabulousImpl : ViaductAPI
NPNR_ASSERT(bel_idx.size() == 1);
int bel_z = bel_idx[0] - 'A';
NPNR_ASSERT(bel_z >= 0 && bel_z < 26);
+ IdString bel_name = bel_idx.to_id(ctx);
+ if (bel_type.in(id_InPass4_frame_config, id_OutPass4_frame_config, id_InPass4_frame_config_mux,
+ id_OutPass4_frame_config_mux)) {
+ // Assign BRAM IO a nicer name than just a letter
+ auto prefix = csv.next_field();
+ if (prefix.empty()) {
+ log_error("Bel definition missing field; please update FABulous!\n");
+ }
+ bel_name = prefix.rsplit('_').first.to_id(ctx);
+ }
Loc loc = tile_loc(tile);
- curr_bel = ctx->addBel(IdStringList::concat(tile, bel_idx.to_id(ctx)), bel_type,
- Loc(loc.x, loc.y, bel_z), false, false);
+ curr_bel = ctx->addBel(IdStringList::concat(tile, bel_name), bel_type, Loc(loc.x, loc.y, bel_z), false,
+ false);
} else if (cmd.in(id_I, id_O)) {
IdString port = csv.next_field().to_id(ctx);
auto wire_name = csv.next_field().split('.');