| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Co-Authored-By: David Shah <dave@ds0.me>
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
a specialized template for `hash_ops`.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
`std::map` for `techmap_cache` and `techmap_do_cache`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix modulo/remainder semantics
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $divfloor cell provides this flooring division.
This commit also fixes the handling of $div in opt_expr, which was
previously optimized as if it was $divfloor.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $modfloor cell provides this flooring modulo (also known as "remainder"
in several languages, but this name is ambiguous).
This commit also fixes the handling of $mod in opt_expr, which was
previously optimized as if it was $modfloor.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Restrict RTLIL::IdString to not contain whitespace or control chars
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | | |
This is an existing invariant (most backends can't cope with these)
but one that was not checked or documented.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Minor optimisation in Module::wire() and Module::cell()
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The existing code does a search to figure out whether id is in the
dict (with the call to count()), and then looks it up again to get the
result (with the call to at()). This version calls find() instead,
avoiding the double lookup.
Code size increases slightly (6kb). I think this is because the
contents of find() are getting inlined, and then inlined into lots of
the callsites for cell() and wire().
Looking at the compiled code before this patch, you just get
a (non-inlined) call to count() followed by a call to at(). After the
patch, the contents of find() have been inlined (so you see do_hash,
then do_lookup). The result for each function is about 30 bytes / 40%
bigger, which presumably also enlarges call-sites that inline it.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use default copy constructor for RTLIL::SigBit
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There was a handwritten copy constructor, which I'm not sure was
actually legal C++ (it unconditionally read from the 'data' member of
a union, which wouldn't have been written if wire was true). It was
also a bit less efficient than the constructor you get from the
compiler by default (which is allowed to just copy the memory).
This gives a marginal (~0.25%) decrease in code size when compiled
with GCC 9.3.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These operators work by fetching the string from the global string
table and then comparing with the std::string that was passed in as
rhs.
Using str() means that we create a std::string (strlen; malloc;
memcpy), compare for equality (another memcmp if they have the same
length) and then finally free the string.
Using c_str() means that we pass the const char* straight to
std::string's equality operator. This ends up as a call to
std::string::compare (the const char* flavour), which is essentially
strcmp.
|
|\ \ \ \
| | | | |
| | | | | |
log: Use `dict` instead of `std::vector<std::pair>` for `log_expect_{error, warning, log}` to better express the intent that each element is unique.
|
| | |/ /
| |/| |
| | | |
| | | | |
warning, log}` to better express the intent that each element is unique.
|
|\ \ \ \
| | | | |
| | | | | |
Extend YS_DEBUGTRAP to MacOS.
|
| | | | | |
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Fixes #2058.
|
| | | |
| | | |
| | | |
| | | | |
instead of moving them to $__ prefix
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit e08497c7c9d8a6f7a3eccddf2149c45d9ecff207, reversing
changes made to e366fd55122236a21c6daee6765724add840a1f9.
|
|/ / / |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
|\ \ \
| | | |
| | | | |
Avoid switch fall-through warnings
|
| |/ /
| | |
| | |
| | |
| | | |
C++17 introduced [[fallthrough]], GCC and clang had their own vendored
attributes before that. MSVC doesn't seem to have such a warning at all.
|
|\ \ \
| |/ /
|/| | |
Add "nowrshmsk" attribute, fix shift-and-mask bit slice write for signed offset
|
| | |
| | |
| | |
| | |
| | |
| | | |
offset, fixes #1990
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
|
| | | |
|
|\ \ \
| |/ /
|/| | |
kernel: Trap in `log_error()` when a debugger is attached
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The workflow of debugging fatal pass errors in Yosys is flawed in
three ways:
1. Running Yosys under a debugger is sufficient for the debugger
to catch some fatal errors (segfaults, aborts, STL exceptions)
but not others (`log_error()`, `log_cmd_error()`). This is
neither obvious nor easy to remember.
2. To catch Yosys-specific fatal errors, it is necessary to set
a breakpoint at `logv_error_with_prefix()`, or at least,
`logv_error()`. This is neither obvious nor easy to remember,
and GDB's autocomplete takes many seconds to suggest function
names due to the large amount of symbols in Yosys.
3. If a breakpoint is not set and Yosys encounters with such
a fatal error, the process terminates. When debugging a crash
that takes a long time to reproduce (or a nondeterministic crash)
this can waste a significant amount of time.
To solve this problem, add a macro `YS_DEBUGTRAP` that acts as a hard
breakpoint (if available), and a macro `YS_DEBUGTRAP_IF_DEBUGGING`
that acts as a hard breakpoint only if debugger is present.
Then, use `YS_DEBUGTRAP_IF_DEBUGGING` in `logv_error_with_prefix()`
to obviate the need for a breakpoint on nearly every platform.
Co-Authored-By: Alberto Gonzalez <boqwxp@airmail.cc>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This includes the following significant changes:
* Patching ezsat and minisat to disable resource limiting code
on WASM/WASI, since the POSIX functions they use are unavailable.
* Adding a new definition, YOSYS_DISABLE_SPAWN, present if platform
does not support spawning subprocesses (i.e. Emscripten or WASI).
This definition hides the definition of `run_command()`.
* Adding a new Makefile flag, DISABLE_SPAWN, present in the same
condition. This flag disables all passes that require spawning
subprocesses for their function.
|
|\ \ \
| |_|/
|/| | |
bugpoint: improve help text
|
| | | |
|
|/ / |
|
|/
|
|
| |
As it did before #1945
|
|\
| |
| | |
kernel: Add `pool` support for rvalue references and C++11 move semantics.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
rvalue-accepting-and-forwarding `insert()` method.
|
| |
| |
| |
| | |
Fixes #1822.
|
| |
| |
| |
| | |
Fixes #1819, #1820.
|
|/
|
|
| |
Previously, iterating over an idict returned its contents in reverse.
|
| |
|