Skip to content

Commit

Permalink
Boot linux, run init
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohan Hu committed Nov 24, 2020
1 parent a6fb2ed commit ed017d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/scala/core/decode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class Decode extends Module {
IMM_ZEXT -> extractImm(new CSRIInstruction),
IMM_ZERO -> 0.U
))
io.decode2Exe.instValid := ((inst_valid | (io.exceptionInfoIF.valid & io.exceptionInfoIF.cause === ExceptionNo.instrPageFault.U) ) & io.instBundleIn.instValid)
val unknownInst = ~inst_valid & io.instBundleIn.instValid & ~(io.exceptionInfoIF.valid & io.exceptionInfoIF.cause === ExceptionNo.instrPageFault.U) // Not a pagefault, real unknown
io.decode2Exe.instValid := io.instBundleIn.instValid
io.decode2Exe.BrType := br_Type
io.decode2Exe.R1ren := rs1Ren
io.decode2Exe.R2ren := rs2Ren
Expand Down Expand Up @@ -231,6 +232,10 @@ class Decode extends Module {

when(!io.exceptionInfoIF.valid && io.instBundleIn.instValid) {
exceptionInfo.tval := io.instBundleIn.inst
when(unknownInst) {
exceptionInfo.valid := true.B
exceptionInfo.cause := ExceptionNo.illegalInstr.U
}
// TODO: Illegal instruction on xRET when x > privMode
// Illegal Inst (CSR false priv)
when(io.decodePrivCheck.illegalInst) {
Expand Down

0 comments on commit ed017d3

Please sign in to comment.