Merge pull request #4770 from YosysHQ/emil/autoidx-option

driver: add --autoidx
This commit is contained in:
Emil J 2024-12-04 16:43:40 +01:00 committed by GitHub
commit d78086480f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -276,6 +276,8 @@ int main(int argc, char **argv)
options.add_options("developer") options.add_options("developer")
("X,trace", "enable tracing of core data structure changes. for debugging") ("X,trace", "enable tracing of core data structure changes. for debugging")
("M,randomize-pointers", "will slightly randomize allocated pointer addresses. for debugging") ("M,randomize-pointers", "will slightly randomize allocated pointer addresses. for debugging")
("autoidx", "start counting autoidx up from <seed>, similar effect to --hash-seed",
cxxopts::value<uint64_t>(), "<idx>")
("A,abort", "will call abort() at the end of the script. for debugging") ("A,abort", "will call abort() at the end of the script. for debugging")
("x,experimental", "do not print warnings for the experimental <feature>", ("x,experimental", "do not print warnings for the experimental <feature>",
cxxopts::value<std::vector<std::string>>(), "<feature>") cxxopts::value<std::vector<std::string>>(), "<feature>")
@ -427,6 +429,10 @@ int main(int argc, char **argv)
if (result.count("infile")) { if (result.count("infile")) {
frontend_files = result["infile"].as<std::vector<std::string>>(); frontend_files = result["infile"].as<std::vector<std::string>>();
} }
if (result.count("autoidx")) {
int idx = result["autoidx"].as<uint64_t>();
autoidx = idx;
}
if (log_errfile == NULL) { if (log_errfile == NULL) {
log_files.push_back(stdout); log_files.push_back(stdout);