aboutsummaryrefslogtreecommitdiffstats
path: root/generic/viaduct
diff options
context:
space:
mode:
Diffstat (limited to 'generic/viaduct')
-rw-r--r--generic/viaduct/fabulous/constids.inc2
-rw-r--r--generic/viaduct/fabulous/fabulous.cc14
2 files changed, 14 insertions, 2 deletions
diff --git a/generic/viaduct/fabulous/constids.inc b/generic/viaduct/fabulous/constids.inc
index 861eedf2..69b2e4f9 100644
--- a/generic/viaduct/fabulous/constids.inc
+++ b/generic/viaduct/fabulous/constids.inc
@@ -11,6 +11,8 @@ X(LATCH_NOFF)
X(IO_1_bidirectional_frame_config_pass)
X(InPass4_frame_config)
X(OutPass4_frame_config)
+X(InPass4_frame_config_mux)
+X(OutPass4_frame_config_mux)
X(RegFile_32x4)
X(MULADD)
X(MUX8LUT_frame_config)
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('.');