Class/Object

Chisel

Module

Related Docs: object Module | package Chisel

Permalink

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
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Module
  2. Nameable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Type Members

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

    Permalink

    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

    Permalink

    the I/O for this module

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink

    Connect io with matching names for two modules

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def IO[T <: Data](iodef: T): iodef.type

    Permalink
  6. var _clock: Option[Clock]

    Permalink
  7. def addClock(clock: Clock): Unit

    Permalink

    Add a clock to the module

    Add a clock to the module

    clock

    the clock to add

  8. def addDefaultReset: Unit

    Permalink

    Add a default reset to the module

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

    Permalink

    Add a submodule to this module

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

    Permalink

    Add a submodule to this module

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

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

    Permalink

    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

  13. def addResetPin(r: Bool): Bool

    Permalink

    returns

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

  14. def apply(name: String): Data

    Permalink
  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def assert(cond: Bool, message: String = ""): Unit

    Permalink

    Add an assertion in the code generated by a backend.

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

    Permalink

    A breadth first search of the graph of nodes

  18. val children: ArrayBuffer[Module]

    Permalink
  19. def clock: Clock

    Permalink

    returns

    the implied clock for this module

  20. def clone(): AnyRef

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

    Permalink
  22. def debug(x: Node): Unit

    Permalink

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

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

    Permalink

    A depth first search of the graph of nodes

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

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

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

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

    Permalink

    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

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

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

    Permalink

    separator

    The separator to use for the path name

    returns

    the absolute path to a component instance from toplevel

  30. def getPathName: String

    Permalink

    returns

    the absolute path to a component instance from toplevel

  31. val hashCode: Int

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

    Permalink
    Definition Classes
    Any
  33. var moduleName: String

    Permalink

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

  34. var name: String

    Permalink

    Name of the instance.

    Name of the instance.

    Definition Classes
    Nameable
  35. var named: Boolean

    Permalink

    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
  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. def nextIndex: Int

    Permalink
  38. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. lazy val params: Parameters

    Permalink
  41. var parent: Module

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

    Permalink

    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

  43. def reset: Bool

    Permalink

    returns

    the implied reset for this module

  44. def setModuleName(n: String): Unit

    Permalink

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

  45. def setName(n: String): Unit

    Permalink

    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")
  46. def stripComponent(s: String): String

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

    Permalink
    Definition Classes
    AnyRef
  48. def toString(): String

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

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

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

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

    Permalink

    Get the I/O names and connections

Inherited from Nameable

Inherited from AnyRef

Inherited from Any

Ungrouped