forked from libre-chip/fayalite
support operations directly on SimValue, UIntValue, and SIntValue, and shared references to those
This commit is contained in:
parent
2a65aa2bd5
commit
9e803223d0
42 changed files with 6076 additions and 1486 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue