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
- | YosysFormal
- 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)
- | CvEventually (Assertion' a)
- data Property' a
- = CvAssert (Assertion' a)
- | CvCover (Assertion' a)
- | CvAssume (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 Source # (/=) :: AssertionResult -> AssertionResult -> Bool Source # |
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 |
YosysFormal | Yosys Formal Extensions for Verilog and SystemVerilog. See: https://symbiyosys.readthedocs.io/en/latest/verilog.html and https://symbiyosys.readthedocs.io/en/latest/verific.html Falls back to PSL for VHDL, however currently Clash's PSL syntax isn't suported by GHDL+SymbiYosys; |
data IsTemporal Source #
Instances
Eq IsTemporal Source # | |
Defined in Clash.Verification.Internal (==) :: IsTemporal -> IsTemporal -> Bool Source # (/=) :: IsTemporal -> IsTemporal -> Bool Source # | |
Ord IsTemporal Source # | |
Defined in Clash.Verification.Internal compare :: IsTemporal -> IsTemporal -> Ordering Source # (<) :: IsTemporal -> IsTemporal -> Bool Source # (<=) :: IsTemporal -> IsTemporal -> Bool Source # (>) :: IsTemporal -> IsTemporal -> Bool Source # (>=) :: IsTemporal -> IsTemporal -> Bool Source # max :: IsTemporal -> IsTemporal -> IsTemporal Source # min :: IsTemporal -> IsTemporal -> IsTemporal Source # |
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) |
CvEventually (Assertion' a) | Assertion should _eventually_ hold |
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) | |
CvAssume (Assertion' a) |
Instances
Functor Property' Source # | |
Foldable Property' Source # | |
Defined in Clash.Verification.Internal fold :: Monoid m => Property' m -> m Source # foldMap :: Monoid m => (a -> m) -> Property' a -> m Source # foldMap' :: Monoid m => (a -> m) -> Property' a -> m Source # foldr :: (a -> b -> b) -> b -> Property' a -> b Source # foldr' :: (a -> b -> b) -> b -> Property' a -> b Source # foldl :: (b -> a -> b) -> b -> Property' a -> b Source # foldl' :: (b -> a -> b) -> b -> Property' a -> b Source # foldr1 :: (a -> a -> a) -> Property' a -> a Source # foldl1 :: (a -> a -> a) -> Property' a -> a Source # toList :: Property' a -> [a] Source # null :: Property' a -> Bool Source # length :: Property' a -> Int Source # elem :: Eq a => a -> Property' a -> Bool Source # maximum :: Ord a => Property' a -> a Source # minimum :: Ord a => Property' a -> a Source # | |
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 #