1
0

make sure SCR and PCR data width matches xLen

This commit is contained in:
Howard Mao 2015-09-25 12:13:22 -07:00
parent 0e67d824b4
commit 7b0167b92e
3 changed files with 8 additions and 5 deletions

View File

@ -31,6 +31,7 @@ class DefaultConfig extends ChiselConfig (
//HTIF Parameters //HTIF Parameters
case HTIFWidth => Dump("HTIF_WIDTH", 16) case HTIFWidth => Dump("HTIF_WIDTH", 16)
case HTIFNSCR => 64 case HTIFNSCR => 64
case HTIFSCRDataBits => site(XLen)
case HTIFOffsetBits => site(CacheBlockOffsetBits) case HTIFOffsetBits => site(CacheBlockOffsetBits)
case HTIFNCores => site(NTiles) case HTIFNCores => site(NTiles)
//Memory Parameters //Memory Parameters

View File

@ -41,6 +41,8 @@ trait TopLevelParameters extends UsesParameters {
val mifAddrBits = params(MIFAddrBits) val mifAddrBits = params(MIFAddrBits)
val mifDataBeats = params(MIFDataBeats) val mifDataBeats = params(MIFDataBeats)
val scrAddrBits = log2Up(params(HTIFNSCR)) val scrAddrBits = log2Up(params(HTIFNSCR))
val pcrAddrBits = 12
val xLen = params(XLen)
require(lsb + log2Up(nBanks) < mifAddrBits) require(lsb + log2Up(nBanks) < mifAddrBits)
} }
@ -190,8 +192,8 @@ class OuterMemorySystem extends Module with TopLevelParameters {
val mem = Vec(new NASTIIO, nMemChannels) val mem = Vec(new NASTIIO, nMemChannels)
val mem_backup = new MemSerializedIO(htifW) val mem_backup = new MemSerializedIO(htifW)
val mem_backup_en = Bool(INPUT) val mem_backup_en = Bool(INPUT)
val pcr = Vec(new SMIIO(64, 12), nTiles) val pcr = Vec(new SMIIO(xLen, pcrAddrBits), nTiles)
val scr = new SMIIO(64, scrAddrBits) val scr = new SMIIO(xLen, scrAddrBits)
val mmio = new NASTIIO val mmio = new NASTIIO
} }
@ -244,12 +246,12 @@ class OuterMemorySystem extends Module with TopLevelParameters {
for (i <- 0 until nTiles) { for (i <- 0 until nTiles) {
val csrName = s"conf:csr$i" val csrName = s"conf:csr$i"
val csrPort = addrMap(csrName).port val csrPort = addrMap(csrName).port
val conv = Module(new SMIIONASTIIOConverter(64, 12)) val conv = Module(new SMIIONASTIIOConverter(xLen, pcrAddrBits))
conv.io.nasti <> interconnect.io.slaves(csrPort) conv.io.nasti <> interconnect.io.slaves(csrPort)
io.pcr(i) <> conv.io.smi io.pcr(i) <> conv.io.smi
} }
val conv = Module(new SMIIONASTIIOConverter(64, scrAddrBits)) val conv = Module(new SMIIONASTIIOConverter(xLen, scrAddrBits))
conv.io.nasti <> interconnect.io.slaves(addrMap("conf:scr").port) conv.io.nasti <> interconnect.io.slaves(addrMap("conf:scr").port)
io.scr <> conv.io.smi io.scr <> conv.io.smi

2
uncore

@ -1 +1 @@
Subproject commit b6bb4e42127d1ed42b55ec8b859a4e074b347d47 Subproject commit 828051888358284c1c6dfd6d91f4468b2a603579