initial support for exceptions
This commit is contained in:
parent
5552ad3d4a
commit
88ec010f98
9 changed files with 116 additions and 42 deletions
34
hs/Exceptions.hs
Normal file
34
hs/Exceptions.hs
Normal file
|
@ -0,0 +1,34 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE NumericUnderscores #-}
|
||||
|
||||
module Exceptions() where
|
||||
|
||||
import Clash.Prelude
|
||||
|
||||
data Exception =
|
||||
SupervisorSoftwareInterrupt
|
||||
| MachineSoftwareInterrupt
|
||||
| SupervisorTimerInterrupt
|
||||
| MachineTimerInterrupt
|
||||
| SupervisorExternalInterrupt
|
||||
| MachineExternalInterrupt
|
||||
| CounterOverflowInterrupt
|
||||
| InstructionAddressMisaligned
|
||||
| InstructionAccessFault
|
||||
| IllegalInstruction
|
||||
| Breakpoint
|
||||
| LoadAddressMisaligned
|
||||
| LoadAccessFault
|
||||
| StoreAMOAddressMisaligned
|
||||
| StoreAMOAccessFault
|
||||
| EnvironmentCallFromUMode
|
||||
| EnvironmentCallFromSMode
|
||||
| EnvironmentCallFromMMode
|
||||
| InstructionPageFault
|
||||
| LoadPageFault
|
||||
| Reserved
|
||||
| StoreAMOPageFault
|
||||
| DoubleTrap
|
||||
| SoftwareCheck
|
||||
| HardwareError
|
||||
deriving (Generic, Show, Eq, NFDataX)
|
Reference in a new issue