Frontend.scala 649 字节
Newer Older
1 2 3 4 5 6
package xiangshan.frontend

import chisel3._
import chisel3.util._
import utils.PipelineConnect
import xiangshan._
L
LinJiawei 已提交
7
import xiangshan.utils.XSInfo
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

class Frontend extends XSModule {
  val io = IO(new Bundle() {
    val backend = new FrontendToBackendIO
  })

  val fakeIFU = Module(new FakeIFU)
  val ibuffer=  Module(new Ibuffer)

  fakeIFU.io.redirect := io.backend.redirect

  ibuffer.io.in <> fakeIFU.io.fetchPacket
  ibuffer.io.flush := io.backend.redirect.valid

  io.backend.cfVec <> ibuffer.io.out
L
LinJiawei 已提交
23 24 25 26 27 28 29

  for(out <- ibuffer.io.out){
    XSInfo(out.fire(),
      p"inst:${Hexadecimal(out.bits.instr)} pc:${Hexadecimal(out.bits.pc)}\n"
    )
  }

30
}