[Libre-soc-dev] PartitionedSignal (SIMD for nmigen) Cat and eq

lkcl luke.leighton at gmail.com
Sun Sep 26 11:47:26 BST 2021


these are two new pages for the SIMD nmigen class that's been planned and in development for over 18 months.

nmigen Cat takes a list of Signals (or, any Value) and concatenates them together as a straight sequential bitbatch.

unfortunately for [SIMD] PartitionedSignal, PartitionedSignal is not a straight sequential bitbatch, it's *dynamically* reconfigureable as a *group* of sequential bitbatches, where each batch may even be a different length.  "1x8 2x24 1x8" is a perfectly well permitted *runtime* configuration for a 64-bit PartitionedSignal with 8 subdivisions (a mask of 7 bits)

therefore, Cat on multiple PartitionedSignals *CAN NOT* simply blithely smash all the bits together as output, it actually has to route down at the partition level, depending on what the individual partition sizes are.

Cat of mixed Signal or Const (non-SIMD) with PartitionedSignal simply has to be banned outright, it's not possible.

however, eq (assignment) is a little different: that *can* take a Signal (or Const, or Record) as input, and *can* be broadcast across all Partitions.  in theory this could be used by a partition-aware Cat to give PartitionedSignal.Cat the ability to work with mixed SIMD and non-SIMD signals, but i am hesitant to add that as a "first cut".

eq (assignment) is complicated by the fact that Signed and Unsigned PartitionedSignals have to be treated differently: depending on the target partition it may be the case that zero or sign extension is required *or not*.  yes there are cases where a Signal can be copied to one Partition truncated but sign/zero extended to another!

i have a first cut of a working Cat.  eq (assign) is next, it requires several different combinations so is quite involved.


More information about the Libre-soc-dev mailing list