nexus: Larger DSP tweaks

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-11-17 15:13:00 +00:00
parent 6b5277638b
commit 54539b8519
2 changed files with 15 additions and 9 deletions

View File

@ -526,11 +526,17 @@ struct NexusFasmWriter
{ {
BelId bel = cell->bel; BelId bel = cell->bel;
push_bel(bel); push_bel(bel);
if (cell->type != id_MULT18_CORE && cell->type != id_MULT18X36_CORE && cell->type != id_MULT36_CORE)
write_bit(stringf("MODE.%s", ctx->nameOf(cell->type))); write_bit(stringf("MODE.%s", ctx->nameOf(cell->type)));
for (auto param : sorted_cref(cell->params)) { for (auto param : sorted_cref(cell->params)) {
const std::string &param_name = param.first.str(ctx); const std::string &param_name = param.first.str(ctx);
if (is_mux_param(param_name)) if (is_mux_param(param_name))
continue; continue;
if (param.first == id_ROUNDBIT) {
// currently unsupported in oxide, but appears rarely used
NPNR_ASSERT(param.second.as_string() == "ROUND_TO_BIT0");
continue;
}
write_enum(cell, param_name); write_enum(cell, param_name);
} }
write_cell_muxes(cell); write_cell_muxes(cell);

View File

@ -128,19 +128,19 @@ static const std::unordered_map<IdString, Arch::CellPinsData> base_cell_pin_data
}}, }},
{id_MULT18_CORE, {id_MULT18_CORE,
{ {
{id_SFTCTRL0, PINSTYLE_CIB}, {id_SFTCTRL0, PINSTYLE_PU},
{id_SFTCTRL1, PINSTYLE_CIB}, {id_SFTCTRL1, PINSTYLE_PU},
{id_SFTCTRL2, PINSTYLE_CIB}, {id_SFTCTRL2, PINSTYLE_PU},
{id_SFTCTRL3, PINSTYLE_CIB}, {id_SFTCTRL3, PINSTYLE_PU},
{id_ROUNDEN, PINSTYLE_CIB}, {id_ROUNDEN, PINSTYLE_CIB},
{{}, PINSTYLE_DEDI}, {{}, PINSTYLE_DEDI},
}}, }},
{id_MULT18X36_CORE, {id_MULT18X36_CORE,
{ {
{id_SFTCTRL0, PINSTYLE_CIB}, {id_SFTCTRL0, PINSTYLE_PU},
{id_SFTCTRL1, PINSTYLE_CIB}, {id_SFTCTRL1, PINSTYLE_PU},
{id_SFTCTRL2, PINSTYLE_CIB}, {id_SFTCTRL2, PINSTYLE_PU},
{id_SFTCTRL3, PINSTYLE_CIB}, {id_SFTCTRL3, PINSTYLE_PU},
{id_ROUNDEN, PINSTYLE_CIB}, {id_ROUNDEN, PINSTYLE_CIB},
{{}, PINSTYLE_DEDI}, {{}, PINSTYLE_DEDI},
}}}; }}};