[Libre-soc-bugs] [Bug 835] add support for smtlib2 floating-point to yosys and nmigen

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Jun 1 09:20:20 BST 2022


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

--- Comment #28 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #27)
> (In reply to Jacob Lifshay from comment #26)
> 
> > I changed the API so SmtBitVec and SmtBool are both ValueCastable,
> 
> sorry, can you please make that UserValue,

No, making it UserValue is a bad idea, it breaks the API, as I mentioned
earlier:

(In reply to Jacob Lifshay from comment #20)
> and, no, having a SmtBitVec be a Value isn't a good idea since the API is
> based on the smtlib2 specification, not nmigen's Value API.

UserValue and ValueCastable are both useful for different
things...ValueCastable can be used for things that aren't a nmigen Value (such
as SmtBitVec which has a different API than Value) but can be implicitly and/or
explicitly converted to a Value, whereas UserValue is useful for things that
are a Value but just have some extra features.

> i'm going to deprecate
> ValueCastable because it breaks the chain of inheritance.

Please don't, it's useful too. we can choose to have both UserValue and
ValueCastable, they're useful for different things.

> this was
> touted as a "feature" but it's a serious problem when adding the
> up-casting we discussed a few months back.

that's because ValueCastable is the wrong tool for that job [1]. being the
wrong tool for that job doesn't mean ValueCastable isn't useful for other jobs,
such as SmtBitVec.

[1] assuming you want simd values to be nmigen Values -- i strongly disagree,
but we can argue about that some other time.
> 
> 
> > I also merged the CI additions into the smtlib2-expr-support branch and
> > adjusted .gitlab-ci.yml to use our yosys 0.13 fork with the $smtlib2_expr
> > support.
> 
> brilliant
> 
> > CI for yosys master fails because $smtlib2_expr isn't yet merged.
> 
> nice to have something keeping an eye on when that occurs

I'm subscribed to the github PR(s), so can easily keep track of that. I'll most
likely put a comment here and/or on the nmigen PR when the github PR is merged.

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


More information about the libre-soc-bugs mailing list