refactor NASTI to not use param
This commit is contained in:
parent
19656e4abe
commit
69a4dd0a79
@ -10,6 +10,7 @@ import scala.math._
|
|||||||
case object NTLBEntries extends Field[Int]
|
case object NTLBEntries extends Field[Int]
|
||||||
|
|
||||||
abstract trait TLBParameters extends CoreParameters {
|
abstract trait TLBParameters extends CoreParameters {
|
||||||
|
val addrMap = new AddrHashMap(params(NastiAddrMap))
|
||||||
val entries = params(NTLBEntries)
|
val entries = params(NTLBEntries)
|
||||||
val camAddrBits = ceil(log(entries)/log(2)).toInt
|
val camAddrBits = ceil(log(entries)/log(2)).toInt
|
||||||
val camTagBits = asIdBits + vpnBits
|
val camTagBits = asIdBits + vpnBits
|
||||||
@ -167,7 +168,6 @@ class TLB extends TLBModule {
|
|||||||
plru.access(OHToUInt(tag_cam.io.hits))
|
plru.access(OHToUInt(tag_cam.io.hits))
|
||||||
}
|
}
|
||||||
|
|
||||||
val addrMap = params(NASTIAddrHashMap)
|
|
||||||
val paddr = Cat(io.resp.ppn, UInt(0, pgIdxBits))
|
val paddr = Cat(io.resp.ppn, UInt(0, pgIdxBits))
|
||||||
val addr_ok = addrMap.isValid(paddr)
|
val addr_ok = addrMap.isValid(paddr)
|
||||||
val addr_prot = addrMap.getProt(paddr)
|
val addr_prot = addrMap.getProt(paddr)
|
||||||
|
Loading…
Reference in New Issue
Block a user