Fix DRC errors

This commit is contained in:
Eddie Hung 2018-08-21 22:58:20 -07:00
parent 3a177c72c6
commit 82fbc551f8

View File

@ -136,7 +136,7 @@ void write_xdl(const Context *ctx, std::ostream &out)
auto O = get_net_or_empty(cell.second.get(), id_O); auto O = get_net_or_empty(cell.second.get(), id_O);
if (O) { if (O) {
setting = lut; setting = lut;
setting += name; setting += "USED";
instPtr->setConfig(setting, "", "0"); instPtr->setConfig(setting, "", "0");
} }
@ -149,6 +149,14 @@ void write_xdl(const Context *ctx, std::ostream &out)
instPtr->setConfig(setting, name, "#FF"); instPtr->setConfig(setting, name, "#FF");
instPtr->setConfig(setting + "MUX", "", "O6"); instPtr->setConfig(setting + "MUX", "", "O6");
instPtr->setConfig(setting + "INIT", "", "INIT" + cell.second->params.at(ctx->id("DFF_INIT"))); instPtr->setConfig(setting + "INIT", "", "INIT" + cell.second->params.at(ctx->id("DFF_INIT")));
assert(cell.second->params.at(ctx->id("SET_NORESET")) == "0"); // TODO
instPtr->setConfig(setting + "SR", "", "SRLOW");
NPNR_ASSERT(!cell.second->lcInfo.negClk); // TODO
instPtr->setConfig("CLKINV", "", "CLK");
instPtr->setConfig("SRUSEDMUX", "", "IN");
instPtr->setConfig("CEUSEDMUX", "", "IN");
} }
} }
else if (cell.second->type == id_IOB33) { else if (cell.second->type == id_IOB33) {