aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/tribuf.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-15 10:05:08 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-15 10:05:08 -0700
commit9f98241010481588d643c6d4e24d7b9af2b37c2f (patch)
tree234a3d4424286615e8afa2ebba8d693ba2773489 /passes/techmap/tribuf.cc
parent4cfefae21e872bb5a4dc13473316352da2b7a916 (diff)
downloadyosys-9f98241010481588d643c6d4e24d7b9af2b37c2f.tar.gz
yosys-9f98241010481588d643c6d4e24d7b9af2b37c2f.tar.bz2
yosys-9f98241010481588d643c6d4e24d7b9af2b37c2f.zip
Transform "$.*" to ID("$.*") in passes/techmap
Diffstat (limited to 'passes/techmap/tribuf.cc')
-rw-r--r--passes/techmap/tribuf.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/passes/techmap/tribuf.cc b/passes/techmap/tribuf.cc
index 587cb9038..9e759fb33 100644
--- a/passes/techmap/tribuf.cc
+++ b/passes/techmap/tribuf.cc
@@ -63,16 +63,16 @@ struct TribufWorker {
for (auto cell : module->selected_cells())
{
- if (cell->type == "$tribuf")
+ if (cell->type == ID($tribuf))
tribuf_cells[sigmap(cell->getPort("\\Y"))].push_back(cell);
- if (cell->type == "$_TBUF_")
+ if (cell->type == ID($_TBUF_))
tribuf_cells[sigmap(cell->getPort("\\Y"))].push_back(cell);
- if (cell->type.in("$mux", "$_MUX_"))
+ if (cell->type.in(ID($mux), ID($_MUX_)))
{
- IdString en_port = cell->type == "$mux" ? "\\EN" : "\\E";
- IdString tri_type = cell->type == "$mux" ? "$tribuf" : "$_TBUF_";
+ IdString en_port = cell->type == ID($mux) ? "\\EN" : "\\E";
+ IdString tri_type = cell->type == ID($mux) ? ID($tribuf) : ID($_TBUF_);
if (is_all_z(cell->getPort("\\A")) && is_all_z(cell->getPort("\\B"))) {
module->remove(cell);
@@ -118,7 +118,7 @@ struct TribufWorker {
SigSpec pmux_b, pmux_s;
for (auto cell : it.second) {
- if (cell->type == "$tribuf")
+ if (cell->type == ID($tribuf))
pmux_s.append(cell->getPort("\\EN"));
else
pmux_s.append(cell->getPort("\\E"));