aboutsummaryrefslogtreecommitdiffstats
path: root/backends/verilog
diff options
context:
space:
mode:
authorAman Goel <amangoel@umich.edu>2018-10-01 09:09:40 -0400
committerGitHub <noreply@github.com>2018-10-01 09:09:40 -0400
commit33cb5e05be4fea9e09e1686a29a1f194a44c0e8a (patch)
tree8cf91fe789d3f1aec1eac277e594f8e7998b4e4a /backends/verilog
parent75c1f8d241d67ebb6db56516b4f9fdb0a312aa0b (diff)
parent4d2917447cc14c590b4fee5ba36948fb4ee6884b (diff)
downloadyosys-33cb5e05be4fea9e09e1686a29a1f194a44c0e8a.tar.gz
yosys-33cb5e05be4fea9e09e1686a29a1f194a44c0e8a.tar.bz2
yosys-33cb5e05be4fea9e09e1686a29a1f194a44c0e8a.zip
Merge pull request #4 from YosysHQ/master
Merge with official repo
Diffstat (limited to 'backends/verilog')
-rw-r--r--backends/verilog/verilog_backend.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc
index 44e4e5f97..ae9031510 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");
@@ -1510,7 +1523,7 @@ struct VerilogBackend : public Backend {
log("\n");
log(" -nodec\n");
log(" 32-bit constant values are by default dumped as decimal numbers,\n");
- log(" not bit pattern. This option decativates this feature and instead\n");
+ log(" not bit pattern. This option deactivates this feature and instead\n");
log(" will write out all constants in binary.\n");
log("\n");
log(" -decimal\n");
@@ -1518,13 +1531,13 @@ struct VerilogBackend : public Backend {
log("\n");
log(" -nohex\n");
log(" constant values that are compatible with hex output are usually\n");
- log(" dumped as hex values. This option decativates this feature and\n");
+ log(" dumped as hex values. This option deactivates this feature and\n");
log(" instead will write out all constants in binary.\n");
log("\n");
log(" -nostr\n");
log(" Parameters and attributes that are specified as strings in the\n");
log(" original input will be output as strings by this back-end. This\n");
- log(" decativates this feature and instead will write string constants\n");
+ log(" deactivates this feature and instead will write string constants\n");
log(" as binary numbers.\n");
log("\n");
log(" -defparam\n");