You're reading the documentation for a development version.
For the latest stable release version, please have a look at master.

Io bundle

Introduction

SpinalHDL will check that each io bundle contains only in/out/inout signals.

Example

The following code:

class TopLevel extends Component {
  val io = new Bundle {
    val a = UInt(8 bits)
  }
}

will throw:

IO BUNDLE ERROR : A direction less (toplevel/io_a :  UInt[8 bits]) signal was defined into toplevel component's io bundle
  ***
  Source file location of the toplevel/io_a definition via the stack trace
  ***

A fix could be:

class TopLevel extends Component {
  val io = new Bundle {
    val a = in UInt(8 bits)
  }
}

But if for meta hardware description reasons you really want io.a to be directionless, you can do:

class TopLevel extends Component {
  val io = new Bundle {
    val a = UInt(8 bits)
  }
  a.allowDirectionLessIo
}