1
0

Fixed front-end to support four-wide fetch.

This commit is contained in:
Christopher Celio 2015-04-10 17:53:47 -07:00
parent 9ade0e41cc
commit 11dbd4221a

View File

@ -114,8 +114,13 @@ class Frontend(btb_updates_out_of_order: Boolean = false) extends FrontendModule
io.cpu.resp.valid := s2_valid && (s2_xcpt_if || icache.io.resp.valid) io.cpu.resp.valid := s2_valid && (s2_xcpt_if || icache.io.resp.valid)
io.cpu.resp.bits.pc := s2_pc io.cpu.resp.bits.pc := s2_pc
var fetch_data:Bits = null
val fetch_data = icache.io.resp.bits.datablock >> (s2_pc(log2Up(rowBytes)-1,log2Up(coreFetchWidth*coreInstBytes)) << log2Up(coreFetchWidth*coreInstBits)) require (coreFetchWidth <= 4)
if (coreFetchWidth == 4) {
fetch_data = icache.io.resp.bits.datablock
} else {
fetch_data = icache.io.resp.bits.datablock >> (s2_pc(log2Up(rowBytes)-1,log2Up(coreFetchWidth*coreInstBytes)) << log2Up(coreFetchWidth*coreInstBits))
}
for (i <- 0 until coreFetchWidth) { for (i <- 0 until coreFetchWidth) {
io.cpu.resp.bits.data(i) := fetch_data(i*coreInstBits+coreInstBits-1, i*coreInstBits) io.cpu.resp.bits.data(i) := fetch_data(i*coreInstBits+coreInstBits-1, i*coreInstBits)
} }