Open leonschoorl opened 2 months ago
module Test where import Clash.Prelude topEntity = foo foo :: Bool -> Bool foo _ = True
Compiling this produces two .vhdl files:
$ cabal run -- clash --vhdl Test.hs; ls vhdl/Test.topEntity/ [...] Clash: Compiling Test.topEntity [...] clash-manifest.json Test_topEntity_types.vhdl topEntity.vhdl
Now I add the line {-# NOINLINE foo #-}, and I'd expect clash to generate a separate file for foo, but:
{-# NOINLINE foo #-}
$ cabal run -- clash --vhdl Test.hs; ls vhdl/Test.topEntity/ [...] Clash: Compiling Test.topEntity Clash: Using cached result for: Test.topEntity [...] clash-manifest.json Test_topEntity_types.vhdl topEntity.vhdl
Only when I ask clash the ignore the cache, or otherwise invalidate it, do I get the expected result:
$ cabal run -- clash --vhdl Test.hs -fclash-no-cache; ls vhdl/Test.topEntity/ [...] Clash: Ignoring previously made caches Clash: Compiling Test.topEntity [...] clash-manifest.json foo.vhdl Test_topEntity_types.vhdl topEntity.vhdl
Compiling this produces two .vhdl files:
Now I add the line
{-# NOINLINE foo #-}
, and I'd expect clash to generate a separate file for foo, but:Only when I ask clash the ignore the cache, or otherwise invalidate it, do I get the expected result: