3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 05:43:40 +00:00

write_cxxrtl: statically schedule comb logic and localize wires.

This results in further massive gains in performance, modest decrease
in compile time, and, for designs without feedback arcs, makes it
possible to run eval() once per clock edge in certain conditions.
This commit is contained in:
whitequark 2019-12-10 20:09:24 +00:00
parent d6d7273421
commit 5157691f0e
2 changed files with 368 additions and 68 deletions

View file

@ -296,6 +296,10 @@ struct value : public expr_base<value<Bits>> {
return result;
}
value<Bits> update(const value<Bits> &mask, const value<Bits> &val) const {
return bit_and(mask.bit_not()).bit_or(val.bit_and(mask));
}
template<size_t AmountBits>
value<Bits> shl(const value<AmountBits> &amount) const {
// Ensure our early return is correct by prohibiting values larger than 4 Gbit.