1
0
Fork 0

support operations directly on SimValue, UIntValue, and SIntValue, and shared references to those

This commit is contained in:
Jacob Lifshay 2025-11-18 03:50:06 -08:00
parent 2a65aa2bd5
commit 9e803223d0
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
42 changed files with 6076 additions and 1486 deletions

View file

@ -12,7 +12,7 @@ fn blinky(platform_io_builder: PlatformIOBuilder<'_>) {
clk: clk_input.clk,
rst,
};
let max_value = (Expr::ty(clk_input).frequency() / 2.0).round_ties_even() as u64 - 1;
let max_value = (clk_input.ty().frequency() / 2.0).round_ties_even() as u64 - 1;
let int_ty = UInt::range_inclusive(0..=max_value);
#[hdl]
let counter_reg: UInt = reg_builder().clock_domain(cd).reset(0u8.cast_to(int_ty));