Instantiate PTW unconditionally

This keeps the PMP datapaths intact.  The PTW itself will get optimized
away for the !usingVM case.
This commit is contained in:
Andrew Waterman committed 2017-03-24 16:39:52 -07:00
1 parent 30415215b8
commit 3f0d2fe826
3 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -205,6 +205,7 @@ trait CanHavePTW extends HasHellaCache {
trait CanHavePTWModule extends HasHellaCacheModule {
val outer: CanHavePTW
val ptwPorts = ListBuffer(outer.dcache.module.io.ptw)
val ptwOpt = if (outer.usingPTW) { Some(Module(new PTW(outer.nPTWPorts)(outer.dcache.node.edgesOut(0), outer.p))) } else None
ptwOpt foreach { ptw => dcachePorts += ptw.io.mem }
val ptw = Module(new PTW(outer.nPTWPorts)(outer.dcache.node.edgesOut(0), outer.p))
if (outer.usingPTW)
dcachePorts += ptw.io.mem
}