-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rationale: - With at least GHC 9.2, we can use `OverloadedRecordDot` - GHC 9.2 itself doesn't work well with Clash. It has indecipherable error messages. - With at least GHC 9.4, we can use `OPAQUE` - GHC 9.4 itself doesn't work well with Clash. Versions 9.4.8 is extremely slow. Possibly there are several more good reasons as well, this list is not meant to be exhaustive. Using `--prefer-oldest`, I could not even get Cabal to give me an older `prettyprinter` package than 1.7.0 with GHC 9.6.1. So raising the lower bound of `prettyprinter` is completely harmless.
- Loading branch information
1 parent
c10063b
commit 7031394
Showing
32 changed files
with
69 additions
and
194 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
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
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 |
---|---|---|
|
@@ -5,8 +5,6 @@ License : BSD2 (see the file LICENSE) | |
Maintainer : QBayLogic B.V. <[email protected]> | ||
-} | ||
|
||
{-# LANGUAGE CPP #-} | ||
|
||
{-# OPTIONS_GHC -fconstraint-solver-iterations=10 -Wall -Werror #-} | ||
|
||
module Floating where | ||
|
@@ -138,8 +136,7 @@ addBasic | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem F.AddDefDelay Float | ||
addBasic clk x y = withClock clk $ withEnable enableGen $ F.add x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE addBasic #-} | ||
{-# OPAQUE addBasic #-} | ||
{-# ANN addBasic (binaryTopAnn "addBasic") #-} | ||
|
||
addBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -157,8 +154,7 @@ addEnable | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem 11 Float | ||
addEnable clk en x y = withClock clk $ withEnable en $ F.add x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE addEnable #-} | ||
{-# OPAQUE addEnable #-} | ||
{-# ANN addEnable (binaryEnTopAnn "addEnable") #-} | ||
|
||
addEnableTB :: Signal XilinxSystem Bool | ||
|
@@ -198,8 +194,7 @@ addShortPL | |
-> DSignal XilinxSystem 6 Float | ||
addShortPL clk x y = | ||
withClock clk $ withEnable enableGen $ F.addWith F.defConfig x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE addShortPL #-} | ||
{-# OPAQUE addShortPL #-} | ||
{-# ANN addShortPL (binaryTopAnn "addShortPL") #-} | ||
|
||
addShortPLTB :: Signal XilinxSystem Bool | ||
|
@@ -217,8 +212,7 @@ subBasic | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem F.SubDefDelay Float | ||
subBasic clk x y = withClock clk $ withEnable enableGen $ F.sub x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE subBasic #-} | ||
{-# OPAQUE subBasic #-} | ||
{-# ANN subBasic (binaryTopAnn "subBasic") #-} | ||
|
||
subBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -235,8 +229,7 @@ mulBasic | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem F.MulDefDelay Float | ||
mulBasic clk x y = withClock clk $ withEnable enableGen $ F.mul x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE mulBasic #-} | ||
{-# OPAQUE mulBasic #-} | ||
{-# ANN mulBasic (binaryTopAnn "mulBasic") #-} | ||
|
||
mulBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -253,8 +246,7 @@ divBasic | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem F.DivDefDelay Float | ||
divBasic clk x y = withClock clk $ withEnable enableGen $ F.div x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE divBasic #-} | ||
{-# OPAQUE divBasic #-} | ||
{-# ANN divBasic (binaryTopAnn "divBasic") #-} | ||
|
||
divBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -272,8 +264,7 @@ compareBasic | |
-> DSignal XilinxSystem F.CompareDefDelay F.Ordering | ||
compareBasic clk x y = | ||
withClock clk $ withEnable enableGen $ F.compare x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE compareBasic #-} | ||
{-# OPAQUE compareBasic #-} | ||
{-# ANN compareBasic (binaryTopAnn "compareBasic") #-} | ||
|
||
compareBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -288,8 +279,7 @@ compareEnable | |
-> DSignal XilinxSystem 0 Float | ||
-> DSignal XilinxSystem F.CompareDefDelay F.Ordering | ||
compareEnable clk en x y = withClock clk $ withEnable en $ F.compare x y | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE compareEnable #-} | ||
{-# OPAQUE compareEnable #-} | ||
{-# ANN compareEnable (binaryEnTopAnn "compareEnable") #-} | ||
|
||
compareEnableTB :: Signal XilinxSystem Bool | ||
|
@@ -313,8 +303,7 @@ fromUBasic | |
-> DSignal XilinxSystem 0 (Unsigned 32) | ||
-> DSignal XilinxSystem F.FromU32DefDelay Float | ||
fromUBasic clk x = withClock clk $ withEnable enableGen $ F.fromU32 x | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE fromUBasic #-} | ||
{-# OPAQUE fromUBasic #-} | ||
{-# ANN fromUBasic (unaryTopAnn "fromUBasic") #-} | ||
|
||
fromUBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -339,8 +328,7 @@ fromUEnable | |
-> DSignal XilinxSystem 0 (Unsigned 32) | ||
-> DSignal XilinxSystem 5 Float | ||
fromUEnable clk en x = withClock clk $ withEnable en $ F.fromU32 x | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE fromUEnable #-} | ||
{-# OPAQUE fromUEnable #-} | ||
{-# ANN fromUEnable (unaryEnTopAnn "fromUEnable") #-} | ||
|
||
fromUEnableTB :: Signal XilinxSystem Bool | ||
|
@@ -373,8 +361,7 @@ fromSBasic | |
-> DSignal XilinxSystem 0 (Signed 32) | ||
-> DSignal XilinxSystem F.FromS32DefDelay Float | ||
fromSBasic clk x = withClock clk $ withEnable enableGen $ F.fromS32 x | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE fromSBasic #-} | ||
{-# OPAQUE fromSBasic #-} | ||
{-# ANN fromSBasic (unaryTopAnn "fromSBasic") #-} | ||
|
||
fromSBasicTB :: Signal XilinxSystem Bool | ||
|
@@ -399,8 +386,7 @@ fromSEnable | |
-> DSignal XilinxSystem 0 (Signed 32) | ||
-> DSignal XilinxSystem 6 Float | ||
fromSEnable clk en x = withClock clk $ withEnable en $ F.fromS32 x | ||
-- See: https://github.com/clash-lang/clash-compiler/pull/2511 | ||
{-# CLASH_OPAQUE fromSEnable #-} | ||
{-# OPAQUE fromSEnable #-} | ||
{-# ANN fromSEnable (unaryEnTopAnn "fromSEnable") #-} | ||
|
||
fromSEnableTB :: Signal XilinxSystem Bool | ||
|
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
Oops, something went wrong.