diff options
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/main.cc | 6 | ||||
| -rw-r--r-- | generic/pack.cc | 4 | 
2 files changed, 9 insertions, 1 deletions
| diff --git a/generic/main.cc b/generic/main.cc index 7dfc6aa7..bb780996 100644 --- a/generic/main.cc +++ b/generic/main.cc @@ -46,6 +46,7 @@ po::options_description GenericCommandHandler::getArchOptions()  {      po::options_description specific("Architecture specific options");      specific.add_options()("generic", "set device type to generic"); +    specific.add_options()("no-iobs", "disable automatic IO buffer insertion");      return specific;  } @@ -59,7 +60,10 @@ std::unique_ptr<Context> GenericCommandHandler::createContext(std::unordered_map          if (arch_name != "generic")              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[]) diff --git a/generic/pack.cc b/generic/pack.cc index 69f248d2..19266aba 100644 --- a/generic/pack.cc +++ b/generic/pack.cc @@ -249,6 +249,10 @@ static void pack_io(Context *ctx)                          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 {                  // Create a GENERIC_IOB buffer                  std::unique_ptr<CellInfo> ice_cell = | 
