You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's completely incomprehensible. There are three issues:
Information overload, with excess StructLayout everywhere. This is probably not solvable.
Typing this back into a shell doesn't actually reproduce the value, because data.Const and Const have different argument order, and Const only accepts structured data anyway.
The actual value is just a decimal number.
I think this needs at least two fixes:
In general, change all amaranth.lib.* classes to prepend whatever * is to the repr. This matches our suggested import of from amaranth.lib import data, wiring, <etc> and isn't onerous, although it would make the "information overload" part surely worse.
In this particular case, return hdl.Const and not a data.Const since the former casts a by-field decomposition back into a value, fulfilling both the repr contract, and being useful to read.
Maybe ameliorating the info overload by adding newlines and indents to StructLayout and friends? It's kind of difficult to implement, but probably feasible, at least as an experiment.
The text was updated successfully, but these errors were encountered:
For example, look at this assertion:
It's completely incomprehensible. There are three issues:
StructLayout
everywhere. This is probably not solvable.data.Const
andConst
have different argument order, andConst
only accepts structured data anyway.I think this needs at least two fixes:
amaranth.lib.*
classes to prepend whatever*
is to the repr. This matches our suggested import offrom amaranth.lib import data, wiring, <etc>
and isn't onerous, although it would make the "information overload" part surely worse.hdl.Const
and not adata.Const
since the former casts a by-field decomposition back into a value, fulfilling both the repr contract, and being useful to read.StructLayout
and friends? It's kind of difficult to implement, but probably feasible, at least as an experiment.The text was updated successfully, but these errors were encountered: