From 5e53a182921dad0e128186a1fe8766062c7cae61 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 27 Dec 2020 20:14:49 +0000 Subject: ecp5: Improve pseudo-diff IO error handling Signed-off-by: David Shah --- ecp5/bitstream.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ecp5') diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc index 9fb823ab..c6863cd6 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -867,8 +867,10 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex if (is_differential(ioType_from_str(iotype))) { if (bel.location.y == 0) { // Pseudo differential top IO - NPNR_ASSERT(dir == "OUTPUT"); - NPNR_ASSERT(pio == "PIOA"); + if (dir != "OUTPUT") + log_error("Pseudo-differential IO '%s' must be output\n", ctx->nameOf(ci)); + if (pio != "PIOA") + log_error("Pseudo-differential IO '%s' must be constrained to 'A' side of pair\n", ctx->nameOf(ci)); std::string cpio_tile = get_comp_pio_tile(ctx, bel); std::string cpic_tile = get_comp_pic_tile(ctx, bel); cc.tiles[cpio_tile].add_enum(pio + ".BASE_TYPE", dir + "_" + iotype); -- cgit v1.2.3