diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2020-11-25 17:43:28 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2020-11-25 17:43:28 +0100 |
commit | addc493e8d7f64267661af3bf7fbaf265e2b17ba (patch) | |
tree | 6eb04bf55fea7f68af8fef8c7803d41ba31f3d9b /backends | |
parent | cf67e6a3977410e039d62a1e9f6c49c42cb97b08 (diff) | |
download | yosys-addc493e8d7f64267661af3bf7fbaf265e2b17ba.tar.gz yosys-addc493e8d7f64267661af3bf7fbaf265e2b17ba.tar.bz2 yosys-addc493e8d7f64267661af3bf7fbaf265e2b17ba.zip |
generate only simple assignments in verilog backend
Diffstat (limited to 'backends')
-rw-r--r-- | backends/verilog/verilog_backend.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc index 9523f4a52..f8b5b0e3e 100644 --- a/backends/verilog/verilog_backend.cc +++ b/backends/verilog/verilog_backend.cc @@ -1546,11 +1546,15 @@ void dump_cell(std::ostream &f, std::string indent, RTLIL::Cell *cell) void dump_conn(std::ostream &f, std::string indent, const RTLIL::SigSpec &left, const RTLIL::SigSpec &right) { - f << stringf("%s" "assign ", indent.c_str()); - dump_sigspec(f, left); - f << stringf(" = "); - dump_sigspec(f, right); - f << stringf(";\n"); + int offset = 0; + for (auto &chunk : left.chunks()) { + f << stringf("%s" "assign ", indent.c_str()); + dump_sigspec(f, chunk); + f << stringf(" = "); + dump_sigspec(f, right.extract(offset, GetSize(chunk))); + f << stringf(";\n"); + offset += GetSize(chunk); + } } void dump_proc_switch(std::ostream &f, std::string indent, RTLIL::SwitchRule *sw); |