From 5157691f0eca5c5312524483491309a7e07d9710 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 10 Dec 2019 20:09:24 +0000 Subject: 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. --- backends/cxxrtl/cxxrtl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backends/cxxrtl/cxxrtl.h') diff --git a/backends/cxxrtl/cxxrtl.h b/backends/cxxrtl/cxxrtl.h index d066530f2..a67591885 100644 --- a/backends/cxxrtl/cxxrtl.h +++ b/backends/cxxrtl/cxxrtl.h @@ -296,6 +296,10 @@ struct value : public expr_base> { return result; } + value update(const value &mask, const value &val) const { + return bit_and(mask.bit_not()).bit_or(val.bit_and(mask)); + } + template value shl(const value &amount) const { // Ensure our early return is correct by prohibiting values larger than 4 Gbit. -- cgit v1.2.3