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
Using Clash 0.99.3, the readNew function causes compiler warnings. The following example:
module TopLevel where
import Clash.Prelude
topEntity
:: Clock System Source
-> Reset System Asynchronous
-> Signal System (Unsigned 5)
-> Signal System (Maybe (Unsigned 5, BitVector 5))
-> Signal System (BitVector 5)
topEntity = exposeClockReset test
test :: HiddenClockReset dom gated sync
=> Signal dom (Unsigned 5)
-> Signal dom (Maybe (Unsigned 5, BitVector 5))
-> Signal dom (BitVector 5)
test rdAddr wrM = readNew (asyncRam d32) rdAddr wrM
Produces the compiler warning:
Loading dependencies took 0.499845074s
Compiling: TopLevel.topEntity
TopLevel.$sreadNew45574 (:: GHC.Classes.IP
rst
(Clash.Signal.Internal.Reset
(Clash.Signal.Internal.Dom system 10000)
Clash.Signal.Internal.Asynchronous)
-> GHC.Classes.IP
clk
(Clash.Signal.Internal.Clock
(Clash.Signal.Internal.Dom system 10000)
Clash.Signal.Internal.Source)
-> Clash.Signal.Internal.Clock
(Clash.Signal.Internal.Dom system 10000)
Clash.Signal.Internal.Source
-> Clash.Signal.Internal.Signal
(Clash.Signal.Internal.Dom system 10000)
(Clash.Sized.Internal.Unsigned.Unsigned 5)
-> Clash.Signal.Internal.Signal
(Clash.Signal.Internal.Dom system 10000)
(GHC.Base.Maybe
(GHC.Tuple.(,)
(Clash.Sized.Internal.Unsigned.Unsigned 5)
(Clash.Sized.Internal.BitVector.BitVector 5)))
-> Clash.Sized.Internal.BitVector.BitVector 5)
has potentially dangerous meta-stability issues:
The following clocks:
* GHC.Classes.IP
clk
(Clash.Signal.Internal.Clock
(Clash.Signal.Internal.Dom system 10000)
Clash.Signal.Internal.Source)
* Clash.Signal.Internal.Clock
(Clash.Signal.Internal.Dom system 10000)
Clash.Signal.Internal.Source
belong to the same clock domain and should be connected to the same clock source in order to prevent meta-stability issues.
Applied 127 transformations
Normalisation took 0.342218385s
Netlist generation took 0.003322493s
Total compilation took 0.846340327s
From what I can tell, there should not be meta-stability issues nor clock connection issues. Removing the readNew results in no compiler warnings, as expected.
The text was updated successfully, but these errors were encountered:
Using Clash 0.99.3, the
readNew
function causes compiler warnings. The following example:Produces the compiler warning:
From what I can tell, there should not be meta-stability issues nor clock connection issues. Removing the
readNew
results in no compiler warnings, as expected.The text was updated successfully, but these errors were encountered: