1
0

Slightly refactor TLBResp

This commit is contained in:
Henry Cook 2015-02-03 19:32:08 -08:00
parent 3d35ccd401
commit aa46b8b72d

View File

@ -76,23 +76,26 @@ class PseudoLRU(n: Int)
} }
} }
class TLBReq extends TLBBundle { class TLBReq extends CoreBundle {
val asid = UInt(width = asIdBits) val asid = UInt(width = asIdBits)
val vpn = UInt(width = vpnBits+1) val vpn = UInt(width = vpnBits+1)
val passthrough = Bool() val passthrough = Bool()
val instruction = Bool() val instruction = Bool()
} }
class TLBResp(cnt: Option[Int] = None) extends TLBBundle { class TLBRespNoHitIndex extends CoreBundle {
// lookup responses // lookup responses
val miss = Bool(OUTPUT) val miss = Bool(OUTPUT)
val hit_idx = UInt(OUTPUT, cnt.getOrElse(entries))
val ppn = UInt(OUTPUT, ppnBits) val ppn = UInt(OUTPUT, ppnBits)
val xcpt_ld = Bool(OUTPUT) val xcpt_ld = Bool(OUTPUT)
val xcpt_st = Bool(OUTPUT) val xcpt_st = Bool(OUTPUT)
val xcpt_if = Bool(OUTPUT) val xcpt_if = Bool(OUTPUT)
} }
class TLBResp extends TLBRespNoHitIndex with TLBParameters {
val hit_idx = UInt(OUTPUT, entries)
}
class TLB extends TLBModule { class TLB extends TLBModule {
val io = new Bundle { val io = new Bundle {
val req = Decoupled(new TLBReq).flip val req = Decoupled(new TLBReq).flip