[Libre-soc-bugs] [Bug 467] New: PartitionedSignal needs to work with Arrays

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Aug 18 15:03:11 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=467

            Bug ID: 467
           Summary: PartitionedSignal needs to work with Arrays
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl at lkcl.net
          Reporter: lkcl at lkcl.net
                CC: libre-soc-bugs at lists.libre-soc.org
   NLnet milestone: ---

PartitionedSignal is a dynamic SIMD version of Signal.  it has a partition
"context" associated with it which is aldo a Signal.

32 bit partitioned signal:

ppts:     1    2    3 
sig : 0xNN 0xNN 0xNN 0xNN

this 32 bit PartitionedSignal may be 1x32, 2x16, 4x8, or any other permutation
including 24-8.

Array accesses of Signals work very simply by allocating a pmux.

a = Array([Signal(4), Signal(4)])
b = Signal(2)
a[b].eq(5)

however Array has no concept of PartitionedSignal and will completely fail to
produce the right action.

ppts = PartitionPoints(4)

a = Array([PartitionedSignal(16, ppts),
           PartitionedSignal(16, ppts)])
b = PartitionedSignal(8, ppts)
a[b].eq(5) # fails 


the reason this fails is because "b" is not a Signal of 8 bits, it is
*dynamically interpreted* depending on the current context at runtime of its
partition.

example:

* the partition may be set to "all closed", indicating that b is 4x 2-bit AND
* a Array items are 4x 4-bit 

Then if:

* first part of b may be 0b00
* second part of b may be 0b01
* third part of b may be 0b01
* first part of b may be 0b00

this indicates that ***FOUR*** separate and distinct pmux operations shall take
place, ***NOT*** one, as follows:

* a[0b00][0:3].eq(5) # from 1st b
* a[0b00][4:7].eq(5) # from 2nd b
* a[0b01][8:11].eq(5) # from 3rd b
* a[0b00][12:15].eq(5) # from 4th b

this because the partition is set to 4x 4 bit and therefore a's
PartitionedSignals are treated as 4 completely independent 4 bit Arrays.

if however the partitions are 8-8 and b is as follows

* b first part is 0b0000
* b second part is 0b0001

then:

* a[0b0000][0:7].eq(5) # from 1st b
* a[0b0001][8:15].eq(5) # from 2nd b

this because b is now subdivided into 2x 4 bit parts, therefore when used as an
array index it splits A elements into 2x 8 bit ***INDEPENDENTLY INDEXED***
parallel 8 bit SIMD arrays.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list