Commit Graph

89 Commits

Author SHA1 Message Date
Emil J. Tywoniak 2489711c39 hashlib: legacy mkhash_add -> djb2_add 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 838eb9c280 hashlib: acc -> eat 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 4c07564203 hashlib: add deprecated mkhash function to prevent plugin breakage 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 9ff80b3cd5 docs: document the ideas behind the hashing interface 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 82874fd631 hashlib: run_hash uses hash_top_ops, not hash_ops 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 60c1e41557 hashlib: remove is_new from HasherDJB32, implement hash_top for IdString 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 681736ddeb hash: solo hashing interface, override for SigBit 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 4d6b709d70 hashlib: allow forcing Hasher state, use it for IdString trivial hashing 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak e21932c4e0 hashlib: don't xorshift in between upper and lower word 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 0ba66f3bfe hashlib: fudge always 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 148583dcaf hashlib: hash_t can be set to 64-bit 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 0758142b88 hashlib: use hash_t across the board 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak e626fafa5e hashlib: only include in one place 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak c26f625b27 hashlib: fix pyosys 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 3bd50682d8 driver: add --hash-seed 2024-11-26 10:52:07 +01:00
Emil J. Tywoniak 898d042604 hashlib: redo interface for flexibility 2024-11-26 10:52:07 +01:00
Mike Inouye 1e3973c5cb Explictly #include <variant> for std::variant usage.
Signed-off-by: Mike Inouye <mikeinouye@google.com>
2024-10-07 21:57:30 +00:00
Emily Schmidt fbee31080e add optional header and hashlib implementation for optional 2024-08-21 11:04:11 +01:00
Emily Schmidt 248d5f72d4 add support for std::variant to hashlib 2024-08-21 11:01:09 +01:00
Emil J 051d83205d
Merge pull request #4471 from georgerennie/hashlib_primes
hashlib: Add some more primes
2024-07-29 15:10:22 +02:00
Emil J. Tywoniak 583db7b15e sigmap: comments 2024-07-18 16:02:11 +02:00
George Rennie 339d4e8932 hashlib: Correct prime sequence 2024-07-02 08:10:18 +01:00
George Rennie 78ae4ed9ac hashlib: Add some more primes
* Add some primes as suggested in #4458. This allows larger hashtables
  to be allocated for very big designs
2024-07-01 12:37:41 +01:00
Martin Povišer 66479a2232 hashlib: Add missing `stdint.h` include
We use `uint32_t` `uint64_t` etc. so add an explicit include.
2024-02-08 14:27:12 +00:00
Claire Xenia Wolf fb72dc1a40 Add constexpr hashlib default constructors
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2023-12-29 19:20:44 +01:00
Martin Povišer 189064b8da rtlil, hashlib: Remove deprecated `std::iterator` usage
`std::iterator` has been deprecated in C++17. Yosys is being compiled
against the C++11 standard but plugins can opt to compile against a
newer one. To silence some deprecation warnings when those plugins are
being compiled, replace the `std::iterator` inheritance with the
equivalent type declarations.
2023-12-09 19:01:39 +01:00
Rasmus Munk Larsen 8e0308b5e7 Revert changes to celltypes.h. Use dict instead of std::unordered_map and most hash function for uint64_t to hashlib.h to support this. 2023-10-03 14:25:59 -07:00
Wanda c172fef01a hashlib: Use a better hash for pool. 2023-09-26 18:55:06 +01:00
gatecat 52c8c28d2c Add recover_names pass to recover names post-mapping 2023-05-25 10:55:07 +02:00
Aki Van Ness 6717e02023
kernel: hashlib: cleaned up message about table size in cases where `sizeof(int) == 4`, (closes #3440) 2022-08-25 11:08:51 -04:00
Claire Xenia Wolf 72787f52fc Fixing old e-mail addresses and deadnames
s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi;
s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi;
s/((David)\s+)+Shah\s+<(dave|david)@(symbioticeda.com|yosyshq.com|ds0.me)>/David Shah <dave@ds0.me>/gi;
s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi;
s,https?://www.clifford.at/yosys/,http://yosyshq.net/yosys/,g;
2021-06-08 00:39:36 +02:00
Marcelina Kościelnicka dbfd0b61e3 hashlib: Add a hash for bool. 2021-05-24 22:02:15 +02:00
Alberto Gonzalez d71a9badda
dict: Remove guard for past-the-end iterators that might mask problems in static analysis.
Co-Authored-By: whitequark <whitequark@whitequark.org>
2020-06-19 21:04:29 +00:00
Alberto Gonzalez e5a2d17b5d
hashlib, rtlil: Add `operator+=()` to `dict<>::iterator` and `dict<>::const_iterator` and add `operator+()` and `operator+=()` to `ObjIterator`. 2020-06-19 17:44:29 +00:00
Alberto Gonzalez 6eea4b3d79
kernel: Try an order-independent approach to hashing `dict`.
Co-Authored-By: David Shah <dave@ds0.me>
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
2020-05-19 23:32:53 +00:00
Alberto Gonzalez 976edb7597
kernel: Ensure `dict` always hashes to the same value given the same contents. 2020-05-14 20:06:55 +00:00
Alberto Gonzalez 35b94d1f66
kernel: Re-implement `dict` hash code as a `dict` member function instead of a specialized template for `hash_ops`. 2020-05-14 20:06:55 +00:00
Alberto Gonzalez 2fb4931e5b
Add specialized `hash()` for type `dict` and use a `dict` instead of a `std::map` for `techmap_cache` and `techmap_do_cache`. 2020-05-14 20:06:53 +00:00
Eddie Hung bf22cda912
Merge pull request #1969 from boqwxp/pool_emplace
kernel: Add `pool` support for rvalue references and C++11 move semantics.
2020-04-22 12:10:42 -07:00
Eddie Hung a7c66fdc61 pool: add emplace() function 2020-04-22 08:14:07 -07:00
Alberto Gonzalez 746c29b171
kernel: Rename arguments to rvalue-reference-accepting functions. 2020-04-21 17:17:47 +00:00
Marcelina Kościelnicka 79efaa65ad idict: Make iterator go forward.
Previously, iterating over an idict returned its contents in reverse.
2020-04-21 19:09:00 +02:00
Alberto Gonzalez ecaa892e35
Add rvalue-reference-accepting `entry_t` constructor for `pool`. 2020-04-20 05:37:10 +00:00
Alberto Gonzalez 95b94ad19b
In `pool`, construct `entry_t`s in-place and add an rvalue-accepting-and-forwarding `insert()` method. 2020-04-20 02:18:30 +00:00
Alberto Gonzalez 5eb1f83d2d
Rename overloaded `insert()` to `emplace()` and add overloaded versions for all possible lvalue/rvalue combinationsfor its arguments. 2020-04-16 03:54:33 +00:00
Alberto Gonzalez c479fdeb85
Add `dict` support for rvalue references and C++11 move semantics. 2020-04-13 23:52:16 +00:00
Clifford Wolf 76c9c350e7 Add hashlib "<container>::element(int n)" methods
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-03-14 22:04:42 +01:00
Clifford Wolf d3b3dd8e88 Add hashlib support for hashing of pools 2017-08-22 13:04:33 +02:00
Clifford Wolf c251e3a576 Change intptr_t to uintptr_t in hashlib.h 2017-07-18 17:38:19 +02:00
Robert Ou f0741698fa Fix build warnings for win64
Win64 has a 32-bit long. Use intptr_t to work on any data model.
2017-07-17 12:36:43 -07:00