[libre-riscv-dev] [Bug 66] New: a nmigen "Object" is needed that acts like a multiply-inheritable python class

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Fri Apr 19 09:33:57 BST 2019


            Bug ID: 66
           Summary: a nmigen "Object" is needed that acts like a
                    multiply-inheritable python class
           Product: Libre Shakti M-Class
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl at lkcl.net
          Reporter: lkcl at lkcl.net
                CC: libre-riscv-dev at lists.libre-riscv.org
   NLnet milestone: ---

Record is inadequate, not being multiply-inheritable, and requiring
declarations to be carried out through a non-pythonic method:
a list of tuples of signal width and direction.

this is much more intuitive:

class RecordTest:
   def __init__(self):
     self.r1 = RecordObject()
     self.r1.sig1 = Signal(16)

     self.r1.r2 = RecordObject()
     self.r1.r2.sig2 = Signal(16)

     self.r1.r3 = RecordObject()
     self.r1.r3.sig3 = Signal(16)

and, if RecordTest (or other class) is itself derived from RecordObject,
it may also be instantiated and assigned into another RecordObject,
to an arbitrary nested depth.

key features required:

* flattening
* eq (assignment) including with ArrayProxy
* iteration (single-argument)
* working well with nmigen ir/xfrm (Visitor code).

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

More information about the libre-riscv-dev mailing list