Add $lut support to Verilog back-end

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-09-06 00:18:01 +02:00
parent 5d9d22f66d
commit 12440fcc8f
1 changed files with 13 additions and 0 deletions

View File

@ -779,6 +779,19 @@ bool dump_cell_expr(std::ostream &f, std::string indent, RTLIL::Cell *cell)
return true; return true;
} }
if (cell->type == "$lut")
{
f << stringf("%s" "assign ", indent.c_str());
dump_sigspec(f, cell->getPort("\\Y"));
f << stringf(" = ");
dump_const(f, cell->parameters.at("\\LUT"));
f << stringf(" >> ");
dump_attributes(f, "", cell->attributes, ' ');
dump_sigspec(f, cell->getPort("\\A"));
f << stringf(";\n");
return true;
}
if (cell->type == "$dffsr") if (cell->type == "$dffsr")
{ {
SigSpec sig_clk = cell->getPort("\\CLK"); SigSpec sig_clk = cell->getPort("\\CLK");