src/dev/pl031.bend checks
raw source on the hub · import 0x639131b76babbe4fca33020574c2b0dd/src/dev/pl031.bend as Pl031
1 import
import Base
Types
type Pl031 source · line 21 · raw
Data
Pl031@offset:U32 -> @mr:U32 -> @lr:U32 -> @imsc:U32 -> @ris:U32 -> Pl031
Definitions
def Pl031.new source · line 24 · raw
Pl031
def Pl031.pick source · line 32 · raw
@b:Bool -> @x:U32 -> @y:U32 -> U32
x when b holds, else y.
def Pl031.latch source · line 41 · raw
@+r:U32 -> @+mr:U32 -> @dr:U32 -> U32
The latch after time reaches dr: an armed alarm matches once dr >= mr while mr != 0; a matched or acknowledged one stays as it is.
def Pl031.sync source · line 46 · raw
@s:Pl031 -> @+now:U32 -> Pl031
The state at host time now: the alarm latched if DR has reached MR.
def Pl031.ris source · line 52 · raw
@r:U32 -> U32
RIS bit 0 of a latch.
def Pl031.rearm source · line 56 · raw
@+r:U32 -> U32
A write to MR or LR arms an acknowledged alarm again.
def Pl031.ack source · line 60 · raw
@+r:U32 -> @v:U32 -> U32
ICR: bit 0 acknowledges a matched alarm; an armed one stays armed.
def Pl031.set source · line 64 · raw
@+off:U32 -> @k:U32 -> @v:U32 -> @old:U32 -> U32
A register write: v at offset k, else the old value.
def Pl031.id source · line 68 · raw
@+off:U32 -> U32
PeriphID0..3 and PCellID0..3; 0 elsewhere.
def Pl031.peek source · line 78 · raw
@s:Pl031 -> @+off:U32 -> @now:U32 -> U32
A register read of a synced state.
def Pl031.poke source · line 90 · raw
@s:Pl031 -> @+off:U32 -> @+v:U32 -> @+now:U32 -> Pl031
A register write to a synced state.
def Pl031.read source · line 103 · raw
@s:Pl031 -> @off:U32 -> @now:U32 -> Pair(Pl031, U32)
def Pl031.write source · line 108 · raw
@s:Pl031 -> @off:U32 -> @v:U32 -> @now:U32 -> Pl031
def Pl031.irq source · line 113 · raw
@s:Pl031 -> @now:U32 -> Bool
The alarm line: MIS is non-zero at time now (a match latches RIS).