read seemingly complete
This commit is contained in:
parent
ad751a5039
commit
b95b2b962a
4 changed files with 82 additions and 39 deletions
|
@ -15,6 +15,7 @@ import Peripherals.Setup(setupPeripherals, InitializedPeripherals(..))
|
|||
import Peripherals.Teardown(teardownPeripherals)
|
||||
import Clash.Prelude
|
||||
import Bus(Peripherals(..))
|
||||
import Read(read)
|
||||
import Cpu(
|
||||
RISCVCPU(..),
|
||||
riscvCPUInit)
|
||||
|
@ -44,8 +45,8 @@ simulationLoop n machine = do
|
|||
let machinePeripherals = peripherals machine
|
||||
currPc = pc |> cpu machine
|
||||
fetchResult <- fetchInstruction machinePeripherals currPc
|
||||
let decodeResult = decode fetchResult
|
||||
putStrLn |> show decodeResult P.++ debugInsn fetchResult
|
||||
let decodeResult = Read.read (decode fetchResult) (cpu machine)
|
||||
putStrLn |> show decodeResult -- P.++ debugInsn fetchResult
|
||||
let pc' = currPc + 4
|
||||
cpu' = (cpu machine) { pc = pc' }
|
||||
machine' = machine { cpu = cpu' }
|
||||
|
|
Reference in a new issue