clash-lang / clash-compiler

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

Warn for insufficient `OPAQUE` annotations #2653

Open DigitalBrains1 opened 5 months ago

DigitalBrains1 commented 5 months ago

Currently we emit a warning when users forget to annotate their primitive with OPAQUE (or NOINLINE on older GHC's):

Bla2.hs:21:1: Warning: primitive Bla2.bla isn't marked OPAQUE.

We should emit warnings for all cases where people should add OPAQUE: anything annotated Synthesize, including topEntity and testBench; in fact, anything at all where Clash needs to find a name in the Core produced by GHC.

martijnbastiaan commented 1 month ago

Yes. I feel like this is a proper bug, so I've added the label!