-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2746 from clash-lang/mergify/copy/1.8/pr-2737
Make sure clashSimulation is False in HDL even with -O2 (copy #2737)
- Loading branch information
Showing
7 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
tests/shouldwork/Basic/SimulationMagic.hs → ...s/shouldwork/Basic/SimulationMagic2736.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# OPTIONS_GHC -O2 -fspec-constr #-} | ||
module SimulationMagic2736a where | ||
|
||
import Clash.Prelude | ||
|
||
f0 :: Int | ||
f0 | clashSimulation = 123 | ||
| otherwise = 456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{-# LANGUAGE CPP #-} | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
{-# LANGUAGE TypeApplications #-} | ||
|
||
module T1796a where | ||
|
||
import Clash.Explicit.Prelude | ||
import Clash.Explicit.Testbench | ||
|
||
tb :: Signal System Bool | ||
tb = done | ||
where | ||
done = register clk rst enableGen False $ id (pure True) | ||
clk = tbClockGen @System (not <$> done) | ||
rst = resetGen @System |