projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d9d22f
)
Add $lut support to Verilog back-end
author
Clifford Wolf
<clifford@clifford.at>
Wed, 5 Sep 2018 22:18:01 +0000
(
00:18
+0200)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 5 Sep 2018 22:18:01 +0000
(
00:18
+0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
backends/verilog/verilog_backend.cc
patch
|
blob
|
history
diff --git
a/backends/verilog/verilog_backend.cc
b/backends/verilog/verilog_backend.cc
index 44e4e5f9783ba3c56ed331788878a9b0e59fb608..d3262ec47c23af420925ae0c713882b125fba1e3 100644
(file)
--- 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");