initial support for exceptions
This commit is contained in:
parent
5552ad3d4a
commit
88ec010f98
9 changed files with 116 additions and 42 deletions
|
@ -12,7 +12,7 @@ import Data.Maybe (listToMaybe)
|
|||
import Data.List (isPrefixOf)
|
||||
import Text.Show.Pretty (ppShow)
|
||||
|
||||
import Simulation (simulation, Args(..), Simulation(..))
|
||||
import Simulation (simulation, Args(..), Simulation(..), RISCVCPU(..), Machine(..))
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
|
@ -23,7 +23,7 @@ main = do
|
|||
case simResult of
|
||||
Success states -> do
|
||||
-- mapM_ (putStrLn . ppShow) states -- Uncomment to print each state, if needed.
|
||||
putStrLn $ "Last state: " ++ show (last states)
|
||||
putStrLn $ "GPR last state: " ++ (show $ gpr $ cpu $ last states)
|
||||
putStrLn $ "Executed for " ++ show (length states) ++ " cycles"
|
||||
putStrLn "Simulation complete"
|
||||
Failure err -> do
|
||||
|
|
Reference in a new issue