clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.4k stars 147 forks source link

Dubious primitive instantiation for `GHC.Num.Integer.integerToInt#` when using `xpmCdcHandshake` #2744

Open jvnknvlgl opened 6 days ago

jvnknvlgl commented 6 days ago

When I use xpmCdcHandshake (or specifically: xpmCdcMaybeLossy from Bittide) in my project, I get the following warning:

[WARNING] Dubious primitive instantiation for GHC.Num.Integer.integerToInt#: GHC.Num.Integer.integerToInt#: Integers are dynamically sized in simulation, but fixed-length after synthesis. Use carefully. (disable with -fclash-no-prim-warn)

I have tried to move some of the @Integers in the instantiation of the IP blocks for xpm_cdc_handshake and xpm_cdc_single to Bit or Index, but this did not resolve this warning and I can't really see where else this could go wrong.