From: Luke Kenneth Casson Leighton Date: Thu, 21 Oct 2021 13:31:36 +0000 (+0100) Subject: add back-link in the return result of PartitionedCat to allow access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a9db43f4cecf0a43e1390a4fb8fd6746776f433;p=ieee754fpu.git add back-link in the return result of PartitionedCat to allow access to the submodule. PartitionedAssign can then detect this and alter the conditions to LHS *before* PartitionedCat.elaborate() is called it was already established in commit 494757caa1f that the elaborates are all called later --- diff --git a/src/ieee754/part_cat/pcat.py b/src/ieee754/part_cat/pcat.py index 6b4630de..a3b9c8c3 100644 --- a/src/ieee754/part_cat/pcat.py +++ b/src/ieee754/part_cat/pcat.py @@ -10,4 +10,7 @@ def PCat(m, arglist, ctx): modcount += 1 pc = PartitionedCat(arglist, ctx) setattr(m.submodules, "pcat%d" % modcount, pc) + # add terrible hack back-link to be able to access PartitionedCat + # in PartitionedAssign https://bugs.libre-soc.org/show_bug.cgi?id=731#c13 + pc.output.__hack_submodule = pc # blegh! return pc.output