copying from non-Partitioned sources to Partitioned sources needs to be supported. there are twelve permutations needing entirely different behaviour: * Scalar or Partitioned source * signed or unsigned destination * source length is less, equal, or greater than destination. https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part/partsig.py;hb=HEAD
https://bugs.libre-soc.org/show_bug.cgi?id=458#c10 idea regarding assign, an override of __Assign__, with a private "collection list" of predicated partition conditions, that comes through from Switch. if __Assign__ understands that, and only assigns things based on a Condition in each partition, it makes Switch's job a lot easier. if the Condition defaults to a Const 0b111111 but is overridden if Switch tells it to change that, the complexity of trying to use temporary Signals is gone.
https://git.libre-soc.org/?p=ieee754fpu.git;a=commitdiff;h=74b34919e7dea7dd1f9ecd4a238c6244ee8dbe02 implemented... probably all 6 cases for parallel signal. untested. should work. uses nmutil.extend.ext as the underlying "detector". scalar signal should be a reasonably easy adaptation.
https://git.libre-soc.org/?p=ieee754fpu.git;a=commitdiff;h=359537564b3fcc1e9f0f900decde588cd28079d7 turned out to be very easy. integration into PartitionedSignal is next.
preliminary unit test for PartitionedSignal.eq() https://git.libre-soc.org/?p=ieee754fpu.git;a=commitdiff;h=00f1c370f584d8a7987f96e9e5aa2a813f639711 first cut found "whoops" errors, now sorted (bit of a scary moment there in the design): returning a single (lowered) eq which copies over the output from the on-demand-created Module, by copying its *lowered* output (to Value) works (thank goodness) next is to add unit tests for the other 11 permutations.
https://git.libre-soc.org/?p=ieee754fpu.git;a=commitdiff;h=b02c7687fd922c8af6a85c7bd9f8ed9aa0574f1c that completes the set of 12 permutations needed: for out_width in [16, 24, 8]: for sign in [True, False]: for scalar in [True, False]: self.run_tst(16, out_width, sign, scalar) about the only other useful thing to try there is perhaps inputting other types (scalar Const for example)