1
0
Fork 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
1 changed files with 3 additions and 1 deletions

View File

@ -163,10 +163,12 @@ class TLFuzzer(
edge.Hint(src, addr, size, UInt(0))
} else { (glegal, gbits) }
val legal_dest = edge.manager.containsSafe(addr)
// Pick a specific message to try to send
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("b001") -> pflegal,
UInt("b010") -> pplegal,