Skip to content
Snippets Groups Projects
Commit de1680ae authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Default use round half to even, to have unbiased power values.

parent 1649713a
Branches
No related tags found
1 merge request!234Use g_round_even = false in tb, because golden results use round half away...
...@@ -59,7 +59,7 @@ ENTITY common_requantize IS ...@@ -59,7 +59,7 @@ ENTITY common_requantize IS
-- when 0 then no effect -- when 0 then no effect
g_lsb_round : BOOLEAN := TRUE; -- when TRUE round else truncate the input LSbits g_lsb_round : BOOLEAN := TRUE; -- when TRUE round else truncate the input LSbits
g_lsb_round_clip : BOOLEAN := FALSE; -- when TRUE round clip to +max to avoid wrapping to output -min (signed) or 0 (unsigned) due to rounding g_lsb_round_clip : BOOLEAN := FALSE; -- when TRUE round clip to +max to avoid wrapping to output -min (signed) or 0 (unsigned) due to rounding
g_lsb_round_even : BOOLEAN := FALSE; -- when TRUE round to even, else round away from zero g_lsb_round_even : BOOLEAN := TRUE; -- when TRUE round half to even, else round half away from zero
g_msb_clip : BOOLEAN := TRUE; -- when TRUE CLIP else WRAP the input MSbits g_msb_clip : BOOLEAN := TRUE; -- when TRUE CLIP else WRAP the input MSbits
g_msb_clip_symmetric : BOOLEAN := FALSE; -- when TRUE clip signed symmetric to +c_smax and -c_smax, else to +c_smax and c_smin_symm g_msb_clip_symmetric : BOOLEAN := FALSE; -- when TRUE clip signed symmetric to +c_smax and -c_smax, else to +c_smax and c_smin_symm
-- for wrapping when g_msb_clip=FALSE the g_msb_clip_symmetric is ignored, so signed wrapping is done asymmetric -- for wrapping when g_msb_clip=FALSE the g_msb_clip_symmetric is ignored, so signed wrapping is done asymmetric
......
...@@ -41,7 +41,7 @@ ENTITY dp_requantize IS ...@@ -41,7 +41,7 @@ ENTITY dp_requantize IS
-- when 0 then no effect -- when 0 then no effect
g_lsb_round : BOOLEAN := TRUE; -- when TRUE round else truncate the input LSbits g_lsb_round : BOOLEAN := TRUE; -- when TRUE round else truncate the input LSbits
g_lsb_round_clip : BOOLEAN := FALSE; -- when TRUE round clip to +max to avoid wrapping to output -min (signed) or 0 (unsigned) due to rounding g_lsb_round_clip : BOOLEAN := FALSE; -- when TRUE round clip to +max to avoid wrapping to output -min (signed) or 0 (unsigned) due to rounding
g_lsb_round_even : BOOLEAN := FALSE; -- when TRUE round to even, else round away from zero g_lsb_round_even : BOOLEAN := TRUE; -- when TRUE round half to even, else round half away from zero
g_msb_clip : BOOLEAN := TRUE; -- when TRUE CLIP else WRAP the input MSbits g_msb_clip : BOOLEAN := TRUE; -- when TRUE CLIP else WRAP the input MSbits
g_msb_clip_symmetric : BOOLEAN := FALSE; -- when TRUE clip signed symmetric to +c_smax and -c_smax, else to +c_smax and c_smin_symm g_msb_clip_symmetric : BOOLEAN := FALSE; -- when TRUE clip signed symmetric to +c_smax and -c_smax, else to +c_smax and c_smin_symm
-- for wrapping when g_msb_clip=FALSE the g_msb_clip_symmetric is ignored, so signed wrapping is done asymmetric -- for wrapping when g_msb_clip=FALSE the g_msb_clip_symmetric is ignored, so signed wrapping is done asymmetric
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment