You're reading an old version of this documentation.
For the latest stable release version, please have a look at master.



The ReadableOpenDrain bundle is defined as following :

case class ReadableOpenDrain[T<: Data](dataType : HardType[T]) extends Bundle with IMasterSlave{
  val write,read : T = dataType()

  override def asMaster(): Unit = {

Then, as a master, you can use the read signal to read the outside value and use the write to set the value that you want to drive on the output.

There is an example of usage :

val io = new Bundle{
  val dataBus = master(ReadableOpenDrain(Bits(32 bits)))

io.dataBus.write := 0x12345678
when( === 42){