From: Luke Kenneth Casson Leighton Date: Thu, 4 Apr 2019 03:22:01 +0000 (+0100) Subject: add dictionary-support to pipeline eq function X-Git-Tag: ls180-24jan2020~1351 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=161f4f8f9ec75f62d3e7bd8a528de9c2b7785e34;p=ieee754fpu.git add dictionary-support to pipeline eq function --- diff --git a/src/add/singlepipe.py b/src/add/singlepipe.py index 081a8a52..9dc0ee5e 100644 --- a/src/add/singlepipe.py +++ b/src/add/singlepipe.py @@ -247,9 +247,15 @@ def eq(o, i): python object, enumerate them, find out the list of Signals that way, and assign them. """ + res = [] + if isinstance(o, dict): + for (k, v) in o.items(): + print ("d-eq", v, i[k]) + res.append(v.eq(i[k])) + return res + if not isinstance(o, Sequence): o, i = [o], [i] - res = [] for (ao, ai) in zip(o, i): print ("eq", ao, ai) if isinstance(ao, Record):