1
0

tilelink2: Fuzzer should check address validity before injection

This commit is contained in:
Wesley W. Terpstra 2016-09-17 17:07:21 -07:00
parent b11839f5a1
commit 9817a00ed9

View File

@ -163,10 +163,12 @@ class TLFuzzer(
edge.Hint(src, addr, size, UInt(0)) edge.Hint(src, addr, size, UInt(0))
} else { (glegal, gbits) } } else { (glegal, gbits) }
val legal_dest = edge.manager.containsSafe(addr)
// Pick a specific message to try to send // Pick a specific message to try to send
val a_type_sel = noiseMaker(3, inc) val a_type_sel = noiseMaker(3, inc)
val legal = MuxLookup(a_type_sel, glegal, Seq( val legal = legal_dest && MuxLookup(a_type_sel, glegal, Seq(
UInt("b000") -> glegal, UInt("b000") -> glegal,
UInt("b001") -> pflegal, UInt("b001") -> pflegal,
UInt("b010") -> pplegal, UInt("b010") -> pplegal,