Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 #
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 #