Chisel

Module

abstract class Module extends Nameable

A Module or block to logically divide a hardware design

Source
Module.scala
Example:
  1. class MyModule extends Module {
      val io = new Bundle {
        val dataIn = UInt(INPUT, 4)
        val dataOut = UInt(OUTPUT, 4)
      }
      io.dataOut := io.dataIn
    }
    val myInst = Module(new MyModule) // create a MyModule
Note

This is the same construct as module in verilog Also see Module object

Linear Supertypes
Nameable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Module
  2. Nameable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Module(_clock: Option[Clock] = scala.None, _reset: Option[Bool] = scala.None)

Type Members

  1. type neededWireWraps = HashMap[StackTraceElement, ArrayBuffer[Data]]

    verifyWireWrap (Chisel3) - verify assignment semantics (type-only nodes must be wire-wrapped)

    verifyWireWrap (Chisel3) - verify assignment semantics (type-only nodes must be wire-wrapped)

    returns

    - HashMap of source lines (and associated nodes) requiring Wire() wrapping.

Abstract Value Members

  1. abstract def io: Data

    the I/O for this module

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def <>(src: Module): Unit

    Connect io with matching names for two modules

  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. var _clock: Option[Clock]

  8. def addClock(clock: Clock): Unit

    Add a clock to the module

    Add a clock to the module

    clock

    the clock to add

  9. def addDefaultReset: Unit

    Add a default reset to the module

  10. def addModule[T <: Module](c: ⇒ T)(implicit p: Parameters = params): T

    Add a submodule to this module

  11. def addModule[T <: Module](c: ⇒ T, f: PartialFunction[Any, Any]): T

    Add a submodule to this module

  12. def addNode[T <: Node](node: T): T

  13. def addPin[T <: Data](pin: T, name: String = ""): T

    Add a pin with a name to the module

    Add a pin with a name to the module

    pin

    the I/O to add

    name

    A name for the pin

  14. def addResetPin(r: Bool): Bool

    returns

    the pin connected to the reset signal or creates a new one if no such pin exists

  15. def apply(name: String): Data

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def assert(cond: Bool, message: String): Unit

    Add an assertion in the code generated by a backend.

  18. def bfs(visit: (Node) ⇒ Unit): Unit

    A breadth first search of the graph of nodes

  19. val children: ArrayBuffer[Module]

  20. def clock: Clock

    returns

    the implied clock for this module

  21. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def debug(data: Aggregate): Unit

  23. def debug(x: Node): Unit

    Insures a backend does not remove a signal because it is unreachable from the outputs.

  24. def dfs(visit: (Node) ⇒ Unit): Unit

    A depth first search of the graph of nodes

  25. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def equals(that: Any): Boolean

    Definition Classes
    Module → AnyRef → Any
  27. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def findBinding(m: Node): Option[Binding]

    A method to trace the graph of nodes backwards looking at inputs

    A method to trace the graph of nodes backwards looking at inputs

    m

    Node to find bindings for

    returns

    nodes which have node m binded as their input

  29. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  30. def getPathName(separator: String = "_"): String

    separator

    The separator to use for the path name

    returns

    the absolute path to a component instance from toplevel

  31. def getPathName: String

    returns

    the absolute path to a component instance from toplevel

  32. val hashCode: Int

    Definition Classes
    Module → AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  34. var moduleName: String

    Name of the module this component generates (defaults to class name).

  35. var name: String

    Name of the instance.

    Name of the instance.

    Definition Classes
    Nameable
  36. var named: Boolean

    named is used to indicate that name was set explicitly and should not be overriden

    named is used to indicate that name was set explicitly and should not be overriden

    Definition Classes
    Nameable
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. def nextIndex: Int

  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. lazy val params: Parameters

  42. var parent: Module

  43. def printf(message: String, args: Node*): Unit

    Adds a printf to the module called each clock cycle

    Adds a printf to the module called each clock cycle

    message

    A c style sting to print out eg) %d, %x

    args

    Nodes whos data values should be printed

  44. def reset: Bool

    returns

    the implied reset for this module

  45. def setModuleName(n: String): Unit

    Set the declaration name of the module to be string 'n'

  46. def setName(n: String): Unit

    Set the name of this module to the string 'n'

    Set the name of this module to the string 'n'

    Definition Classes
    Nameable
    Example:
    1. my.io.node.setName("MY_IO_NODE")
  47. def stripComponent(s: String): String

  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  49. def toString(): String

    Definition Classes
    Module → AnyRef → Any
  50. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def wires: Array[(String, Bits)]

    Get the I/O names and connections

Inherited from Nameable

Inherited from AnyRef

Inherited from Any

Ungrouped