# PartitionedSignal nmigen-aware eq (assign) * For copying (assigning) PartitionedSignal to PartitionedSignal of equal size there is no issue. However if the source has a greater width than the target, *partition-aware* truncation must occur. For the opposite, sign/zero extension must occur. Finally for a Signal or Const, duplication across all Partitions must occur, again, following the rules of zero, sign or unsigned. Take two PartitionedSignals (source a, dest b) of 32 bit: partition: p p p (3 bits) a : AAA3 AAA2 AAA1 AAA0 (32 bits) b : BBB3 BBB2 BBB1 BBB0 (32 bits) For all partition settings this copies verbatim. However if A is shorter than B: partition: p p p (3 bits) a : A7A6 A5A4 A3A2 A1A0 (8 bits) b : BBB3 BBB2 BBB1 BBB0 (16 bits) then it matters what the partition settings are: | partition | o3 | o2 | o1 | o0 | | --------- | -- | -- | -- | -- | | 000 | [A7A7A7A7] | [A7A7A7A7] | A7A6A5A4 | A3A2A1A0 | | 001 | [A7A7A7A7] | [A7A7]A7A6 | A5A4A3A2 | [A1A1]A1A0 | | 010 | [A7A7A7A7] | A7A6A5A4 | [A3A3A3A3] | A3A2A1A0 | | 111 | [A7A7]A7A6 | [A5A5]A5A4 | [A3A3]A3A2 | [A1A1]A1A0 | where square brackets are zero if A is unsigned, and contains the specified bits if signed.