aboutsummaryrefslogtreecommitdiffstats
path: root/passes/memory/memory_collect.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-26 16:00:30 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-26 16:00:30 +0200
commita84cb0493566f8f5eb610c6d7b67dda85b0f227b (patch)
treee4b1c2f97db2c317f8b986635141dfd7bb8e78d8 /passes/memory/memory_collect.cc
parentcd6574ecf652901573cbc6b89e1a59dd383ec496 (diff)
parentf8fdc47d3361c1a3445a9357ca26cfe75907d6b0 (diff)
downloadyosys-a84cb0493566f8f5eb610c6d7b67dda85b0f227b.tar.gz
yosys-a84cb0493566f8f5eb610c6d7b67dda85b0f227b.tar.bz2
yosys-a84cb0493566f8f5eb610c6d7b67dda85b0f227b.zip
Merge automatic and manual code changes for new cell connections API
Diffstat (limited to 'passes/memory/memory_collect.cc')
-rw-r--r--passes/memory/memory_collect.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/passes/memory/memory_collect.cc b/passes/memory/memory_collect.cc
index b4242f250..a8caf883f 100644
--- a/passes/memory/memory_collect.cc
+++ b/passes/memory/memory_collect.cc
@@ -76,12 +76,12 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Memory *memory)
wr_ports++;
del_cells.push_back(cell);
- RTLIL::SigSpec clk = cell->connections_["\\CLK"];
+ RTLIL::SigSpec clk = cell->get("\\CLK");
RTLIL::SigSpec clk_enable = RTLIL::SigSpec(cell->parameters["\\CLK_ENABLE"]);
RTLIL::SigSpec clk_polarity = RTLIL::SigSpec(cell->parameters["\\CLK_POLARITY"]);
- RTLIL::SigSpec addr = cell->connections_["\\ADDR"];
- RTLIL::SigSpec data = cell->connections_["\\DATA"];
- RTLIL::SigSpec en = cell->connections_["\\EN"];
+ RTLIL::SigSpec addr = cell->get("\\ADDR");
+ RTLIL::SigSpec data = cell->get("\\DATA");
+ RTLIL::SigSpec en = cell->get("\\EN");
clk.extend(1, false);
clk_enable.extend(1, false);
@@ -103,12 +103,12 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Memory *memory)
rd_ports++;
del_cells.push_back(cell);
- RTLIL::SigSpec clk = cell->connections_["\\CLK"];
+ RTLIL::SigSpec clk = cell->get("\\CLK");
RTLIL::SigSpec clk_enable = RTLIL::SigSpec(cell->parameters["\\CLK_ENABLE"]);
RTLIL::SigSpec clk_polarity = RTLIL::SigSpec(cell->parameters["\\CLK_POLARITY"]);
RTLIL::SigSpec transparent = RTLIL::SigSpec(cell->parameters["\\TRANSPARENT"]);
- RTLIL::SigSpec addr = cell->connections_["\\ADDR"];
- RTLIL::SigSpec data = cell->connections_["\\DATA"];
+ RTLIL::SigSpec addr = cell->get("\\ADDR");
+ RTLIL::SigSpec data = cell->get("\\DATA");
clk.extend(1, false);
clk_enable.extend(1, false);
@@ -147,10 +147,10 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Memory *memory)
mem->parameters["\\WR_CLK_ENABLE"] = wr_ports ? sig_wr_clk_enable.as_const() : RTLIL::Const(0, 0);
mem->parameters["\\WR_CLK_POLARITY"] = wr_ports ? sig_wr_clk_polarity.as_const() : RTLIL::Const(0, 0);
- mem->connections_["\\WR_CLK"] = sig_wr_clk;
- mem->connections_["\\WR_ADDR"] = sig_wr_addr;
- mem->connections_["\\WR_DATA"] = sig_wr_data;
- mem->connections_["\\WR_EN"] = sig_wr_en;
+ mem->set("\\WR_CLK", sig_wr_clk);
+ mem->set("\\WR_ADDR", sig_wr_addr);
+ mem->set("\\WR_DATA", sig_wr_data);
+ mem->set("\\WR_EN", sig_wr_en);
assert(sig_rd_clk.size() == rd_ports);
assert(sig_rd_clk_enable.size() == rd_ports && sig_rd_clk_enable.is_fully_const());
@@ -163,9 +163,9 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Memory *memory)
mem->parameters["\\RD_CLK_POLARITY"] = rd_ports ? sig_rd_clk_polarity.as_const() : RTLIL::Const(0, 0);
mem->parameters["\\RD_TRANSPARENT"] = rd_ports ? sig_rd_transparent.as_const() : RTLIL::Const(0, 0);
- mem->connections_["\\RD_CLK"] = sig_rd_clk;
- mem->connections_["\\RD_ADDR"] = sig_rd_addr;
- mem->connections_["\\RD_DATA"] = sig_rd_data;
+ mem->set("\\RD_CLK", sig_rd_clk);
+ mem->set("\\RD_ADDR", sig_rd_addr);
+ mem->set("\\RD_DATA", sig_rd_data);
for (auto c : del_cells)
module->remove(c);