From: Jacob Lifshay Date: Fri, 15 Oct 2021 03:27:42 +0000 (-0700) Subject: sort dpoints keys X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75b7f0a56780751faae0a8e7aa6e359b6cd205d9;p=ieee754fpu.git sort dpoints keys --- diff --git a/src/ieee754/part/layout_experiment.py b/src/ieee754/part/layout_experiment.py index 88f058cd..65fe1425 100644 --- a/src/ieee754/part/layout_experiment.py +++ b/src/ieee754/part/layout_experiment.py @@ -152,10 +152,13 @@ def layout(elwid, vec_el_counts, lane_shapes=None, fixed_width=None): # do not need the breakpoints at the very start or the very end dpoints.pop(0, None) dpoints.pop(width, None) + + # sort dpoints keys + dpoints = dict(sorted(dpoints.items(), key=lambda i: i[0])) + plist = list(dpoints.keys()) - plist.sort() print("dpoints") - pprint(dict(dpoints)) + pprint(dpoints) # second stage, add (map to) the elwidth==i expressions. # TODO: use nmutil.treereduce?