use named constants to set AXI resp, cache, and prot fields
This commit is contained in:
@ -5,6 +5,7 @@ package rocketchip
|
||||
import Chisel._
|
||||
import cde.{Parameters, Field}
|
||||
import junctions._
|
||||
import junctions.NastiConstants._
|
||||
import uncore.tilelink._
|
||||
import uncore.tilelink2.{LazyModule, LazyModuleImp}
|
||||
import uncore.converters._
|
||||
@ -165,8 +166,8 @@ trait PeripheryMasterMemModule extends HasPeripheryParameters {
|
||||
// Abuse the fact that zip takes the shorter of the two lists
|
||||
((io.mem_axi zip coreplex.io.master.mem) zipWithIndex) foreach { case ((axi, mem), idx) =>
|
||||
val axi_sync = PeripheryUtils.convertTLtoAXI(mem)(outermostParams)
|
||||
axi_sync.ar.bits.cache := UInt("b0011")
|
||||
axi_sync.aw.bits.cache := UInt("b0011")
|
||||
axi_sync.ar.bits.cache := CACHE_NORMAL_NOCACHE_BUF
|
||||
axi_sync.aw.bits.cache := CACHE_NORMAL_NOCACHE_BUF
|
||||
axi <> (
|
||||
if (!p(AsyncMemChannels)) axi_sync
|
||||
else AsyncNastiTo(io.mem_clk.get(idx), io.mem_rst.get(idx), axi_sync)
|
||||
|
@ -6,6 +6,7 @@ import Chisel._
|
||||
import cde.{Parameters, Field}
|
||||
import rocket.Util._
|
||||
import junctions._
|
||||
import junctions.NastiConstants._
|
||||
|
||||
case object BuildExampleTop extends Field[Parameters => ExampleTop]
|
||||
case object SimMemLatency extends Field[Int]
|
||||
@ -117,12 +118,12 @@ class SimAXIMem(size: BigInt)(implicit p: Parameters) extends NastiModule()(p) {
|
||||
|
||||
io.axi.b.valid := bValid
|
||||
io.axi.b.bits.id := aw.id
|
||||
io.axi.b.bits.resp := UInt(0)
|
||||
io.axi.b.bits.resp := RESP_OKAY
|
||||
|
||||
io.axi.r.valid := rValid
|
||||
io.axi.r.bits.id := ar.id
|
||||
io.axi.r.bits.data := mem((ar.addr >> log2Ceil(nastiXDataBits/8))(log2Ceil(depth)-1, 0))
|
||||
io.axi.r.bits.resp := UInt(0)
|
||||
io.axi.r.bits.resp := RESP_OKAY
|
||||
io.axi.r.bits.last := ar.len === UInt(0)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user