| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Use (and ignore) the expression provided to log_assert in NDEBUG builds
|
| |
| |
| |
| |
| | |
[[maybe_unused]] is available since C++17, so this commit adds
a polyfill YS_MAYBE_UNUSED. Once we require C++17 we can drop it.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This avoids warnings in NDEBUG builds emitted when a variable is only
used in log_assert, but is always defined.
|
|\ \
| | |
| | | |
log and qbfsat: Also include child process usage in `PerformanceTimer::query()` and report the time for each call to the QBF-SAT solver
|
| | | |
|
| | |
| | |
| | |
| | | |
report the time for each call to the QBF-SAT solver.
|
| | |
| | |
| | |
| | |
| | |
| | | |
`log_signal()`.
Co-Authored-By: Claire Wolf <claire@symbioticeda.com>
|
| | |
| | |
| | |
| | | |
spec for writing to and specializing from a solution file.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new types include:
- FFs with async reset and enable (`$adffe`, `$_DFFE_[NP][NP][01][NP]_`)
- FFs with sync reset (`$sdff`, `$_SDFF_[NP][NP][01]_`)
- FFs with sync reset and enable, reset priority (`$sdffs`, `$_SDFFE_[NP][NP][01][NP]_`)
- FFs with sync reset and enable, enable priority (`$sdffce`, `$_SDFFCE_[NP][NP][01][NP]_`)
- FFs with async reset, set, and enable (`$dffsre`, `$_DFFSRE_[NP][NP][NP][NP]_`)
- latches with reset or set (`$adlatch`, `$_DLATCH_[NP][NP][01]_`)
The new FF types are not actually used anywhere yet (this is left
for future commits).
|
|\ \
| | |
| | | |
hashlib, rtlil: Add `operator+()` and `operator+=()` to `dict` iterators
|
| | |
| | |
| | |
| | |
| | |
| | | |
static analysis.
Co-Authored-By: whitequark <whitequark@whitequark.org>
|
| |/
| |
| |
| | |
`dict<>::const_iterator` and add `operator+()` and `operator+=()` to `ObjIterator`.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was tagged only with YS_ATTRIBUTE(noreturn), but not
YS_NORETURN, so it got lost in #2173, resulting in warnings in
frontends/ast/simplify.cc:
frontends/ast/simplify.cc:267:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
frontends/ast/simplify.cc:379:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Upgrading to WASI SDK 11.0 caused the WASM build to fail because WASM
does not have signals. (Arguably Yosys was broken even before, it was
just broken silently.)
|
| |
|
| |
|
|
|
|
|
| |
The only difference in behavior is that this removes the attribute
when the pool becomes empty.
|
|\
| |
| | |
Silence warning in select.cc and pass some more args by ref
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this patch, the code passed around std::string objects by
value. It's probably not a hot-spot, but it can't hurt to avoid the
copying.
Removing the copy and clean-up code means the resulting code is ~6.1kb
smaller when compiled with GCC 9.3 and standard settings.
|
|\ \
| | |
| | | |
Split `flatten` from `techmap` and simplify it
|
| | | |
|
|\ \ \
| | | |
| | | | |
Preserve 'signed'-ness of a verilog wire through RTLIL
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As per suggestion made in https://github.com/YosysHQ/yosys/pull/1987, now:
RTLIL::wire holds an is_signed field.
This is exported in JSON backend
This is exported via dump_rtlil command
This is read in via ilang_parser
|
|\ \ \ \
| |_|/ /
|/| | | |
Pyosys API: idict type handling
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- Also, re-applied no-line-break workaround to rtlil.h to make parser
catch all methods.
|
|\ \ \ \
| | | | |
| | | | | |
Clean up `passes/techmap/techmap.cc`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|