lib/HDLRuby/std/fixpoint.rb in HDLRuby-2.5.1 vs lib/HDLRuby/std/fixpoint.rb in HDLRuby-2.6.2

- old
+ new

@@ -63,9 +63,18 @@ (left.as(signed[isize+fsize*2]) << fsize) / right else (left.as([isize+fsize*2]) << fsize) / right end end + # Define the removal of the point. + typ.define_singleton_method(:no_point) do + if (typ.signed?) then + signed[typ.width] + else + bit[typ.width] + end + end + # Return the resulting typ. typ end end return res end