Skip to content

Commit

Permalink
Error on unreliable name generation in VIO blackbox
Browse files Browse the repository at this point in the history
Fixes #2497
  • Loading branch information
martijnbastiaan committed Jun 20, 2023
1 parent 28f6649 commit 4a6a82a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Xilinx/VIO/DuplicateInputNames.hs
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 Xilinx/VIO/DuplicateInputOutputNames.hs
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
14 changes: 14 additions & 0 deletions Xilinx/VIO/DuplicateOutputNames.hs
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)

0 comments on commit 4a6a82a

Please sign in to comment.