[Libre-soc-bugs] [Bug 671] convert spec pseudocode to use XLEN width

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Aug 30 13:49:11 BST 2021


https://bugs.libre-soc.org/show_bug.cgi?id=671

--- Comment #38 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
in the new RANGE helper, the inverted direction was missing

-        if start.value > end.value:  # start greater than end, must go -ve
-            # auto-subtract-one (sigh) due to python range
-            end = ast.BinOp(p[6], ast.Add(), ast.Constant(-1))
-            arange = [start, end, ast.Constant(-1)]

this needed to be converted to:

     return range(start, end, -1)

the inverted countdown (-1) was missing

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list