[libre-riscv-dev] [Bug 68] nmigen general utils needed

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Fri Apr 19 18:16:30 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=68

--- Comment #1 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
occurred to me that eq is equivalent to the pattern of the python operator
module.

as such this would tend to suggest a name for a module where it could
live: nmutil.operator.

from nmutil.operator import eq

this would form the pattern for additional "global" functions present
in Value (such as shape, implies and part).


flatten is... different, in that it is already in nmigen.tools, which
in turn assumes that the nmigen object is iterable (isinstance(x, Iterable)
and that in turn implies it should have an __iter__ (etc. etc.).

except, the version in nmigen.tools fails because Record doesn't have
an __iter__.

patch for Record created (attached)

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


More information about the libre-riscv-dev mailing list