mirror of
https://github.com/YosysHQ/yosys
synced 2026-04-30 07:43:40 +00:00
driver: add --hash-seed
This commit is contained in:
parent
68e40d8563
commit
e6f6c7d690
3 changed files with 16 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "kernel/yosys.h"
|
||||
#include "kernel/hashlib.h"
|
||||
#include "libs/sha1/sha1.h"
|
||||
#include "libs/cxxopts/include/cxxopts.hpp"
|
||||
#include <iostream>
|
||||
|
|
@ -269,6 +270,8 @@ int main(int argc, char **argv)
|
|||
options.add_options("developer")
|
||||
("X,trace", "enable tracing of core data structure changes. for debugging")
|
||||
("M,randomize-pointers", "will slightly randomize allocated pointer addresses. for debugging")
|
||||
("hash-seed", "mix up hashing values with <seed>, for extreme optimization and testing",
|
||||
cxxopts::value<int>(), "<seed>")
|
||||
("A,abort", "will call abort() at the end of the script. for debugging")
|
||||
("x,experimental", "do not print warnings for the experimental <feature>",
|
||||
cxxopts::value<std::vector<std::string>>(), "<feature>")
|
||||
|
|
@ -415,6 +418,10 @@ int main(int argc, char **argv)
|
|||
if (result.count("infile")) {
|
||||
frontend_files = result["infile"].as<std::vector<std::string>>();
|
||||
}
|
||||
if (result.count("hash-seed")) {
|
||||
int seed = result["hash-seed"].as<int>();
|
||||
Hasher::set_fudge(seed);
|
||||
}
|
||||
|
||||
if (log_errfile == NULL) {
|
||||
log_files.push_back(stdout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue