1package xiangshan.frontend 2 3import chisel3._ 4import chisel3.util._ 5import utils.PipelineConnect 6import xiangshan._ 7import xiangshan.utils.XSInfo 8 9class Frontend extends XSModule { 10 val io = IO(new Bundle() { 11 val backend = new FrontendToBackendIO 12 }) 13 14 val fakeIFU = Module(new FakeIFU) 15 val ibuffer= Module(new Ibuffer) 16 17 fakeIFU.io.redirect := io.backend.redirect 18 19 ibuffer.io.in <> fakeIFU.io.fetchPacket 20 ibuffer.io.flush := io.backend.redirect.valid 21 22 io.backend.cfVec <> ibuffer.io.out 23 24 for(out <- ibuffer.io.out){ 25 XSInfo(out.fire(), 26 p"inst:${Hexadecimal(out.bits.instr)} pc:${Hexadecimal(out.bits.pc)}\n" 27 ) 28 } 29 30} 31