aboutsummaryrefslogtreecommitdiffstats
path: root/backends/firrtl
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-06 16:42:25 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-06 16:42:25 -0700
commite38f40af5b7cdd5c8b896ffba17069bd65f01f29 (patch)
treeec5f7fa67819eb54a7318b1e7e005303905bf694 /backends/firrtl
parenta6bc9265fbb2abad73120a068a09f0c7833304de (diff)
downloadyosys-e38f40af5b7cdd5c8b896ffba17069bd65f01f29.tar.gz
yosys-e38f40af5b7cdd5c8b896ffba17069bd65f01f29.tar.bz2
yosys-e38f40af5b7cdd5c8b896ffba17069bd65f01f29.zip
Use IdString::begins_with()
Diffstat (limited to 'backends/firrtl')
-rw-r--r--backends/firrtl/firrtl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/firrtl/firrtl.cc b/backends/firrtl/firrtl.cc
index 4758c6d4d..bb5ea2932 100644
--- a/backends/firrtl/firrtl.cc
+++ b/backends/firrtl/firrtl.cc
@@ -297,7 +297,7 @@ struct FirrtlWorker
std::string cell_type = fid(cell->type);
std::string instanceOf;
// If this is a parameterized module, its parent module is encoded in the cell type
- if (cell->type.substr(0, 8) == "$paramod")
+ if (cell->type.begins_with("$paramod"))
{
std::string::iterator it;
for (it = cell_type.begin(); it < cell_type.end(); it++)
@@ -776,7 +776,7 @@ struct FirrtlWorker
}
// This may be a parameterized module - paramod.
- if (cell->type.substr(0, 8) == "$paramod")
+ if (cell->type.begins_with("$paramod"))
{
process_instance(cell, wire_exprs);
continue;