1
0
This commit is contained in:
Andrew Waterman 2016-09-14 11:47:10 -07:00
parent c3ddff809b
commit 5828e6042e

View File

@ -521,10 +521,8 @@ class HastiTestSRAM(depth: Int)(implicit p: Parameters) extends HastiModule()(p)
// In case we are stalled, we need to hold the read data // In case we are stalled, we need to hold the read data
val d_rdata = holdUnless(mem.read(a_address, read), RegNext(read)) val d_rdata = holdUnless(mem.read(a_address, read), RegNext(read))
// Whenever the port is not needed for reading, execute pending writes // Whenever the port is not needed for reading, execute pending writes
when (!read) { when (!read && p_valid) { mem.write(p_address, p_wdata, p_mask.toBools) }
when (p_valid) { mem.write(p_address, p_wdata, p_mask.toBools) } when (!read) { p_valid := Bool(false) }
p_valid := Bool(false)
}
// Record the request for later? // Record the request for later?
when (ready && a_request && a_write) { when (ready && a_request && a_write) {