libriscv-0.1.0.0: A versatile, flexible and executable formal model for the RISC-V architecture.
Safe HaskellSafe-Inferred
LanguageHaskell2010

LibRISCV.Effects.Decoding.Language

Description

Implements an effect for instruction decoding. Specifically, the effect is only used to describe obtaining of instruction operands. The instruction opcode is determined seperatly using code generated from the existing riscv-opcodes tool. The decoding effect is stateful and operates on a current instruction word specified via setInstr, thereby avoiding the need to pass the current instruction word to every decoding function.

Documentation

data Decoding v r where Source #

Constructors

DecodeRS1 :: Decoding v v 
DecodeRS2 :: Decoding v v 
DecodeRD :: Decoding v v 
DecodeImmI :: Decoding v v 
DecodeImmS :: Decoding v v 
DecodeImmB :: Decoding v v 
DecodeImmU :: Decoding v v 
DecodeImmJ :: Decoding v v 
DecodeShamt :: Decoding v v 
SetInstr :: v -> Decoding v () 
WithInstrType :: Proxy v -> (InstructionType -> b) -> Decoding v b 

withInstrType :: forall v b. forall effs. Member (Decoding v) effs => Proxy v -> (InstructionType -> b) -> Eff effs b Source #

setInstr :: forall v. forall effs. Member (Decoding v) effs => v -> Eff effs () Source #

decodeShamt :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeImmJ :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeImmU :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeImmB :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeImmS :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeImmI :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeRD :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeRS2 :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #

decodeRS1 :: forall v. forall effs. Member (Decoding v) effs => Eff effs v Source #