1
0

upgrade to new rocket/vu memory interface, fix amo nack bug in hellacache

This commit is contained in:
Yunsup Lee 2012-02-26 23:46:51 -08:00
parent 6e706c7c74
commit bfd0ae125e
5 changed files with 25 additions and 18 deletions

View File

@ -191,27 +191,32 @@ class rocketProc(resetSignal: Bool = null) extends Component(resetSignal)
vu.io.cpu_exception.exception := dpath.io.vec_iface.exception vu.io.cpu_exception.exception := dpath.io.vec_iface.exception
// hooking up vector memory interface // hooking up vector memory interface
//arb.io.requestor(2) <> vu.io.dmem_req val storegen = new StoreDataGen
/*ctrl.io.ext_mem.req_val := vu.io.dmem_req.valid storegen.io.typ := vu.io.dmem_req.bits.typ
ctrl.io.ext_mem.req_cmd := vu.io.dmem_req.bits.cmd storegen.io.din := vu.io.dmem_req.bits.data
ctrl.io.ext_mem.req_type := vu.io.dmem_req.bits.typ
dpath.io.ext_mem.req_val := vu.io.dmem_req.valid arb.io.requestor(2).req_val := vu.io.dmem_req.valid
dpath.io.ext_mem.req_idx := vu.io.dmem_req.bits.idx arb.io.requestor(2).req_kill := Reg(vu.io.dmem_req.bits.kill)
dpath.io.ext_mem.req_ppn := vu.io.dmem_req.bits.ppn arb.io.requestor(2).req_cmd := vu.io.dmem_req.bits.cmd
dpath.io.ext_mem.req_data := vu.io.dmem_req.bits.data arb.io.requestor(2).req_type := vu.io.dmem_req.bits.typ
dpath.io.ext_mem.req_tag := vu.io.dmem_req.bits.tag arb.io.requestor(2).req_idx := vu.io.dmem_req.bits.idx
arb.io.requestor(2).req_ppn := Reg(vu.io.dmem_req.bits.ppn)
arb.io.requestor(2).req_data := Reg(storegen.io.dout)
arb.io.requestor(2).req_tag := vu.io.dmem_req.bits.tag
vu.io.dmem_resp.valid := dpath.io.ext_mem.resp_val vu.io.dmem_resp.valid := Reg(arb.io.requestor(2).resp_val)
vu.io.dmem_resp.bits.nack := ctrl.io.ext_mem.resp_nack // the vu doesn't look at the ready signal, it's simply a nack
vu.io.dmem_resp.bits.data := dpath.io.ext_mem.resp_data // but should be delayed one cycle to match the nack semantics
vu.io.dmem_resp.bits.tag := dpath.io.ext_mem.resp_tag vu.io.dmem_resp.bits.nack := arb.io.requestor(2).resp_nack || Reg(!arb.io.requestor(2).req_rdy)
vu.io.dmem_resp.bits.typ := dpath.io.ext_mem.resp_type*/ vu.io.dmem_resp.bits.data := arb.io.requestor(2).resp_data_subword
vu.io.dmem_resp.bits.tag := Reg(arb.io.requestor(2).resp_tag)
vu.io.dmem_resp.bits.typ := Reg(arb.io.requestor(2).resp_type)
// share vector integer multiplier with rocket // share vector integer multiplier with rocket
dpath.io.vec_imul_req <> vu.io.cp_imul_req dpath.io.vec_imul_req <> vu.io.cp_imul_req
dpath.io.vec_imul_resp <> vu.io.cp_imul_resp dpath.io.vec_imul_resp <> vu.io.cp_imul_resp
// share sfma and dfma pipelines with rocket
fpu.io.sfma <> vu.io.cp_sfma fpu.io.sfma <> vu.io.cp_sfma
fpu.io.dfma <> vu.io.cp_dfma fpu.io.dfma <> vu.io.cp_dfma
} }

View File

@ -19,7 +19,7 @@ class ioDpathAll extends Bundle()
val ctrl = new ioCtrlDpath().flip(); val ctrl = new ioCtrlDpath().flip();
val debug = new ioDebug(); val debug = new ioDebug();
val dmem = new ioDmem(List("req_idx", "req_tag", "req_data", "resp_val", "resp_miss", "resp_replay", "resp_type", "resp_tag", "resp_data", "resp_data_subword")).flip(); val dmem = new ioDmem(List("req_idx", "req_tag", "req_data", "resp_val", "resp_miss", "resp_replay", "resp_type", "resp_tag", "resp_data", "resp_data_subword")).flip();
val dtlb = new ioDTLB_CPU_req_bundle(List("vpn")) val dtlb = new ioDTLB_CPU_req_bundle().asOutput()
val imem = new ioDpathImem(); val imem = new ioDpathImem();
val ptbr_wen = Bool(OUTPUT); val ptbr_wen = Bool(OUTPUT);
val ptbr = UFix(PADDR_BITS, OUTPUT); val ptbr = UFix(PADDR_BITS, OUTPUT);

View File

@ -9,7 +9,7 @@ import hwacha._
// ioDTLB_CPU also located in hwacha/src/vuVXU-Interface.scala // ioDTLB_CPU also located in hwacha/src/vuVXU-Interface.scala
// should keep them in sync // should keep them in sync
class ioDTLB_CPU_req_bundle(view: List[String] = null) extends Bundle(view) class ioDTLB_CPU_req_bundle extends Bundle
{ {
// lookup requests // lookup requests
val kill = Bool() val kill = Bool()

View File

@ -954,7 +954,7 @@ class HellaCacheUniproc extends HellaCache with ThreeStateIncoherence {
amoalu.io.lhs := loadgen.io.r_dout.toUFix amoalu.io.lhs := loadgen.io.r_dout.toUFix
amoalu.io.rhs := p_store_data.toUFix amoalu.io.rhs := p_store_data.toUFix
early_nack := early_tag_nack || early_load_nack || r_cpu_req_val_ && r_req_amo || replay_amo_val || r_replay_amo early_nack := early_tag_nack || early_load_nack || r_cpu_req_val && r_req_amo || replay_amo_val || r_replay_amo
// reset and flush unit // reset and flush unit
val flusher = new FlushUnit(lines) val flusher = new FlushUnit(lines)

View File

@ -55,8 +55,10 @@ class rocketDmemArbiter(n: Int) extends Component
for (i <- 0 until n) for (i <- 0 until n)
{ {
val tag_hit = io.dmem.resp_tag(log2up(n)-1,0) === UFix(i) val tag_hit = io.dmem.resp_tag(log2up(n)-1,0) === UFix(i)
io.requestor(i).resp_miss := io.dmem.resp_miss && tag_hit io.requestor(i).xcpt_ma_ld := io.dmem.xcpt_ma_ld && Reg(io.requestor(i).req_val)
io.requestor(i).xcpt_ma_st := io.dmem.xcpt_ma_st && Reg(io.requestor(i).req_val)
io.requestor(i).resp_nack := io.dmem.resp_nack && Reg(io.requestor(i).req_val) io.requestor(i).resp_nack := io.dmem.resp_nack && Reg(io.requestor(i).req_val)
io.requestor(i).resp_miss := io.dmem.resp_miss && tag_hit
io.requestor(i).resp_val := io.dmem.resp_val && tag_hit io.requestor(i).resp_val := io.dmem.resp_val && tag_hit
io.requestor(i).resp_replay := io.dmem.resp_replay && tag_hit io.requestor(i).resp_replay := io.dmem.resp_replay && tag_hit
io.requestor(i).resp_data := io.dmem.resp_data io.requestor(i).resp_data := io.dmem.resp_data