From: Clifford Wolf Date: Wed, 5 Sep 2018 22:18:01 +0000 (+0200) Subject: Add $lut support to Verilog back-end X-Git-Tag: yosys-0.8~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12440fcc8f705c117b5f91fae24b7e5c4fbf8560;p=yosys.git Add $lut support to Verilog back-end Signed-off-by: Clifford Wolf --- diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc index 44e4e5f97..d3262ec47 100644 --- a/backends/verilog/verilog_backend.cc +++ b/backends/verilog/verilog_backend.cc @@ -779,6 +779,19 @@ bool dump_cell_expr(std::ostream &f, std::string indent, RTLIL::Cell *cell) 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") { SigSpec sig_clk = cell->getPort("\\CLK");