Copyright | (C) 2019 Myrtle Software Ltd |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
Verification
Synopsis
- data AssertionResult = AssertionResult {
- cvPropName :: !String
- cvPass :: !Bool
- newtype Property (dom :: Domain) = Property (Property' (Maybe Text, Signal dom Bool))
- data Assertion (dom :: Domain) = Assertion IsTemporal (Assertion' (Maybe Text, Signal dom Bool))
- data RenderAs
- = PSL
- | SVA
- | AutoRenderAs
- data IsTemporal
- class AssertionValue dom a | a -> dom where
- toAssertionValue :: a -> Assertion dom
- data Assertion' a
- = CvPure a
- | CvToTemporal (Assertion' a)
- | CvLit Bool
- | CvNot (Assertion' a)
- | CvAnd (Assertion' a) (Assertion' a)
- | CvOr (Assertion' a) (Assertion' a)
- | CvImplies (Assertion' a) (Assertion' a)
- | CvNext Word (Assertion' a)
- | CvBefore (Assertion' a) (Assertion' a)
- | CvTemporalImplies Word (Assertion' a) (Assertion' a)
- | CvAlways (Assertion' a)
- | CvNever (Assertion' a)
- data Property' a
- = CvAssert (Assertion' a)
- | CvCover (Assertion' a)
- toTemporal :: Assertion dom -> Assertion' (Maybe Text, Signal dom Bool)
- isTemporal :: Assertion dom -> IsTemporal
- assertion :: Assertion dom -> Assertion' (Maybe Text, Signal dom Bool)
Documentation
data AssertionResult Source #
A result of some property. Besides carrying the actual boolean result, it carries some properties used to make reports.
AssertionResult | |
|
Instances
Eq AssertionResult Source # | |
Defined in Clash.Verification.Internal (==) :: AssertionResult -> AssertionResult -> Bool # (/=) :: AssertionResult -> AssertionResult -> Bool # |
data Assertion (dom :: Domain) Source #
Assertion IsTemporal (Assertion' (Maybe Text, Signal dom Bool)) |
Instances
AssertionValue dom (Assertion dom) Source # | Result of a property specification |
Defined in Clash.Verification.Internal toAssertionValue :: Assertion dom -> Assertion dom Source # |
Render target for HDL
PSL | Property Specification Language |
SVA | SystemVerilog Assertions |
AutoRenderAs | Use SVA for SystemVerilog, PSL for others |
Instances
data IsTemporal Source #
Instances
Eq IsTemporal Source # | |
Defined in Clash.Verification.Internal (==) :: IsTemporal -> IsTemporal -> Bool # (/=) :: IsTemporal -> IsTemporal -> Bool # | |
Ord IsTemporal Source # | |
Defined in Clash.Verification.Internal compare :: IsTemporal -> IsTemporal -> Ordering # (<) :: IsTemporal -> IsTemporal -> Bool # (<=) :: IsTemporal -> IsTemporal -> Bool # (>) :: IsTemporal -> IsTemporal -> Bool # (>=) :: IsTemporal -> IsTemporal -> Bool # max :: IsTemporal -> IsTemporal -> IsTemporal # min :: IsTemporal -> IsTemporal -> IsTemporal # |
class AssertionValue dom a | a -> dom where Source #
An AssertionValue is a bool-like value or stream that can be used in property specifications. Clash implements two: a stream of booleans (Signal dom Bool), and the result of a property expression (Assertion dom).
toAssertionValue :: a -> Assertion dom Source #
Convert given type into a Assertion.
Instances
AssertionValue dom (Assertion dom) Source # | Result of a property specification |
Defined in Clash.Verification.Internal toAssertionValue :: Assertion dom -> Assertion dom Source # | |
AssertionValue dom (Signal dom Bool) Source # | Stream of booleans, originating from a circuit |
Defined in Clash.Verification.Internal |
data Assertion' a Source #
Internal version of Assertion
.
CvPure a | (Bootstrapping) signal of booleans |
CvToTemporal (Assertion' a) | Tag to force a non-temporal assertion to a temporal one |
CvLit Bool | Boolean literal |
CvNot (Assertion' a) | Logical not |
CvAnd (Assertion' a) (Assertion' a) | Logical and |
CvOr (Assertion' a) (Assertion' a) | Logical or |
CvImplies (Assertion' a) (Assertion' a) | Logical implies |
CvNext Word (Assertion' a) | Moves start point of assertion n cycles forward |
CvBefore (Assertion' a) (Assertion' a) | Before |
CvTemporalImplies Word (Assertion' a) (Assertion' a) | Temporal implies n | n == 0 -> same as |
CvAlways (Assertion' a) | Assertion should _always_ hold |
CvNever (Assertion' a) | Assertion should _never_ hold (not supported by SVA) |
Instances
Internal version of Property
. All user facing will instantiate a
with (Maybe Text, Signal dom Bool)
. Blackboxes will instantiate it with
(Maybe Text, Term)
instead.
CvAssert (Assertion' a) | |
CvCover (Assertion' a) |
Instances
Functor Property' Source # | |
Foldable Property' Source # | |
Defined in Clash.Verification.Internal fold :: Monoid m => Property' m -> m # foldMap :: Monoid m => (a -> m) -> Property' a -> m # foldMap' :: Monoid m => (a -> m) -> Property' a -> m # foldr :: (a -> b -> b) -> b -> Property' a -> b # foldr' :: (a -> b -> b) -> b -> Property' a -> b # foldl :: (b -> a -> b) -> b -> Property' a -> b # foldl' :: (b -> a -> b) -> b -> Property' a -> b # foldr1 :: (a -> a -> a) -> Property' a -> a # foldl1 :: (a -> a -> a) -> Property' a -> a # toList :: Property' a -> [a] # length :: Property' a -> Int # elem :: Eq a => a -> Property' a -> Bool # maximum :: Ord a => Property' a -> a # minimum :: Ord a => Property' a -> a # | |
Traversable Property' Source # | |
Defined in Clash.Verification.Internal | |
Show a => Show (Property' a) Source # | |
toTemporal :: Assertion dom -> Assertion' (Maybe Text, Signal dom Bool) Source #
isTemporal :: Assertion dom -> IsTemporal Source #