Packages

t

spinal.core

IODirection

sealed trait IODirection extends BaseTypeFactory

Declare ports

A port is some Data with a direction, which can be in, out or inout.

There are 4 available syntaxes, which are all equivalent:

val braces = in(Vec(Bool, 5))

val short = in Vec (Bool, 5)

val spaceful = in port Vec(Bool, 5)

val variadic = Vec(Bool, 5)
in(variadic)

The "braces" syntax is short and generic, but it uses braces.

The "short" syntax is short, but it is formatted with a space between the type and its parameters, and it can be used only with:

  • Bool
  • Bits
  • UInt
  • SInt
  • Vec

The "spaceful" syntax is generic and beatiful, but more verbose.

The "variadic" syntax can be used with any number of ports, but can be used only if the ports types are already declared.

See also

in out inout

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IODirection
  2. BaseTypeFactory
  3. UFixFactory
  4. SFixFactory
  5. TypeFactory
  6. VecFactory
  7. SIntFactory
  8. UIntFactory
  9. BitsFactory
  10. BoolFactory
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class VecBuilder extends AnyRef
    Definition Classes
    VecFactory

Abstract Value Members

  1. abstract def applyIt[T <: Data](data: T): T
    Annotations
    @deprecated
    Deprecated

    Use apply or port instead: val b = in Bool () or val rgb = out port Rgb

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def Bits(u: Unit = ()): Bits

    Create a new Bits

    Create a new Bits

    Definition Classes
    IODirectionBitsFactory
  5. def Bits(width: BitCount): Bits

    Create a new Bits of a given width

    Create a new Bits of a given width

    Definition Classes
    BitsFactory
  6. def Bool(u: Unit = ()): Bool

    Declare a port without braces, short syntax

    Declare a port without braces, short syntax

    See IODirection for other syntaxes.

    Definition Classes
    IODirectionBoolFactory
  7. def Bool(value: Boolean)(implicit loc: Location): Bool

    Create a new Bool with a value

    Create a new Bool with a value

    Definition Classes
    BoolFactory
  8. def SFix(peak: ExpNumber, resolution: ExpNumber): SFix
    Definition Classes
    SFixFactory
  9. def SFix(peak: ExpNumber, width: BitCount): SFix
    Definition Classes
    SFixFactory
  10. def SInt(u: Unit = ()): SInt

    Create a new SInt

    Create a new SInt

    Definition Classes
    IODirectionSIntFactory
  11. def SInt(width: BitCount): SInt

    Create a new SInt of a given width

    Create a new SInt of a given width

    Definition Classes
    SIntFactory
  12. def UFix(peak: ExpNumber, resolution: ExpNumber): UFix
    Definition Classes
    UFixFactory
  13. def UFix(peak: ExpNumber, width: BitCount): UFix
    Definition Classes
    UFixFactory
  14. def UInt(u: Unit = ()): UInt

    Create a new UInt

    Create a new UInt

    Definition Classes
    IODirectionUIntFactory
  15. def UInt(width: BitCount): UInt

    Create a new UInt of a given width

    Create a new UInt of a given width

    Definition Classes
    UIntFactory
  16. def Vec[T <: Data](elements: TraversableOnce[T], dataType: HardType[T] = null): Vec[T]
    Definition Classes
    IODirectionVecFactory
  17. def Vec[T <: Data](firstElement: T, followingElements: T*): Vec[T]
    Definition Classes
    VecFactory
  18. def Vec[T <: Data](gen: HardType[T], size: Int): Vec[T]
    Definition Classes
    VecFactory
  19. def Vec[T <: Data](gen: ⇒ T, size: Int): Vec[T]
    Definition Classes
    VecFactory
  20. val Vec: VecBuilder
    Definition Classes
    VecFactory
  21. def apply[T <: Data](datas: T*): Unit

    Declare existing Data as ports, "variadic" syntax

  22. def apply(senum: SpinalEnum): SpinalEnumCraft[senum.type]

    Declare a SpinalEnum port with braces

    Declare a SpinalEnum port with braces

    See IODirection for other syntaxes.

  23. def apply[T <: Data](data: HardType[T]): T

    Declare a port with braces

    Declare a port with braces

    See IODirection for other syntaxes.

  24. def apply[T <: Data](data: T): T

    Declare a port with braces

    Declare a port with braces

    See IODirection for other syntaxes.

  25. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  26. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  27. def cloneOf[T <: Data](that: T): T

    Declare port with same type as that

  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  36. def port(senum: SpinalEnum): SpinalEnumCraft[senum.type]

    Declare a SpinalEnum port without braces, spaceful syntax

    Declare a SpinalEnum port without braces, spaceful syntax

    See IODirection for other syntax.

  37. def port[T <: Data](data: HardType[T]): T

    Declare a port without braces, spaceful syntax

    Declare a port without braces, spaceful syntax

    See IODirection for other syntax.

  38. def port[T <: Data](data: T): T

    Declare a port without braces, spaceful syntax

    Declare a port without braces, spaceful syntax

    See IODirection for other syntax.

  39. def postTypeFactory[T <: Data](that: T): T
    Definition Classes
    IODirectionTypeFactory
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def Bool: Bool
    Definition Classes
    BoolFactory
    Annotations
    @deprecated
    Deprecated

    Use Bool() (with braces) instead

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from BaseTypeFactory

Inherited from UFixFactory

Inherited from SFixFactory

Inherited from TypeFactory

Inherited from VecFactory

Inherited from SIntFactory

Inherited from UIntFactory

Inherited from BitsFactory

Inherited from BoolFactory

Inherited from AnyRef

Inherited from Any

Ungrouped