ecp5: Improve pseudo-diff IO error handling

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-12-27 20:14:49 +00:00
parent 74c4fa6751
commit 5e53a18292
1 changed files with 4 additions and 2 deletions

View File

@ -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);