From e76479f379e4ba15b8f788cfb171c0de10feb076 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 22 Dec 2018 10:11:18 +0000 Subject: ecp5: Fix tristate IO insertion Fixes #191 Signed-off-by: David Shah --- ecp5/cells.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecp5/cells.cc b/ecp5/cells.cc index 58d4797c..a8e92083 100644 --- a/ecp5/cells.cc +++ b/ecp5/cells.cc @@ -416,7 +416,7 @@ void nxio_to_tr(Context *ctx, CellInfo *nxio, CellInfo *trio, std::vectortype == ctx->id("$_TBUF_"); }, ctx->id("Y")); if (tbuf) { - replace_port(tbuf, ctx->id("I"), trio, ctx->id("I")); + replace_port(tbuf, ctx->id("A"), trio, ctx->id("I")); // Need to invert E to form T std::unique_ptr inv_lut = create_ecp5_cell(ctx, ctx->id("LUT4"), trio->name.str(ctx) + "$invert_T"); replace_port(tbuf, ctx->id("E"), inv_lut.get(), ctx->id("A")); -- cgit v1.2.3