Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Not gate
{-# LANGUAGE ImplicitParams #-}
module Clash01 where
import Clash.Prelude
notL :: Bool -> Bool
notL = not
notTF s i = (not i, not i)
notM :: (?rst::Reset domain synchronous, ?clk::Clock domain gated) => Signal domain Bool -> Signal domain Bool
notM = mealy notTF False
:: SystemClockReset
=> Signal System Bool
-> Signal System Bool
topEntity = notM
{-# NOINLINE topEntity #-}
testBench :: Signal System Bool
testBench = done'
testInput = stimuliGenerator $(listToVecTH [True , False, True , True , False, False])
expectedOutput = outputVerifier $(listToVecTH [False, True , False, False, True , True ])
done = expectedOutput (topEntity testInput)
done' = withClockReset (tbSystemClockGen (not <$> done')) systemResetGen done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.