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

LibRISCV.Effects.Decoding.Default.Interpreter

Description

Provides the default (concrete) interpretation for the decoding effect. This implementation assumes that the Decodable type class can be implemented for the underlying type parameter, that is, it must be possible to convert the type to a fixed-width concrete integer.

Synopsis

Documentation

type DecoderState = IORef Word32 Source #

Decoder state used to implement the stateful SetInstr constructor of the Decoding effect.

class Decodable a where Source #

Type class used to perform conversion from/to a fixed-with concrete integer.

Methods

fromWord :: Word32 -> a Source #

Convert from a fixed-with integer to the underlying value type of the interpreter.

toWord :: a -> Word32 Source #

Convert from the underlying value type to a fixed-with integer.

Instances

Instances details
Decodable BV Source # 
Instance details

Defined in LibRISCV.Effects.Decoding.Default.Interpreter

defaultDecoding :: forall v m. (Decodable v, MonadIO m) => DecoderState -> Decoding v ~> m Source #

Concrete implementation of the decoding effect.