diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-18 16:44:45 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-18 16:44:45 +0200 |
commit | 44f13aff92146592fd9399bf96dfcb1f81fde708 (patch) | |
tree | 368624d6b03fef1e55b6b9804353a57a5ecfd818 /passes/cmds | |
parent | a3419319727ac1c2012602a702b62631570d7588 (diff) | |
download | yosys-44f13aff92146592fd9399bf96dfcb1f81fde708.tar.gz yosys-44f13aff92146592fd9399bf96dfcb1f81fde708.tar.bz2 yosys-44f13aff92146592fd9399bf96dfcb1f81fde708.zip |
Improved seeding of color rng in show command
Diffstat (limited to 'passes/cmds')
-rw-r--r-- | passes/cmds/show.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc index 92fc5bd55..eab42e6ff 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc @@ -54,7 +54,7 @@ struct ShowWorker const std::vector<std::pair<std::string, RTLIL::Selection>> &color_selections; const std::vector<std::pair<std::string, RTLIL::Selection>> &label_selections; - uint32_t xorshift32(uint32_t x) { + static uint32_t xorshift32(uint32_t x) { x ^= x << 13; x ^= x >> 17; x ^= x << 5; @@ -655,6 +655,8 @@ struct ShowPass : public Pass { } if (arg == "-colors" && argidx+1 < args.size()) { colorSeed = atoi(args[++argidx].c_str()); + for (int i = 0; i < 100; i++) + colorSeed = ShowWorker::xorshift32(colorSeed); continue; } if (arg == "-format" && argidx+1 < args.size()) { |