LockingArbiterLike
Attributes
- Source
- Arbiter.scala
- Graph
-
- Supertypes
-
class Moduletrait ImplicitResettrait ImplicitClockclass RawModuleclass BaseModuletrait Selectabletrait Selectabletrait IsInstantiabletrait InstanceIdclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Members list
Value members
Inherited methods
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
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
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
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
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
Disallow any more IO creation for this module.
Disallow any more IO creation for this module.
Attributes
- Inherited from:
- BaseModule
- Source
- Module.scala
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
xof typeAny,x.equals(x)should returntrue. - It is symmetric: for any instances
xandyof typeAny,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any instances
x,y, andzof typeAnyifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue.
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
-
trueif the receiver object is equivalent to the argument;falseotherwise. - Definition Classes
-
HasId -> Any
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- RawModule
- Source
- RawModule.scala
Attributes
- Definition Classes
- Inherited from:
- RawModule
- Source
- RawModule.scala
Attributes
- Returns
-
Whether either autoName or suggestName has been called
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
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
Signal name (for simulation).
Signal name (for simulation).
Attributes
- Definition Classes
- Inherited from:
- BaseModule
- Source
- Module.scala
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
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
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
Select member with given name
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
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
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
rootis defined, and has not finished elaboration, this must be called withinatModuleBodyEnd.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
rootis defined, and has not finished elaboration, this must be called withinatModuleBodyEnd.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
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
Attributes
- Source
- Arbiter.scala
Inherited fields
Attributes
- Inherited from:
- Module
- Source
- Module.scala
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
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
Legalized name of this module.
Attributes
- Inherited from:
- Module
- Source
- Module.scala