aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap
diff options
context:
space:
mode:
Diffstat (limited to 'passes/techmap')
-rw-r--r--passes/techmap/abc.cc14
-rw-r--r--passes/techmap/abc9.cc12
-rw-r--r--passes/techmap/dff2dffe.cc2
-rw-r--r--passes/techmap/extract.cc10
-rw-r--r--passes/techmap/extract_counter.cc2
-rw-r--r--passes/techmap/extract_fa.cc4
-rw-r--r--passes/techmap/flowmap.cc12
-rw-r--r--passes/techmap/muxcover.cc10
-rw-r--r--passes/techmap/nlutmap.cc2
-rw-r--r--passes/techmap/shregmap.cc8
-rw-r--r--passes/techmap/techmap.cc2
11 files changed, 39 insertions, 39 deletions
diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc
index 5509c8c12..76634cb31 100644
--- a/passes/techmap/abc.cc
+++ b/passes/techmap/abc.cc
@@ -343,7 +343,7 @@ std::string remap_name(RTLIL::IdString abc_name, RTLIL::Wire **orig_wire = nullp
abc_sname.erase(0, 5);
if (std::isdigit(abc_sname.at(0)))
{
- int sid = std::stoi(abc_sname);
+ int sid = std::atoi(abc_sname.c_str());
size_t postfix_start = abc_sname.find_first_not_of("0123456789");
std::string postfix = postfix_start != std::string::npos ? abc_sname.substr(postfix_start) : "";
@@ -1564,10 +1564,10 @@ struct AbcPass : public Pass {
size_t pos = arg.find_first_of(':');
int lut_mode = 0, lut_mode2 = 0;
if (pos != string::npos) {
- lut_mode = std::stoi(arg.substr(0, pos));
- lut_mode2 = std::stoi(arg.substr(pos+1));
+ lut_mode = std::atoi(arg.substr(0, pos).c_str());
+ lut_mode2 = std::atoi(arg.substr(pos+1).c_str());
} else {
- lut_mode = std::stoi(arg);
+ lut_mode = std::atoi(arg.c_str());
lut_mode2 = lut_mode;
}
lut_costs.clear();
@@ -1584,10 +1584,10 @@ struct AbcPass : public Pass {
if (GetSize(parts) == 0 && !lut_costs.empty())
lut_costs.push_back(lut_costs.back());
else if (GetSize(parts) == 1)
- lut_costs.push_back(std::stoi(parts.at(0)));
+ lut_costs.push_back(atoi(parts.at(0).c_str()));
else if (GetSize(parts) == 2)
- while (GetSize(lut_costs) < std::stoi(parts.at(0)))
- lut_costs.push_back(std::stoi(parts.at(1)));
+ while (GetSize(lut_costs) < std::atoi(parts.at(0).c_str()))
+ lut_costs.push_back(atoi(parts.at(1).c_str()));
else
log_cmd_error("Invalid -luts syntax.\n");
}
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc
index 36e3b4e65..34919cf07 100644
--- a/passes/techmap/abc9.cc
+++ b/passes/techmap/abc9.cc
@@ -999,8 +999,8 @@ struct Abc9Pass : public Pass {
size_t pos = arg.find_first_of(':');
int lut_mode = 0, lut_mode2 = 0;
if (pos != string::npos) {
- lut_mode = std::stoi(arg.substr(0, pos));
- lut_mode2 = std::stoi(arg.substr(pos+1));
+ lut_mode = atoi(arg.substr(0, pos).c_str());
+ lut_mode2 = atoi(arg.substr(pos+1).c_str());
} else {
pos = arg.find_first_of('.');
if (pos != string::npos) {
@@ -1010,7 +1010,7 @@ struct Abc9Pass : public Pass {
lut_file = std::string(pwd) + "/" + lut_file;
}
else {
- lut_mode = std::stoi(arg);
+ lut_mode = atoi(arg.c_str());
lut_mode2 = lut_mode;
}
}
@@ -1028,10 +1028,10 @@ struct Abc9Pass : public Pass {
if (GetSize(parts) == 0 && !lut_costs.empty())
lut_costs.push_back(lut_costs.back());
else if (GetSize(parts) == 1)
- lut_costs.push_back(std::stoi(parts.at(0)));
+ lut_costs.push_back(atoi(parts.at(0).c_str()));
else if (GetSize(parts) == 2)
- while (GetSize(lut_costs) < std::stoi(parts.at(0)))
- lut_costs.push_back(std::stoi(parts.at(1)));
+ while (GetSize(lut_costs) < atoi(parts.at(0).c_str()))
+ lut_costs.push_back(atoi(parts.at(1).c_str()));
else
log_cmd_error("Invalid -luts syntax.\n");
}
diff --git a/passes/techmap/dff2dffe.cc b/passes/techmap/dff2dffe.cc
index 44bc14628..8e947b4dc 100644
--- a/passes/techmap/dff2dffe.cc
+++ b/passes/techmap/dff2dffe.cc
@@ -304,7 +304,7 @@ struct Dff2dffePass : public Pass {
}
if (args[argidx] == "-unmap-mince" && argidx + 1 < args.size()) {
unmap_mode = true;
- min_ce_use = std::stoi(args[++argidx]);
+ min_ce_use = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-direct" && argidx + 2 < args.size()) {
diff --git a/passes/techmap/extract.cc b/passes/techmap/extract.cc
index cf9743806..fff90f13c 100644
--- a/passes/techmap/extract.cc
+++ b/passes/techmap/extract.cc
@@ -476,16 +476,16 @@ struct ExtractPass : public Pass {
continue;
}
if (args[argidx] == "-mine_cells_span" && argidx+2 < args.size()) {
- mine_cells_min = std::stoi(args[++argidx]);
- mine_cells_max = std::stoi(args[++argidx]);
+ mine_cells_min = atoi(args[++argidx].c_str());
+ mine_cells_max = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-mine_min_freq" && argidx+1 < args.size()) {
- mine_min_freq = std::stoi(args[++argidx]);
+ mine_min_freq = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-mine_limit_matches_per_module" && argidx+1 < args.size()) {
- mine_limit_mod = std::stoi(args[++argidx]);
+ mine_limit_mod = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-mine_split" && argidx+2 < args.size()) {
@@ -494,7 +494,7 @@ struct ExtractPass : public Pass {
continue;
}
if (args[argidx] == "-mine_max_fanout" && argidx+1 < args.size()) {
- mine_max_fanout = std::stoi(args[++argidx]);
+ mine_max_fanout = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-verbose") {
diff --git a/passes/techmap/extract_counter.cc b/passes/techmap/extract_counter.cc
index da56e087b..a8d0bc834 100644
--- a/passes/techmap/extract_counter.cc
+++ b/passes/techmap/extract_counter.cc
@@ -613,7 +613,7 @@ struct ExtractCounterPass : public Pass {
if (args[argidx] == "-maxwidth" && argidx+1 < args.size())
{
- maxwidth = std::stoi(args[++argidx]);
+ maxwidth = atoi(args[++argidx].c_str());
continue;
}
}
diff --git a/passes/techmap/extract_fa.cc b/passes/techmap/extract_fa.cc
index 0b5b6a111..b541ceb6b 100644
--- a/passes/techmap/extract_fa.cc
+++ b/passes/techmap/extract_fa.cc
@@ -580,11 +580,11 @@ struct ExtractFaPass : public Pass {
continue;
}
if (args[argidx] == "-d" && argidx+2 < args.size()) {
- config.maxdepth = std::stoi(args[++argidx]);
+ config.maxdepth = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-b" && argidx+2 < args.size()) {
- config.maxbreadth = std::stoi(args[++argidx]);
+ config.maxbreadth = atoi(args[++argidx].c_str());
continue;
}
break;
diff --git a/passes/techmap/flowmap.cc b/passes/techmap/flowmap.cc
index 3e66fcacc..96d0df5f8 100644
--- a/passes/techmap/flowmap.cc
+++ b/passes/techmap/flowmap.cc
@@ -1525,12 +1525,12 @@ struct FlowmapPass : public Pass {
{
if (args[argidx] == "-maxlut" && argidx + 1 < args.size())
{
- order = std::stoi(args[++argidx]);
+ order = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-minlut" && argidx + 1 < args.size())
{
- minlut = std::stoi(args[++argidx]);
+ minlut = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-cells" && argidx + 1 < args.size())
@@ -1545,23 +1545,23 @@ struct FlowmapPass : public Pass {
}
if (args[argidx] == "-r-alpha" && argidx + 1 < args.size())
{
- r_alpha = std::stoi(args[++argidx]);
+ r_alpha = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-r-beta" && argidx + 1 < args.size())
{
- r_beta = std::stoi(args[++argidx]);
+ r_beta = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-r-gamma" && argidx + 1 < args.size())
{
- r_gamma = std::stoi(args[++argidx]);
+ r_gamma = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-optarea" && argidx + 1 < args.size())
{
relax = true;
- optarea = std::stoi(args[++argidx]);
+ optarea = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-debug")
diff --git a/passes/techmap/muxcover.cc b/passes/techmap/muxcover.cc
index d53378a29..45987392e 100644
--- a/passes/techmap/muxcover.cc
+++ b/passes/techmap/muxcover.cc
@@ -676,14 +676,14 @@ struct MuxcoverPass : public Pass {
{
const auto &arg = args[argidx];
if (arg.size() >= 6 && arg.substr(0,6) == "-mux2=") {
- cost_mux2 = std::stoi(arg.substr(6));
+ cost_mux2 = atoi(arg.substr(6).c_str());
continue;
}
if (arg.size() >= 5 && arg.substr(0,5) == "-mux4") {
use_mux4 = true;
if (arg.size() > 5) {
if (arg[5] != '=') break;
- cost_mux4 = std::stoi(arg.substr(6));
+ cost_mux4 = atoi(arg.substr(6).c_str());
}
continue;
}
@@ -691,7 +691,7 @@ struct MuxcoverPass : public Pass {
use_mux8 = true;
if (arg.size() > 5) {
if (arg[5] != '=') break;
- cost_mux8 = std::stoi(arg.substr(6));
+ cost_mux8 = atoi(arg.substr(6).c_str());
}
continue;
}
@@ -699,12 +699,12 @@ struct MuxcoverPass : public Pass {
use_mux16 = true;
if (arg.size() > 6) {
if (arg[6] != '=') break;
- cost_mux16 = std::stoi(arg.substr(7));
+ cost_mux16 = atoi(arg.substr(7).c_str());
}
continue;
}
if (arg.size() >= 6 && arg.substr(0,6) == "-dmux=") {
- cost_dmux = std::stoi(arg.substr(6));
+ cost_dmux = atoi(arg.substr(6).c_str());
continue;
}
if (arg == "-nodecode") {
diff --git a/passes/techmap/nlutmap.cc b/passes/techmap/nlutmap.cc
index 9ac39ed05..cc765d89c 100644
--- a/passes/techmap/nlutmap.cc
+++ b/passes/techmap/nlutmap.cc
@@ -163,7 +163,7 @@ struct NlutmapPass : public Pass {
vector<string> tokens = split_tokens(args[++argidx], ",");
config.luts.clear();
for (auto &token : tokens)
- config.luts.push_back(std::stoi(token));
+ config.luts.push_back(atoi(token.c_str()));
continue;
}
if (args[argidx] == "-assert") {
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc
index 06eb7b793..004ab1eb9 100644
--- a/passes/techmap/shregmap.cc
+++ b/passes/techmap/shregmap.cc
@@ -655,19 +655,19 @@ struct ShregmapPass : public Pass {
continue;
}
if (args[argidx] == "-minlen" && argidx+1 < args.size()) {
- opts.minlen = std::stoi(args[++argidx]);
+ opts.minlen = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-maxlen" && argidx+1 < args.size()) {
- opts.maxlen = std::stoi(args[++argidx]);
+ opts.maxlen = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-keep_before" && argidx+1 < args.size()) {
- opts.keep_before = std::stoi(args[++argidx]);
+ opts.keep_before = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-keep_after" && argidx+1 < args.size()) {
- opts.keep_after = std::stoi(args[++argidx]);
+ opts.keep_after = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-tech" && argidx+1 < args.size() && opts.tech == nullptr) {
diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc
index d10420ae8..ceb053825 100644
--- a/passes/techmap/techmap.cc
+++ b/passes/techmap/techmap.cc
@@ -1072,7 +1072,7 @@ struct TechmapPass : public Pass {
continue;
}
if (args[argidx] == "-max_iter" && argidx+1 < args.size()) {
- max_iter = std::stoi(args[++argidx]);
+ max_iter = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-D" && argidx+1 < args.size()) {