Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pragma changes don't invalidate clash cache #2709

Open
leonschoorl opened this issue Apr 11, 2024 · 0 comments
Open

Pragma changes don't invalidate clash cache #2709

leonschoorl opened this issue Apr 11, 2024 · 0 comments
Labels

Comments

@leonschoorl
Copy link
Member

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:

$ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant