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

LibRISCV.Effects.Operations.Language

Description

Implements an effect for interactions with the architectural state, upon which instructions are executed (register file, memory, program counter, etc.).

Synopsis

Documentation

data Size Source #

Abstraction for expressing a 8-, 16-, or 32-bit size.

Constructors

Byte 
Half 
Word 

Instances

Instances details
Show Size Source # 
Instance details

Defined in LibRISCV.Effects.Operations.Language

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Eq Size Source # 
Instance details

Defined in LibRISCV.Effects.Operations.Language

Methods

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

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

bitSize :: Size -> Int Source #

Returns the size in bits (either 8, 16, or 32).

data Operations v r where Source #

Constructors

ReadRegister :: v -> Operations v v 
WriteRegister :: v -> v -> Operations v () 
Load :: Size -> v -> Operations v v 
Store :: Size -> v -> v -> Operations v () 
WritePC :: v -> Operations v () 
ReadPC :: Operations v v 
Exception :: v -> String -> Operations v () 
Ecall :: v -> Operations v () 
Ebreak :: v -> Operations v () 

ebreak :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs () Source #

ecall :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs () Source #

exception :: forall v. forall effs. Member (Operations v) effs => v -> String -> Eff effs () Source #

readPC :: forall v. forall effs. Member (Operations v) effs => Eff effs v Source #

writePC :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs () Source #

store :: forall v. forall effs. Member (Operations v) effs => Size -> v -> v -> Eff effs () Source #

load :: forall v. forall effs. Member (Operations v) effs => Size -> v -> Eff effs v Source #

writeRegister :: forall v. forall effs. Member (Operations v) effs => v -> v -> Eff effs () Source #

readRegister :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs v Source #