1 # PartitionedSignal nmigen-aware eq (assign)
3 * <https://bugs.libre-soc.org/show_bug.cgi?id=709>
5 For copying (assigning) PartitionedSignal to PartitionedSignal
6 of equal size there is no issue. However if the source has a
7 greater width than the target, *partition-aware* truncation
8 must occur. For the opposite, sign/zero extension must occur.
9 Finally for a Signal or Const, duplication across all Partitions
10 must occur, again, following the rules of zero, sign or unsigned.
12 Take two PartitionedSignals (source a, dest b) of 32 bit:
14 partition: p p p (3 bits)
15 a : AAA3 AAA2 AAA1 AAA0 (32 bits)
16 b : BBB3 BBB2 BBB1 BBB0 (32 bits)
18 For all partition settings this copies verbatim. However if A
21 partition: p p p (3 bits)
22 a : A3 A2 A1 A0 (16 bits)
23 b : BBB3 BBB2 BBB1 BBB0 (32 bits)
25 then it matters what the partition settings are:
27 | partition | o3 | o2 | o1 | o0 |
28 | --------- | -- | -- | -- | -- |