[Libre-soc-bugs] [Bug 458] PartitionedSignal needs nmigen constructs "m.If", Switch etc

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Sep 27 21:39:27 BST 2021


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

--- Comment #16 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #15)
> (In reply to Luke Kenneth Casson Leighton from comment #13)
> > well, that could have gone better. turns out that whitequark has decided
> > not to support concepts such as PartitionedSignal.
> > 
> > this forces us into a position of making a hard fork of nmigen in order to
> > support PartitionedSignal and other advanced concepts.
> 
> well, if we make a wrapper class like:
> class PModule:
>     def __init__(self, nmigen_module):
>         self.nmigen_module = nmigen_module
>         self.d = ...
>     def If(self, cond):
>         ... # ultimately call Module.If if needed
>     ...
> 
> we avoid needing a nmigen fork

ironically this type of approach gives the catastrophic
and dangerously misleading impression that there is even a
need or implication that the behaviour of the nmigen language
has, needs, or requires, to be altered in order to support
PartitionedSignal or other advanced data types.

even the implication that the behaviour is changed by having
an override of a function that fundamentally provides the
core of the nmigen language is disastrous in the extreme.

just like how SVP64 does not alter the behavioural characteristics
of Power ISA v3.0B, PartitionedSignal or other advanced data
type created by third parties should *in no way* alter the
fundamental behaviour of m.If, m.Switch, m.FSM and so on.

it is PartitionedSignal's responsibility to define what "Cat"
means in the context of use of PartitionedSignals.

it is not *Module*'s responsibility to define what "Cat" means
in the context of use of PartitionedSignals.

Module provides "intermediary" nmigen language characteristics
(higher level than Cat, Mux, add, xor, Assign).

even by creating an override of any of those intermediary
language features would automatically mean that the fork has a
unacceptably high maintenance burden.

also: *there are* no functions that require overriding in
dsl.Module!

the entire functionality that requires overriding *is*
in ast.Cat, ast.Mux, ast.Assign, not dsl.Module.

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


More information about the libre-soc-bugs mailing list