generic: Add support for disabling IOB insertion
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
2957eb7cc9
commit
2b3dda7535
@ -46,6 +46,7 @@ po::options_description GenericCommandHandler::getArchOptions()
|
|||||||
{
|
{
|
||||||
po::options_description specific("Architecture specific options");
|
po::options_description specific("Architecture specific options");
|
||||||
specific.add_options()("generic", "set device type to generic");
|
specific.add_options()("generic", "set device type to generic");
|
||||||
|
specific.add_options()("no-iobs", "disable automatic IO buffer insertion");
|
||||||
return specific;
|
return specific;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +60,10 @@ std::unique_ptr<Context> GenericCommandHandler::createContext(std::unordered_map
|
|||||||
if (arch_name != "generic")
|
if (arch_name != "generic")
|
||||||
log_error("Unsuported architecture '%s'.\n", arch_name.c_str());
|
log_error("Unsuported architecture '%s'.\n", arch_name.c_str());
|
||||||
}
|
}
|
||||||
return std::unique_ptr<Context>(new Context(chipArgs));
|
auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||||
|
if (vm.count("no-iobs"))
|
||||||
|
ctx->settings[ctx->id("disable_iobs")] = Property::State::S1;
|
||||||
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -249,6 +249,10 @@ static void pack_io(Context *ctx)
|
|||||||
delete_nets.insert(net2->name);
|
delete_nets.insert(net2->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (bool_or_default(ctx->settings, ctx->id("disable_iobs"))) {
|
||||||
|
// No IO buffer insertion; just remove nextpnr_[io]buf
|
||||||
|
for (auto &p : ci->ports)
|
||||||
|
disconnect_port(ctx, ci, p.first);
|
||||||
} else {
|
} else {
|
||||||
// Create a GENERIC_IOB buffer
|
// Create a GENERIC_IOB buffer
|
||||||
std::unique_ptr<CellInfo> ice_cell =
|
std::unique_ptr<CellInfo> ice_cell =
|
||||||
|
Loading…
Reference in New Issue
Block a user