add a DIVS function as separate and discrete from floor_div
[soc.git] / src / soc / decoder / helpers.py
index 8cab8d50176856c733567a2522d553f44e1aef52..40ddb08859dea969bae2416b029938554769dcd7 100644 (file)
@@ -1,9 +1,15 @@
 import unittest
 from soc.decoder.selectable_int import SelectableInt, onebit
-from nmutil.divmod import trunc_div, trunc_rem
+from nmutil.divmod import trunc_divs, trunc_rems
+from operator import floordiv, mod
 from soc.decoder.selectable_int import selectltu as ltu
 from soc.decoder.selectable_int import selectgtu as gtu
 
+trunc_div = floordiv
+trunc_rem = mod
+DIVS = trunc_divs
+MODS = trunc_rems
+
 """
 Links:
 * https://bugs.libre-soc.org/show_bug.cgi?id=324 - add trunc_div and trunc_rem