lion-0.3.0.0: RISC-V Core
Copyright(c) David Cox 2021
LicenseBSD-3-Clause
Maintainerstandardsemiconductor@gmail.com
Safe HaskellNone
LanguageHaskell2010

Lion.Rvfi

Description

As the pipeline processes instructions, it populates the fields of the Rvfi data. When the instruction reaches the end of the pipeline, the core retires the instruction and writes the Rvfi data to output. This output is inspected and verified by the riscv-formal framework. See riscv-formal for more information about the interface. To verify the Lion core, see lion-formal.

Synopsis

Documentation

data RvfiCsr n Source #

RISC-V Formal Csr Interface

Constructors

RvfiCsr 

Fields

Instances

Instances details
KnownNat n => Eq (RvfiCsr n) Source # 
Instance details

Defined in Lion.Rvfi

Methods

(==) :: RvfiCsr n -> RvfiCsr n -> Bool #

(/=) :: RvfiCsr n -> RvfiCsr n -> Bool #

KnownNat n => Show (RvfiCsr n) Source # 
Instance details

Defined in Lion.Rvfi

Methods

showsPrec :: Int -> RvfiCsr n -> ShowS #

show :: RvfiCsr n -> String #

showList :: [RvfiCsr n] -> ShowS #

Generic (RvfiCsr n) Source # 
Instance details

Defined in Lion.Rvfi

Associated Types

type Rep (RvfiCsr n) :: Type -> Type #

Methods

from :: RvfiCsr n -> Rep (RvfiCsr n) x #

to :: Rep (RvfiCsr n) x -> RvfiCsr n #

KnownNat n => NFDataX (RvfiCsr n) Source # 
Instance details

Defined in Lion.Rvfi

type Rep (RvfiCsr n) Source # 
Instance details

Defined in Lion.Rvfi

type Rep (RvfiCsr n) = D1 ('MetaData "RvfiCsr" "Lion.Rvfi" "lion-0.3.0.0-5TeZzf2f4nX8XqM2dA3bRI" 'False) (C1 ('MetaCons "RvfiCsr" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_wdataCsr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("wdata" ::: BitVector n)) :*: S1 ('MetaSel ('Just "_rdataCsr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rdata" ::: BitVector n))) :*: (S1 ('MetaSel ('Just "_wmaskCsr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("wmask" ::: BitVector n)) :*: S1 ('MetaSel ('Just "_rmaskCsr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rmask" ::: BitVector n)))))

wmaskCsr :: forall n. Lens' (RvfiCsr n) ((:::) "wmask" (BitVector n)) Source #

wdataCsr :: forall n. Lens' (RvfiCsr n) ((:::) "wdata" (BitVector n)) Source #

rmaskCsr :: forall n. Lens' (RvfiCsr n) ((:::) "rmask" (BitVector n)) Source #

rdataCsr :: forall n. Lens' (RvfiCsr n) ((:::) "rdata" (BitVector n)) Source #

data Rvfi Source #

RISC-V Formal Interface

Constructors

Rvfi 

Fields

Instances

Instances details
Eq Rvfi Source # 
Instance details

Defined in Lion.Rvfi

Methods

(==) :: Rvfi -> Rvfi -> Bool #

(/=) :: Rvfi -> Rvfi -> Bool #

Show Rvfi Source # 
Instance details

Defined in Lion.Rvfi

Methods

showsPrec :: Int -> Rvfi -> ShowS #

show :: Rvfi -> String #

showList :: [Rvfi] -> ShowS #

Generic Rvfi Source # 
Instance details

Defined in Lion.Rvfi

Associated Types

type Rep Rvfi :: Type -> Type #

Methods

from :: Rvfi -> Rep Rvfi x #

to :: Rep Rvfi x -> Rvfi #

NFDataX Rvfi Source # 
Instance details

Defined in Lion.Rvfi

type Rep Rvfi Source # 
Instance details

Defined in Lion.Rvfi

type Rep Rvfi = D1 ('MetaData "Rvfi" "Lion.Rvfi" "lion-0.3.0.0-5TeZzf2f4nX8XqM2dA3bRI" 'False) (C1 ('MetaCons "Rvfi" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "_rvfiValid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("valid" ::: Bool)) :*: (S1 ('MetaSel ('Just "_rvfiOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("order" ::: BitVector 64)) :*: S1 ('MetaSel ('Just "_rvfiInsn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("insn" ::: BitVector 32)))) :*: (S1 ('MetaSel ('Just "_rvfiTrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("trap" ::: Bool)) :*: (S1 ('MetaSel ('Just "_rvfiHalt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("halt" ::: Bool)) :*: S1 ('MetaSel ('Just "_rvfiIntr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("intr" ::: Bool))))) :*: ((S1 ('MetaSel ('Just "_rvfiMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mode" ::: BitVector 2)) :*: (S1 ('MetaSel ('Just "_rvfiIxl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("ixl" ::: BitVector 2)) :*: S1 ('MetaSel ('Just "_rvfiRs1Addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rs1_addr" ::: Unsigned 5)))) :*: ((S1 ('MetaSel ('Just "_rvfiRs2Addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rs2_addr" ::: Unsigned 5)) :*: S1 ('MetaSel ('Just "_rvfiRs1Data") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rs1_rdata" ::: BitVector 32))) :*: (S1 ('MetaSel ('Just "_rvfiRs2Data") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rs2_rdata" ::: BitVector 32)) :*: S1 ('MetaSel ('Just "_rvfiRdAddr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rd_addr" ::: Unsigned 5)))))) :*: (((S1 ('MetaSel ('Just "_rvfiRdWData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("rd_wdata" ::: BitVector 32)) :*: (S1 ('MetaSel ('Just "_rvfiPcRData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("pc_rdata" ::: BitVector 32)) :*: S1 ('MetaSel ('Just "_rvfiPcWData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("pc_wdata" ::: BitVector 32)))) :*: (S1 ('MetaSel ('Just "_rvfiMemAddr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mem_addr" ::: BitVector 32)) :*: (S1 ('MetaSel ('Just "_rvfiMemRMask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mem_rmask" ::: BitVector 4)) :*: S1 ('MetaSel ('Just "_rvfiMemWMask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mem_wmask" ::: BitVector 4))))) :*: ((S1 ('MetaSel ('Just "_rvfiMemRData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mem_rdata" ::: BitVector 32)) :*: (S1 ('MetaSel ('Just "_rvfiMemWData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("mem_wdata" ::: BitVector 32)) :*: S1 ('MetaSel ('Just "_rvfiCsrMinstret") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("csr_minstret" ::: RvfiCsr 64)))) :*: ((S1 ('MetaSel ('Just "_rvfiCsrMcycle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("csr_mcycle" ::: RvfiCsr 64)) :*: S1 ('MetaSel ('Just "_rvfiCsrMscratch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("csr_mscratch" ::: RvfiCsr 32))) :*: (S1 ('MetaSel ('Just "_rvfiCsrMstatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("csr_mstatus" ::: RvfiCsr 32)) :*: S1 ('MetaSel ('Just "_rvfiCsrMisa") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ("csr_misa" ::: RvfiCsr 32))))))))

rvfiRs2Data :: Lens' Rvfi ((:::) "rs2_rdata" (BitVector 32)) Source #

rvfiRs1Data :: Lens' Rvfi ((:::) "rs1_rdata" (BitVector 32)) Source #

rvfiMemWData :: Lens' Rvfi ((:::) "mem_wdata" (BitVector 32)) Source #

rvfiMemRData :: Lens' Rvfi ((:::) "mem_rdata" (BitVector 32)) Source #

rvfiCsrMstatus :: Lens' Rvfi ((:::) "csr_mstatus" (RvfiCsr 32)) Source #

rvfiCsrMscratch :: Lens' Rvfi ((:::) "csr_mscratch" (RvfiCsr 32)) Source #

rvfiCsrMisa :: Lens' Rvfi ((:::) "csr_misa" (RvfiCsr 32)) Source #

rvfiCsrMinstret :: Lens' Rvfi ((:::) "csr_minstret" (RvfiCsr 64)) Source #

rvfiCsrMcycle :: Lens' Rvfi ((:::) "csr_mcycle" (RvfiCsr 64)) Source #

fromRvfi :: First Rvfi -> Rvfi Source #

Unwrap Rvfi from First monoid

mkRvfi :: Rvfi Source #

Construct the RISC-V Formal Interface