aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2/pack.cc
diff options
context:
space:
mode:
authorWilliam D. Jones <thor0505@comcast.net>2020-12-04 18:19:31 -0500
committergatecat <gatecat@ds0.me>2021-02-12 10:36:59 +0000
commita3a3a91b72942bf857e8c6ef14a211f06dfe4f2b (patch)
treedf5ee229850f947e86e978e68d8c6b28448303f5 /machxo2/pack.cc
parentc5292e0db50b0aeceefa8f14282d5ddf6b6f6678 (diff)
downloadnextpnr-a3a3a91b72942bf857e8c6ef14a211f06dfe4f2b.tar.gz
nextpnr-a3a3a91b72942bf857e8c6ef14a211f06dfe4f2b.tar.bz2
nextpnr-a3a3a91b72942bf857e8c6ef14a211f06dfe4f2b.zip
machxo2: Clean up packing pass a bit.
Diffstat (limited to 'machxo2/pack.cc')
-rw-r--r--machxo2/pack.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/machxo2/pack.cc b/machxo2/pack.cc
index 76fd7240..695d8e95 100644
--- a/machxo2/pack.cc
+++ b/machxo2/pack.cc
@@ -40,7 +40,7 @@ static void pack_lut_lutffs(Context *ctx)
log_info("cell '%s' is of type '%s'\n", ci->name.c_str(ctx), ci->type.c_str(ctx));
if (is_lut(ctx, ci)) {
std::unique_ptr<CellInfo> packed =
- create_machxo2_cell(ctx, ctx->id("FACADE_SLICE"), ci->name.str(ctx) + "_LC");
+ create_machxo2_cell(ctx, id_FACADE_SLICE, ci->name.str(ctx) + "_LC");
std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(packed->attrs, packed->attrs.begin()));
packed_cells.insert(ci->name);
@@ -49,8 +49,8 @@ static void pack_lut_lutffs(Context *ctx)
// See if we can pack into a DFF. Both LUT4 and FF outputs are
// available for a given slice, so we can pack a FF even if the
// LUT4 drives more than one FF.
- NetInfo *o = ci->ports.at(ctx->id("Z")).net;
- CellInfo *dff = net_only_drives(ctx, o, is_ff, ctx->id("DI"), false);
+ NetInfo *o = ci->ports.at(id_Z).net;
+ CellInfo *dff = net_only_drives(ctx, o, is_ff, id_DI, false);
auto lut_bel = ci->attrs.find(ctx->id("BEL"));
bool packed_dff = false;
@@ -160,7 +160,7 @@ static bool is_nextpnr_iob(Context *ctx, CellInfo *cell)
cell->type == ctx->id("$nextpnr_iobuf");
}
-static bool is_facade_iob(const Context *ctx, const CellInfo *cell) { return cell->type == ctx->id("FACADE_IO"); }
+static bool is_facade_iob(const Context *ctx, const CellInfo *cell) { return cell->type == id_FACADE_IO; }
// Pack IO buffers- Right now, all this does is remove $nextpnr_[io]buf cells.
// User is expected to manually instantiate FACADE_IO with BEL/IO_TYPE
@@ -189,7 +189,6 @@ static void pack_io(Context *ctx)
bool Arch::pack()
{
Context *ctx = getCtx();
- log_info("Packing implementation goes here..");
try {
log_break();
pack_constants(ctx);