提交 38756391 编写于 作者: J jinyue110

IFU: add MMIO parameters

上级 8d5c1047
......@@ -59,11 +59,13 @@ trait HasFrontEndExceptionNo {
abstract class ICacheBundle extends XSBundle
with HasICacheParameters
with HasInstrMMIOConst
abstract class ICacheModule extends XSModule
with HasICacheParameters
with ICacheBase
with HasFrontEndExceptionNo
with HasInstrMMIOConst
abstract class ICacheArray extends XSModule
with HasICacheParameters
......
......@@ -9,6 +9,13 @@ import xiangshan.cache._
import chisel3.experimental.chiselName
import freechips.rocketchip.tile.HasLazyRoCC
trait HasInstrMMIOConst extends HasXSParameter{
def mmioBusWidth = 64
def mmioBusBytes = mmioBusWidth /8
def mmioBeats = FetchWidth * 4 / mmioBusWidth
def mmioMask = VecInit(List.fill(PredictWidth)(true.B)).asUInt
}
trait HasIFUConst extends HasXSParameter {
val resetVector = 0x80000000L//TODO: set reset vec
def align(pc: UInt, bytes: Int): UInt = Cat(pc(VAddrBits-1, log2Ceil(bytes)), 0.U(log2Ceil(bytes).W))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册