Commit 1de898c4 authored by Jens Korinth's avatar Jens Korinth
Browse files

Fix compilation issues in ProgrammableMaster

parent 72ee604c
......@@ -36,3 +36,4 @@ lazy val root = (project in file(".")).dependsOn(packaging, miscutils, miscutils
cleanFiles += (baseDirectory.value / "test")
aggregate in test := false
......@@ -24,7 +24,7 @@ class ProgrammableMaster(action: Seq[MasterAction])
val w_resp = Decoupled(UInt(2.W))
})
val cnt = Reg(UInt(log2Ceil(action.length + 1).W)) // current action; last value indicates completion
val cnt = RegInit(UInt(log2Ceil(action.length + 1).W), init = 0.U) // current action; last value indicates completion
val s_addr :: s_wtransfer :: s_rtransfer :: s_response :: s_idle :: Nil = Enum(5)
val state = RegInit(s_addr)
val w_data = Reg(UInt(axi.dataWidth))
......@@ -50,10 +50,6 @@ class ProgrammableMaster(action: Seq[MasterAction])
io.finished := cnt === action.length.U
when (reset) {
cnt := 0.U
}
.otherwise {
// always assign address from current action
for (i <- 0 until action.length) {
when (i.U === cnt) {
......@@ -97,6 +93,5 @@ class ProgrammableMaster(action: Seq[MasterAction])
}
when (state === s_response && io.maxi.writeResp.valid) { state := s_addr }
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment