LockingRRArbiter

chisel3.util.LockingRRArbiter
class LockingRRArbiter[T <: Data](gen: T, n: Int, count: Int, needsLock: Option[T => Bool] = ..., initLastGrant: Boolean = ...) extends LockingArbiterLike[T]

Attributes

Source
Arbiter.scala
Graph
Supertypes
class Module
class RawModule
class BaseModule
trait Selectable
trait Selectable
trait InstanceId
class Object
trait Matchable
class Any
Show all
Known subtypes
class RRArbiter[T]

Members list

Value members

Concrete methods

override def grant: Seq[Bool]

Attributes

Definition Classes
Source
Arbiter.scala

Inherited methods

protected def afterModuleBuilt(gen: => Unit): Unit

Hook to invoke hardware generators after a Module has been constructed and closed.

Hook to invoke hardware generators after a Module has been constructed and closed.

This is useful for running hardware generators after a Module's constructor has run and its Definition is available, while still having access to arguments and definitions in the constructor. The Module itself can no longer be modified at this point.

An interesting application of this is the generation of unit tests whenever a module is instantiated. For example:

 class Example(N: int) extends RawModule {
   private val someSecret: Int = ...

   afterModuleBuilt {
     // Executes once the surrounding module is closed.
     // We can get its definition at this point and pass it to another module.
     Definition(ExampleTest(this.definition, someSecret))
   }
 }

 class ExampleTest(unitDef: Definition[Example], someSecret: Int) extends RawModule {
   // Instantiate the generated module and test it.
   val unit = Instance(unitDef)
   ...
 }

 class Parent extends RawModule {
   Instantiate(Example(42))
 }

 // Resulting modules:
 // - Parent (top-level)
 //   - instantiates Example
 // - ExampleTest (top-level)
 //   - instantiates Example
 // - Example

Attributes

Inherited from:
RawModule
Source
RawModule.scala
final def applyDynamic(name: String, paramTypes: Class[_]*)(args: Any*): Any

Select method and apply to arguments.

Select method and apply to arguments.

Value parameters

args

The arguments to pass to the selected method

name

The name of the selected method

paramTypes

The class tags of the selected method's formal parameter types

Attributes

Inherited from:
Selectable
Source
Selectable.scala
final def associate(port: Seq[Data], domains: Type*)(implicit si: SourceInfo): Unit

Associate multiple ports of this module with one or more domains.

Associate multiple ports of this module with one or more domains.

Attributes

Inherited from:
BaseModule
Source
Module.scala
final def associate(port: Data, domains: Type*)(implicit si: SourceInfo): Unit

Associate a port of this module with one or more domains.

Associate a port of this module with one or more domains.

Attributes

Inherited from:
BaseModule
Source
Module.scala
def desiredName: String

The desired name of this module (which will be used in generated FIRRTL IR or Verilog).

The desired name of this module (which will be used in generated FIRRTL IR or Verilog).

The name of a module approximates the behavior of the Java Reflection getSimpleName method https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getSimpleName-- with some modifications:

  • Anonymous modules will get an "_Anon" tag
  • Modules defined in functions will use their class name and not a numeric name

Attributes

Note

If you want a custom or parametric name, override this method.

Inherited from:
BaseModule
Source
Module.scala
def endIOCreation()(implicit si: SourceInfo): Unit

Disallow any more IO creation for this module.

Disallow any more IO creation for this module.

Attributes

Inherited from:
BaseModule
Source
Module.scala
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
HasId -> Any
Inherited from:
HasId (hidden)
Source
Builder.scala
protected def getCommands: Seq[Command]

Attributes

Inherited from:
RawModule
Source
RawModule.scala
override protected def hasBody: Boolean

Attributes

Definition Classes
Inherited from:
RawModule
Source
RawModule.scala
def hasSeed: Boolean

Attributes

Returns

Whether either autoName or suggestName has been called

Inherited from:
HasId (hidden)
Source
Builder.scala
override def hashCode: Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
HasId -> Any
Inherited from:
HasId (hidden)
Source
Builder.scala
override def instanceName: String

Signal name (for simulation).

Signal name (for simulation).

Attributes

Definition Classes
BaseModule -> HasId -> InstanceId
Inherited from:
BaseModule
Source
Module.scala
def localModulePrefix: Option[String]

Additional module prefix, applies to this module if defined (unless localModulePrefixAppliesToSelf is false) and all children.

Additional module prefix, applies to this module if defined (unless localModulePrefixAppliesToSelf is false) and all children.

Attributes

Inherited from:
BaseModule
Source
Module.scala

Should localModulePrefix apply to this module? Defaults to true.

Should localModulePrefix apply to this module? Defaults to true.

Users should override to false if localModulePrefix should apply only to children.

Attributes

Inherited from:
BaseModule
Source
Module.scala

Should the localModulePrefix include a separator between prefix and the Module name

Should the localModulePrefix include a separator between prefix and the Module name

Defaults to true, users can override to false if they don't want a separator.

Attributes

Inherited from:
BaseModule
Source
Module.scala
def parentModName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def parentPathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def pathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala

Override this to explicitly set the type of reset you want on this module , before any reset inference

Override this to explicitly set the type of reset you want on this module , before any reset inference

Attributes

Inherited from:
Module
Source
Module.scala
final def selectDynamic(name: String): Any

Select member with given name

Select member with given name

Attributes

Inherited from:
Selectable
Source
Selectable.scala
def suggestName(seed: => String): HasId.this.type

Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.

Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.

Is a higher priority than autoSeed, in that regardless of whether autoSeed was called, suggestName will always take precedence.

Value parameters

seed

The seed for the name of this component

Attributes

Returns

this object

Inherited from:
HasId (hidden)
Source
Builder.scala

Returns a FIRRTL ModuleTarget that references this object

Returns a FIRRTL ModuleTarget that references this object

Attributes

Note

Should not be called until circuit elaboration is complete

Inherited from:
BaseModule
Source
Module.scala
final def toNamed: ModuleName

Returns a FIRRTL ModuleName that references this object

Returns a FIRRTL ModuleName that references this object

Attributes

Note

Should not be called until circuit elaboration is complete

Inherited from:
BaseModule
Source
Module.scala
final def toRelativeTarget(root: Option[BaseModule]): IsModule

Returns a FIRRTL ModuleTarget that references this object, relative to an optional root.

Returns a FIRRTL ModuleTarget that references this object, relative to an optional root.

If root is defined, the target is a hierarchical path starting from root.

If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.

Attributes

Note

If root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

The BaseModule must be a descendant of root, if it is defined.

This doesn't have special handling for Views.

Inherited from:
BaseModule
Source
Module.scala

Returns a FIRRTL ModuleTarget that references this object, relative to an optional root.

Returns a FIRRTL ModuleTarget that references this object, relative to an optional root.

If root is defined, the target is a hierarchical path starting from root.

If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.

Attributes

Note

If root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

The BaseModule must be a descendant of root, if it is defined.

This doesn't have special handling for Views.

Inherited from:
BaseModule
Source
Module.scala
final def toTarget: ModuleTarget

Returns a FIRRTL ModuleTarget that references this object

Returns a FIRRTL ModuleTarget that references this object

Attributes

Note

Should not be called until circuit elaboration is complete

Inherited from:
BaseModule
Source
Module.scala

Concrete fields

lazy override val choice: UInt

Attributes

Source
Arbiter.scala
lazy val grantMask: IndexedSeq[Bool]

Attributes

Source
Arbiter.scala
lazy val lastGrant: UInt

Attributes

Source
Arbiter.scala
lazy val validMask: IndexedSeq[Bool]

Attributes

Source
Arbiter.scala

Inherited fields

final val clock: Clock

Attributes

Inherited from:
Module
Source
Module.scala
final val definitionIdentifier: String

Represents an eagerly-determined unique and descriptive identifier for this module

Represents an eagerly-determined unique and descriptive identifier for this module

Attributes

Inherited from:
BaseModule
Source
Module.scala
val io: ArbiterIO[T]

Attributes

Inherited from:
LockingArbiterLike
Source
Arbiter.scala
final val modulePrefix: String

The resolved module prefix used for this Module.

The resolved module prefix used for this Module.

Includes localModulePrefix if defined and if localModulePrefixAppliesToSelf is true.

Attributes

Inherited from:
BaseModule
Source
Module.scala
final lazy val name: String

Legalized name of this module.

Legalized name of this module.

Attributes

Inherited from:
BaseModule
Source
Module.scala
final val reset: Reset

Attributes

Inherited from:
Module
Source
Module.scala