mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-02 17:30:24 +00:00
stoi -> atoi
This commit is contained in:
parent
ee7c970367
commit
48d0f99406
41 changed files with 121 additions and 121 deletions
|
@ -816,7 +816,7 @@ struct FreducePass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-stop" && argidx+1 < args.size()) {
|
||||
reduce_stop_at = std::stoi(args[++argidx]);
|
||||
reduce_stop_at = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-dump" && argidx+1 < args.size()) {
|
||||
|
|
|
@ -803,7 +803,7 @@ struct MutatePass : public Pass {
|
|||
for (argidx = 1; argidx < args.size(); argidx++)
|
||||
{
|
||||
if (args[argidx] == "-list" && argidx+1 < args.size()) {
|
||||
N = std::stoi(args[++argidx]);
|
||||
N = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-o" && argidx+1 < args.size()) {
|
||||
|
@ -815,7 +815,7 @@ struct MutatePass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-seed" && argidx+1 < args.size()) {
|
||||
opts.seed = std::stoi(args[++argidx]);
|
||||
opts.seed = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-none") {
|
||||
|
@ -828,8 +828,8 @@ struct MutatePass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-ctrl" && argidx+3 < args.size()) {
|
||||
opts.ctrl_name = RTLIL::escape_id(args[++argidx]);
|
||||
opts.ctrl_width = std::stoi(args[++argidx]);
|
||||
opts.ctrl_value = std::stoi(args[++argidx]);
|
||||
opts.ctrl_width = atoi(args[++argidx].c_str());
|
||||
opts.ctrl_value = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-module" && argidx+1 < args.size()) {
|
||||
|
@ -845,11 +845,11 @@ struct MutatePass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-portbit" && argidx+1 < args.size()) {
|
||||
opts.portbit = std::stoi(args[++argidx]);
|
||||
opts.portbit = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-ctrlbit" && argidx+1 < args.size()) {
|
||||
opts.ctrlbit = std::stoi(args[++argidx]);
|
||||
opts.ctrlbit = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-wire" && argidx+1 < args.size()) {
|
||||
|
@ -857,7 +857,7 @@ struct MutatePass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-wirebit" && argidx+1 < args.size()) {
|
||||
opts.wirebit = std::stoi(args[++argidx]);
|
||||
opts.wirebit = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-src" && argidx+1 < args.size()) {
|
||||
|
@ -866,52 +866,52 @@ struct MutatePass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-cfg" && argidx+2 < args.size()) {
|
||||
if (args[argidx+1] == "pick_cover_prcnt") {
|
||||
opts.pick_cover_prcnt = std::stoi(args[argidx+2]);
|
||||
opts.pick_cover_prcnt = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_cover") {
|
||||
opts.weight_cover = std::stoi(args[argidx+2]);
|
||||
opts.weight_cover = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_w") {
|
||||
opts.weight_pq_w = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_w = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_b") {
|
||||
opts.weight_pq_b = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_b = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_c") {
|
||||
opts.weight_pq_c = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_c = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_s") {
|
||||
opts.weight_pq_s = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_s = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_mw") {
|
||||
opts.weight_pq_mw = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_mw = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_mb") {
|
||||
opts.weight_pq_mb = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_mb = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_mc") {
|
||||
opts.weight_pq_mc = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_mc = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx+1] == "weight_pq_ms") {
|
||||
opts.weight_pq_ms = std::stoi(args[argidx+2]);
|
||||
opts.weight_pq_ms = atoi(args[argidx+2].c_str());
|
||||
argidx += 2;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1102,23 +1102,23 @@ struct SatPass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-timeout" && argidx+1 < args.size()) {
|
||||
timeout = std::stoi(args[++argidx]);
|
||||
timeout = std::atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-max" && argidx+1 < args.size()) {
|
||||
loopcount = std::stoi(args[++argidx]);
|
||||
loopcount = std::atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-maxsteps" && argidx+1 < args.size()) {
|
||||
maxsteps = std::stoi(args[++argidx]);
|
||||
maxsteps = std::atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-initsteps" && argidx+1 < args.size()) {
|
||||
initsteps = std::stoi(args[++argidx]);
|
||||
initsteps = std::atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-stepsize" && argidx+1 < args.size()) {
|
||||
stepsize = max(1, std::stoi(args[++argidx]));
|
||||
stepsize = max(1, std::atoi(args[++argidx].c_str()));
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-ignore_div_by_zero") {
|
||||
|
@ -1185,7 +1185,7 @@ struct SatPass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-tempinduct-skip" && argidx+1 < args.size()) {
|
||||
tempinduct_skip = std::stoi(args[++argidx]);
|
||||
tempinduct_skip = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-prove" && argidx+2 < args.size()) {
|
||||
|
@ -1206,39 +1206,39 @@ struct SatPass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-prove-skip" && argidx+1 < args.size()) {
|
||||
prove_skip = std::stoi(args[++argidx]);
|
||||
prove_skip = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-seq" && argidx+1 < args.size()) {
|
||||
seq_len = std::stoi(args[++argidx]);
|
||||
seq_len = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-set-at" && argidx+3 < args.size()) {
|
||||
int timestep = std::stoi(args[++argidx]);
|
||||
int timestep = atoi(args[++argidx].c_str());
|
||||
std::string lhs = args[++argidx];
|
||||
std::string rhs = args[++argidx];
|
||||
sets_at[timestep].push_back(std::pair<std::string, std::string>(lhs, rhs));
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-unset-at" && argidx+2 < args.size()) {
|
||||
int timestep = std::stoi(args[++argidx]);
|
||||
int timestep = atoi(args[++argidx].c_str());
|
||||
unsets_at[timestep].push_back(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-set-def-at" && argidx+2 < args.size()) {
|
||||
int timestep = std::stoi(args[++argidx]);
|
||||
int timestep = atoi(args[++argidx].c_str());
|
||||
sets_def_at[timestep].push_back(args[++argidx]);
|
||||
enable_undef = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-set-any-undef-at" && argidx+2 < args.size()) {
|
||||
int timestep = std::stoi(args[++argidx]);
|
||||
int timestep = atoi(args[++argidx].c_str());
|
||||
sets_any_undef_at[timestep].push_back(args[++argidx]);
|
||||
enable_undef = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-set-all-undef-at" && argidx+2 < args.size()) {
|
||||
int timestep = std::stoi(args[++argidx]);
|
||||
int timestep = atoi(args[++argidx].c_str());
|
||||
sets_all_undef_at[timestep].push_back(args[++argidx]);
|
||||
enable_undef = true;
|
||||
continue;
|
||||
|
|
|
@ -803,11 +803,11 @@ struct SimPass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-n" && argidx+1 < args.size()) {
|
||||
numcycles = std::stoi(args[++argidx]);
|
||||
numcycles = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-rstlen" && argidx+1 < args.size()) {
|
||||
worker.rstlen = std::stoi(args[++argidx]);
|
||||
worker.rstlen = atoi(args[++argidx].c_str());
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-clock" && argidx+1 < args.size()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue