From 7bcf28c5853484687828c74ecd9e0750aee8429b Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 29 Sep 2017 12:31:26 -0700 Subject: [PATCH] Define fetchBytes in HasCoreParams, not Frontend It is more generally useful. --- src/main/scala/rocket/Frontend.scala | 1 - src/main/scala/tile/Core.scala | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/rocket/Frontend.scala b/src/main/scala/rocket/Frontend.scala index 7319e7ea..408088c3 100644 --- a/src/main/scala/rocket/Frontend.scala +++ b/src/main/scala/rocket/Frontend.scala @@ -75,7 +75,6 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer) val icache = outer.icache.module require(fetchWidth*coreInstBytes == outer.icacheParams.fetchBytes) - val fetchBytes = coreInstBytes * fetchWidth val tlb = Module(new TLB(true, log2Ceil(fetchBytes), nTLBEntries)) val fq = withReset(reset || io.cpu.req.valid) { Module(new ShiftQueue(new FrontendResp, 5, flow = true)) } diff --git a/src/main/scala/tile/Core.scala b/src/main/scala/tile/Core.scala index a914d6ef..26e20647 100644 --- a/src/main/scala/tile/Core.scala +++ b/src/main/scala/tile/Core.scala @@ -54,6 +54,7 @@ trait HasCoreParameters extends HasTileParameters { val fetchWidth = coreParams.fetchWidth val decodeWidth = coreParams.decodeWidth + val fetchBytes = coreParams.fetchBytes val coreInstBits = coreParams.instBits val coreInstBytes = coreInstBits/8 val coreDataBits = xLen max fLen