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
register requires its reset value to be a constant. Clash doesn't seem to propagate it however:
Test.hs:10:1: error:
Clash.Netlist.BlackBox(183): Couldn't instantiate blackbox for Clash.Signal.Internal.register#. Verification procedure reported:
Argument 5 should be literal, as blackbox used ~CONST[5], but was:
Identifier "~ARGN[1][0]" Nothing
The source location of the error is not exact, only indicative, as it is acquired
after optimizations. The actual location of the error can be in a function that is
inlined. To prevent inlining of those functions, annotate them with a NOINLINE pragma.
|
10 | topEntity clk rst gen =
| ^^^^^^^^^
The core of the problem is that Clash ends up with the following core:
This is representable, so reduceNonRepPrim won't fire. Ideally we'd somehow track / annotate what vars need to be a constant. Preferably across global binders, which could potentially eliminate a lot of work in constantSpec.
The text was updated successfully, but these errors were encountered:
I hit this when upgradging a codebase to GHC 9.6.6 and clash 1.8.2 from ghc 9.0.2 with clash 1.6.4. Took a while to isolate since it does not involve any of the other red flags, like doing maps/iterate etc.
Clash.Netlist.BlackBox(212): Couldn't instantiate blackbox for Clash.Signal.Internal.register#. Verification procedure reported:
Argument 5 should be literal, as blackbox used ~CONST[5], but was:
Identifier (RawIdentifier "eta1_0" Nothing []) Nothing
In the end register# reset refers to the following binding:
Consider:
register
requires its reset value to be a constant. Clash doesn't seem to propagate it however:The core of the problem is that Clash ends up with the following core:
This is representable, so
reduceNonRepPrim
won't fire. Ideally we'd somehow track / annotate what vars need to be a constant. Preferably across global binders, which could potentially eliminate a lot of work inconstantSpec
.The text was updated successfully, but these errors were encountered: