Skip to content

Commit f7d46ee

Browse files
committed
Merge branch 'develop' into rc-1.5.2
2 parents 7b57300 + 4cdcc50 commit f7d46ee

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

veriloggen/thread/fixed.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ def reinterpret_cast_to_fixed(fsm, value, point, signed=True):
4545
return fxd.reinterpret_cast_to_fixed(value, point, signed)
4646

4747

48-
def fixed_to_int(fsm, value, point, signed=True):
48+
def fixed_to_int(fsm, value, point):
4949
point = vtypes.raw_value(point)
50-
signed = vtypes.raw_value(signed)
51-
return fxd.fixed_to_int(value, point, signed)
50+
return fxd.fixed_to_int(value, point)
5251

5352

5453
def fixed_to_real(fsm, value, point, signed=True):

veriloggen/types/fixed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def fixed_to_int(value, point):
126126

127127
if isinstance(value, (int, bool, float)) and isinstance(point, int):
128128
mag = 2 ** point
129-
return int(value / mag)
129+
return value // mag
130130

131131
if isinstance(value, (int, bool, float)):
132132
mag = vtypes.Int(2) ** point
133-
return vtypes.Int(value) / mag
133+
return vtypes.Int(value) // mag
134134

135135
signed = vtypes.get_signed(value)
136136
return shift_right(value, point, signed)

0 commit comments

Comments
 (0)