Add plusarg option to disable fuzzing

This commit is contained in:
Sandeep Rajendran 2019-01-16 10:18:53 -08:00
parent 772a8a475d
commit 0b57334e18
1 changed files with 3 additions and 1 deletions

View File

@ -92,8 +92,10 @@ class AHBRAM(
when (in.hready) { d_request := Bool(false) }
when (a_request) { d_request := Bool(true) }
val disable_fuzzing = PlusArg("disable_fuzzing", default = 0, "1:Disabled 0:Enabled.")(0)
// Finally, the outputs
in.hreadyout := (if(fuzzHreadyout) { !d_request || LFSRNoiseMaker(1)(0) } else { Bool(true) })
in.hreadyout := Mux(disable_fuzzing, Bool(true), { if(fuzzHreadyout) { !d_request || LFSRNoiseMaker(1)(0) } else { Bool(true) }} )
in.hresp := Mux(d_legal || !in.hreadyout, AHBParameters.RESP_OKAY, AHBParameters.RESP_ERROR)
in.hrdata := Mux(in.hreadyout, muxdata.asUInt, UInt(0))
}