1
0

IOMSHR: support atomic operations

This commit is contained in:
Wesley W. Terpstra 2016-05-16 18:28:45 -07:00 committed by Andrew Waterman
parent 7bc38383de
commit e19c5e5d2c

View File

@ -208,8 +208,17 @@ class IOMSHR(id: Int)(implicit p: Parameters) extends L1HellaCacheModule()(p) {
wmask = beat_mask, wmask = beat_mask,
alloc = Bool(false)) alloc = Bool(false))
val putAtomic_acquire = PutAtomic(
client_xact_id = UInt(id),
addr_block = addr_block,
addr_beat = addr_beat,
addr_byte = addr_byte,
atomic_opcode = req.cmd,
operand_size = req.typ,
data = beat_data)
io.acquire.valid := (state === s_acquire) io.acquire.valid := (state === s_acquire)
io.acquire.bits := Mux(isRead(req.cmd), get_acquire, put_acquire) io.acquire.bits := Mux(isAMO(req.cmd), putAtomic_acquire, Mux(isRead(req.cmd), get_acquire, put_acquire))
io.replay_next := (state === s_grant) || io.resp.valid && !io.resp.ready io.replay_next := (state === s_grant) || io.resp.valid && !io.resp.ready
io.resp.valid := (state === s_resp) io.resp.valid := (state === s_resp)