[Libre-soc-bugs] [Bug 713] PartitionedSignal enhancement to add partition-context-aware lengths

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Oct 11 11:32:59 BST 2021


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

--- Comment #65 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
okaay, so *now* we have something that can act as an adapter
(and more like a derivative of Shape())

https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part/layout_experiment.py;h=4f185874f40228471434679d1c2ffa1b23f9f3ca;hb=7e61aab66f2e444e83fd564e85dc957072ca1be4

it's also got code-comments explaining what's going on.

jacob: i *deduced* that you added the ability to specify the same
width for all partitions, after the fact:

  32     if not isinstance(lane_shapes, Mapping):
  33         lane_shapes = {i: lane_shapes for i in part_counts}

i was not able when initially reading the code from comment #20 to
work that out.  i therefore added three comment lines:

  29     # identify if the lane_shapes is a mapping (dict, etc.)
  30     # if not, then assume that it is an integer (width) that
  31     # needs to be requested across all partitions


you can see where it's going, how the adapter fits:

https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part/partsig.py;h=bbad089360a070304dc2c5f1d38dfb29e6c56a6c;hb=7e61aab66f2e444e83fd564e85dc957072ca1be4#l84

in the ElwidthPartType adapter, the switch is on the elwidth and
the cases is the bitp dictionary.

still TODO in layout() is to merge all of the bitp dictionary values
to determine which parts of the partition are padding at *all* times.

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


More information about the libre-soc-bugs mailing list