-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'tests/shouldfail/Cores/' from commit '4a6a82ab88b43de7e1b2639d3b…
…c42f0e5788589c' git-subtree-dir: tests/shouldfail/Cores git-subtree-mainline: e205083 git-subtree-split: 4a6a82a
- Loading branch information
Showing
7 changed files
with
106 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module DuplicateInputNames where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = "a" :> "a" :> Nil | ||
outNames = "b" :> Nil | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"in" ::: Signal Dom (Bit, Bit) -> | ||
"out" ::: Signal Dom Bit | ||
topEntity = vioProbe @Dom inNames outNames 0 |
15 changes: 15 additions & 0 deletions
15
tests/shouldfail/Cores/Xilinx/VIO/DuplicateInputOutputNames.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module DuplicateInputOutputNames where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = "a" :> Nil | ||
outNames = "a" :> Nil | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"in" ::: Signal Dom Bit -> | ||
"out" ::: Signal Dom Bit | ||
topEntity = vioProbe @Dom inNames outNames 0 |
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,14 @@ | ||
module DuplicateOutputNames where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = Nil | ||
outNames = "a" :> "a" :> Nil | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"out" ::: Signal Dom (Bit, Bit) | ||
topEntity = vioProbe @Dom inNames outNames (0, 0) |
15 changes: 15 additions & 0 deletions
15
tests/shouldfail/Cores/Xilinx/VIO/InputBusWidthExceeded.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module InputBusWidthExceeded where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = singleton "probe_in" | ||
outNames = Nil | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"in" ::: Signal Dom (BitVector 257) -> | ||
"out" ::: Signal Dom () | ||
topEntity = vioProbe @Dom inNames outNames () |
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,17 @@ | ||
module InputProbesExceeded where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
import qualified Data.List as L | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = $(listToVecTH (L.map (("probe_in_" <>) . show) [0::Int, 1..256])) | ||
outNames = Nil | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"in" ::: Signal Dom (Vec 257 Bool) -> | ||
"out" ::: Signal Dom () | ||
topEntity = vioProbe @Dom inNames outNames () |
14 changes: 14 additions & 0 deletions
14
tests/shouldfail/Cores/Xilinx/VIO/OutputBusWidthExceeded.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module OutputBusWidthExceeded where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = Nil | ||
outNames = singleton "probe_out" | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"out" ::: Signal Dom (BitVector 257) | ||
topEntity = vioProbe @Dom inNames outNames 0 |
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,16 @@ | ||
module OutputProbesExceeded where | ||
|
||
import Clash.Prelude | ||
import Clash.Cores.Xilinx.VIO | ||
|
||
import qualified Data.List as L | ||
|
||
type Dom = XilinxSystem | ||
|
||
inNames = Nil | ||
outNames = $(listToVecTH (L.map (("probe_out_" <>) . show) [0::Int, 1..256])) | ||
|
||
topEntity :: | ||
"clk" ::: Clock Dom -> | ||
"out" ::: Signal Dom (Vec 257 Bit) | ||
topEntity = vioProbe @Dom inNames outNames (replicate (SNat @257) low) |