1
0

ahb: make hreadyout fuzzing a sram parameter

This commit is contained in:
Henry Cook 2017-04-25 11:10:19 -07:00
parent ca435c2f40
commit 60d71efa36

View File

@ -7,7 +7,7 @@ import config._
import diplomacy._
import util._
class AHBRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4)(implicit p: Parameters) extends LazyModule
class AHBRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4, fuzzHreadyout: Boolean = false)(implicit p: Parameters) extends LazyModule
{
val node = AHBSlaveNode(Seq(AHBSlavePortParameters(
Seq(AHBSlaveParameters(
@ -95,7 +95,7 @@ class AHBRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4
when (a_request) { d_request := Bool(true) }
// Finally, the outputs
in.hreadyout := !d_request || LFSR16(Bool(true))(0) // Bool(true)
in.hreadyout := (if(fuzzHreadyout) { !d_request || LFSR16(Bool(true))(0) } else { Bool(true) })
in.hresp := AHBParameters.RESP_OKAY
in.hrdata := Mux(in.hreadyout, muxdata.asUInt, UInt(0))
}