rohd library

Classes

Add
A two-input addition module.
And2Gate
A two-input AND gate.
AndUnary
A unary AND gate.
ARShift
An arithmetic right-shift module.
ArtifactProducingService
A ModuleService that produces named output artifacts.
BusSubset
A Module which gives access to a subset range of signals of the input.
Case
A block of CaseItems where only the one with a matching CaseItem.value is executed.
CaseItem
Represents a single case within a Case block.
CaseZ
A special version of Case which can do wildcard matching via z in the expression.
CodeGenService
An ArtifactProducingService that generates source-code text.
Combinational
Represents a block of combinational logic.
Concat
A Module that performs concatenation of signals into one bigger Logic.
Conditional
Represents an some logical assignments or actions that will only happen under certain conditions.
ConditionalAssign
An assignment that only happens under certain conditions.
ConditionalGroup
Represents a group of Conditionals to be executed.
Const
Represents a Logic that never changes value.
DebugSession
An opt-in debugging workflow for one built module hierarchy.
Divide
A two-input division module.
Else
A conditional block to execute only if condition is satisfied.
ElseIf
A conditional block to execute only if condition is satisfied.
Equals
A two-input equality comparison module.
ExternalSystemVerilogModule
Represents a Module whose definition exists outside of this framework in SystemVerilog.
FiniteStateMachine<StateIdentifier extends Enum>
Simple class for FSM FiniteStateMachine.
FlipFlop<LogicType extends Logic>
A positive-edge-triggered flip-flop preserving LogicType.
FstBlockIndex
Metadata about a flushed VcData block in the FST file.
FstBlockReader
Lightweight reader that decodes VcData DynamicAlias2 blocks written by FstWriter.
FstSignalHandle
A handle to a declared signal in the FST file.
FstSignalInfo
Public metadata about a declared signal in the FST writer.
FstValueChange
A value change record decoded from an FST VcData block.
FstWaveformQuery
Queries an FstWriter's flushed blocks and unflushed hot buffer.
FstWaveformWriter
FST implementation of WaveformWriter.
FstWriter
Pure Dart writer for the FST (Fast Signal Trace) binary format.
FstWriterConfig
Configuration for the FST writer.
GreaterThan
A two-input comparison module for greater-than.
GreaterThanOrEqual
A two-input comparison module for greater-than-or-equal-to.
If
Represents a chain of blocks of code to be conditionally executed, like if/else if/else.
IndexGate
A two-input bit index gate Module.
InProcessRohdDesignSession
A RohdDesignSession backed directly by a synthesized NetlistService.
Interface<TagType extends Enum>
Represents a logical interface to a Module.
LessThan
A two-input comparison module for less-than.
LessThanOrEqual
A two-input comparison module for less-than-or-equal-to.
Logic
Represents a logical signal of any width which can change values.
LogicArray
A multi-dimensional array structure of independent Logics.
LogicEnum<T extends Enum>
A hardware signal constrained to values from a Dart enum T.
LogicNet
Represents a Logic which can be have multiple drivers, supporting bidirectional signals.
LogicStructure
Collects a group of Logic signals into one entity which can be manipulated in a similar way as an individual Logic.
LogicValue
An immutable 4-value representation of an arbitrary number of bits.
LogicValueArray
A shaped LogicValue containing fixed-width LogicValue array elements.
LogicValueChanged
Represents the event of a Logic changing value.
LogicValueCodec<T>
Converts semantic values of type T to and from packed LogicValues.
LShift
A logical left-shift module.
Module
Represents a synthesizable hardware entity with clearly defined interface boundaries.
ModuleService
The common contract implemented by every module-scoped service that registers with ModuleServices.
ModuleServiceArtifact
A named artifact produced by an ArtifactProducingService.
ModuleServices
A slim, type-keyed registry of ModuleServices.
Modulo
A two-input modulo module.
Multiply
A two-input multiplication module.
Mux<LogicType extends Logic>
A multiplexer with an output represented by LogicType.
NetlistService
A service that wraps netlist (Yosys JSON) synthesis of a Module hierarchy.
NetlistSynthesizer
A simple Synthesizer that produces netlist-compatible JSON.
NetlistSynthesizerConfiguration
Configuration for netlist synthesis.
NotEquals
A two-input inequality comparison module.
NotGate
A gate Module that performs bit-wise inversion.
Or2Gate
A two-input OR gate.
OrUnary
A unary OR gate.
PairConsumer<InterfaceType extends PairInterface>
A typed consumer endpoint produced by splitting a PairInterface.
PairInterface
A simplified version of Interface which is intended for a common situation where two components are communicating with each other and may share some common inputs.
PairProvider<InterfaceType extends PairInterface>
A typed provider endpoint produced by splitting a PairInterface.
Passthrough<LogicType extends Logic>
A no-op module that preserves LogicType.
Pipeline
A simple pipeline, separating arbitrary combinational logic by flop stages.
PipelineStageInfo
Information and accessors associated with a Pipeline stage.
Power
A two-input power module.
ReadyValidPipeline
A multi-signal ready/valid Pipeline.
ReplicationOp
A Replication Operator Module.
RohdConnectivitySession
Connectivity operations offered by a RohdDesignSession.
RohdDesignEpoch
Identifies one loaded design revision within a RohdDesignSession.
RohdDesignSession
Transport-independent entry point for inspecting a live ROHD design.
RohdDesignSessionProtocol
Versioned method names and response envelope fields for design sessions.
RohdDesignSessionProtocolHandler
Converts RohdDesignSession calls to JSON-ready protocol envelopes.
RohdDesignStatus
Availability and metadata reported by a RohdDesignSession.
RohdHierarchySession
Hierarchy operations offered by a RohdDesignSession.
RohdPage<T>
Result page for bounded search and traversal requests.
RohdQueryOptions
Options common to hierarchy searches and connectivity traversals.
RohdShellService
Hosts the typed ROHD design-session protocol in the debugged isolate.
RohdSignalValue
A packed signal value sampled from waveform data.
RohdSynchronousDesignSession
Synchronous operations exposed by an in-process design session.
RShift
A logical right-shift module.
Sequential
Represents a block of sequential logic.
ShellCommandInvocation
Input supplied to a registered shell command.
ShellCommandRegistry
Registry of manifest-selected shell commands and their live variables.
ShellCommandResult
A command result that retains a live value and exposes a JSON-ready view.
SimpleClockGenerator
A very simple clock generator. Generates a non-synthesizable SystemVerilog representation.
Simulator
A functional event-based static simulator for logic behavior.
SourceTraceFileTable
A shared, deduplicated file table for attributes.rohd.src_trace (see doc/netlist_json_format.md).
SourceTracer
Captures and stores stack traces for signal and submodule construction sites, allowing later queries by hierarchical address.
State<StateIdentifier extends Enum>
Simple class to initialize each state of the FSM.
StructuredInterfacePortBinding
Connects an external interface to its internal clone and directional ports.
Subtract
A two-input subtraction module.
Swizzle
Deprecated module alias for Concat.
SynthBuilder
A generic class which can convert a module into a generated output using a Synthesizer.
SynthesisResult
An object representing the output of a Synthesizer for one module.
Synthesizer
An object capable of converting a module into some new output format
SynthFileContents
Represents contents of a file.
SynthModuleStopPolicy
Shared hierarchy stopping policy for synthesis backends.
SystemCGenerationDiagnostic
Describes behavior omitted from generated SystemC.
SystemCService
A service that wraps SystemC synthesis of a Module hierarchy.
SystemCSynthesizer
A Synthesizer which generates a two-state SystemC representation of the given Module.
SystemCSynthesizerConfiguration
Configuration for SystemC synthesis.
SystemVerilogParameterDefinition
Represents the definition of a SystemVerilog parameter at the time of declaration of a module definition.
SystemVerilogPortTypeConfiguration
Configuration for types in a SystemVerilog port declaration.
SystemVerilogService
A service that wraps SystemVerilog synthesis of a Module hierarchy.
SystemVerilogSynthesizer
A Synthesizer which generates equivalent SystemVerilog as the given Module.
SystemVerilogSynthesizerConfiguration
Configuration for SystemVerilog synthesis.
TraceService
A service that combines SourceTracer stack traces with SystemVerilogService line maps to produce FLC (File-Line-Column) cross-probing data.
TrackedSignal
Represents metadata for a signal being tracked.
TriStateBuffer
A tri-state buffer: can drive 0, 1, or leave the output floating.
TypedLogicArray<T extends Logic, V>
A multidimensional logic array with hardware leaves of type T and semantic values of type V.
TypedLogicValueArray<T>
A multidimensional array of semantic values backed by packed logic values.
ValueChange
Represents a single value change for a signal.
VcdWaveformWriter
VCD implementation of WaveformWriter.
WaveformDataService
WaveformDataService implements the Singleton design pattern to track signal value changes during simulation for DevTools inspection.
WaveformInitialValue
Initial value for a declared waveform signal.
WaveformQuery
Format-independent capability for querying waveform values.
WaveformQuerySignal
A signal available from a format-independent waveform query.
WaveformQueryValueChange
A timestamped value returned by a waveform query.
WaveformService
A waveform capture service that writes signal changes to a file.
WaveformSignalValue
A waveform value sampled at or immediately before a requested time.
WaveformValueChange
Timestamped value change for a declared waveform signal.
WaveformWriter
Common backend contract for waveform file formats.
Xor2Gate
A two-input XOR gate.
XorUnary
A unary XOR gate.

Enums

ConditionalType
Controls characteristics about Case blocks.
DefinitionGenerationType
A type of generation for generated outputs.
FstBlockType
FST block types (from fstapi.h).
FstFileType
FST file type.
FstScopeType
FST scope types.
FstVarDirection
FST variable direction.
FstVarType
FST variable types.
Naming
Configuration options and utilities for naming and renaming signals.
OverwritePolicy
Policy applied when the output file already exists at construction time.
PairDirection
A direction for signals between a pair of components.
PairRole
The role that a component in a pair plays.
RohdDesignCapability
A capability exposed by a RohdDesignSession.
ScOutputMode
How generated SystemC is laid out on disk.
SimulatorPhase
An enum for the various phases of the Simulator.
SvOutputMode
How the generated SystemVerilog is laid out on disk.
SystemVerilogPortType
Controls whether a type is included in a SystemVerilog port declaration.
WaveformSignalDirection
Direction metadata for a signal emitted into a waveform file.
WaveformTimeScale
The physical duration represented by one unit of Simulator.time.
WaveOutputFormat
The output format for waveform capture.

Mixins

InlineSystemVerilog
Allows a Module to define a special type of SystemVerilog which can be inlined within other SystemVerilog code.
SystemVerilog
Allows a Module to control the instantiation and/or definition of generated SystemVerilog for that module.

Extensions

BigIntMath on BigInt
Exact base-two math helpers for BigInt values.
BigLogicValueBigIntUtilities on BigInt
Extends BigInt with utility functions that are useful for dealing with large bit vectors and conversion between types.
IndexedLogic on List<LogicType>
Allows a list of LogicTypes to have an element selected by a Logic index.
IntegerMath on int
Exact base-two math helpers for int values.
LogicConcat on List<Logic>
Provides concatenation utilities for lists of Logics.
LogicValueConcat on List<LogicValue>
Provides concatenation utilities for lists of LogicValues.
PairInterfaceSplit on InterfaceType
Splitting utilities for a PairInterface.
RandLogicValue on Random
Allows random generation of LogicValue for BigInt and int.
ReceiverResolution on Logic
Allows a Logic view to resolve a continuous assignment it receives.
TypedLogicUtilities on LogicType
Type-preserving conveniences for concrete Logic values.

Functions

bin(String s) → int
Converts a binary String representation to a binary int.
cases<LogicType extends Logic>(Logic expression, Map conditions, {int? width, ConditionalType conditionalType = ConditionalType.none, bool exactMatch = false, dynamic defaultValue, LogicType outputGenerator({String? name})?, String name = 'result'}) → LogicType
Shorthand for a Case inside a Conditional block.
flop<LogicType extends Logic>(Logic clk, LogicType d, {Logic? en, Logic? reset, dynamic resetValue, bool asyncReset = false, LogicType outputGenerator({String? name})?, String name = 'flipflop'}) → LogicType
Constructs a positive-edge-triggered flip-flop preserving LogicType.
mux<LogicType extends Logic>(Logic control, LogicType d1, LogicType d0, {LogicType outputGenerator({String? name})?, String name = 'mux'}) → LogicType
Performs a multiplexer/ternary operation.

Typedefs

Iff = ElseIf
A conditional block to execute only if condition is satisfied.
ShellArgumentParser = Object? Function(Object? value)
Converts a shell literal or live variable to a declared command argument.
ShellCommandHandler = ShellCommandResult Function(ShellCommandInvocation invocation)
A Dart implementation registered for a manifest command binding.
SynthModuleDefinitionPredicate = bool Function(Module module)
Determines whether a Module would normally receive its own synthesized definition before leaf predicates are applied.
SynthModuleLeafPredicate = bool Function(Module module)
Determines whether a synthesizer should stop hierarchy traversal at a Module and treat it as a leaf in its parent.
SystemCUnsupportedModulePredicate = bool Function(Module module, String reason)
Selects an unsupported module for emission as an empty SystemC stub.
TypedLogicArrayElementBuilder<T extends Logic> = T Function({String? name})
Builds one leaf element of a TypedLogicArray.
TypedLogicArrayElementCompatibility<T extends Logic> = bool Function(T prototype, T element)
Checks whether two typed hardware elements use compatible value formats.

Exceptions / Errors

DuplicatePortNameException
An Exception thrown when a port is added to an interface with a name that is already in use by another port on that same interface.
EmptyReservedNameException
An exception that thrown when a reserved name is null.
IllegalConfigurationException
An exception that is thrown when somethins is configured in an illegal way.
InterfaceNameException
An Exception thrown when an interface has an invalid name.
InterfaceTypeException
An Exception thrown when an interface has an issue with its type.
InvalidConditionalException
An exception that is thrown when a Conditional has been constructed in an invalid way.
InvalidHierarchyException
An Exception thrown when a constructed hierarchy is illegal.
InvalidMultiplierException
An exception that thrown when a Logic is replicated with an invalid (<1) multiplier.
InvalidPortNameException
An exception that thrown when a port or interface name is invalid.
InvalidReservedNameException
An exception that thrown when a reserved name is invalid.
InvalidTruncationException
An exception that is thrown when a LogicValue operation couldn't be performed due invalid data truncation.
InvalidValueOperationException
An exception that is thrown when a given operation cannot be performed on invalid LogicValue
LogicConstructionException
An exception that thrown when a Logic is connecting to itself.
LogicValueConstructionException
An exception that thrown when a LogicValue cannot be properly constructed.
LogicValueConversionException
An exception that is thrown when a LogicValue cannot be properly converted.
MappedSignalAlreadyAssignedException
An exception that is thrown when Combinational.ssa is attempting to deduce mappings for signals but fails since a signal would be connected multiple times.
ModuleNotBuiltException
An Exception thrown when a Module was used in a way that required it to be built first, but it was not yet built.
NonSupportedTypeException
An exception that thrown when runtimeType of expected vector output from SimCompare is invalid or unsupported.
NullReservedNameException
An exception that thrown when a reserved name is null.
PortDoesNotExistException
An Exception thrown when a port does not exist.
PortRulesViolationException
An Exception thrown when a port is not following the input/output rules.
PortTypeException
An Exception thrown when a port has the wrong type.
PortWidthMismatchException
An Exception thrown when a port has the wrong width.
PutException
An exception that thrown when a Logic signal fails to Logic.put.
RohdException
A base type of exception that ROHD-specific exceptions inherit from.
SelfConnectingLogicException
An exception that thrown when a Logic is connecting to itself.
SignalRedrivenException
An exception that is thrown when a Logic signal is driven multiple times.
SignalWidthMismatchException
An Exception thrown when a signal has the wrong width.
SimulatorException
An Exception thrown when an error occurs in the simulator.
SynthException
An Exception thrown when an error occurs in the simulator.
UnassignableException
An exception that thrown when a Logic signal fails to put.
UnavailableReservedNameException
An exception that thrown when a reserved name cannot be acquired.
UninitializedSignalException
An exception that is thrown when Combinational.ssa detects that an SSA signal is being used before it was initialized.
UnsupportedSystemCModuleException
Thrown when required module behavior has no SystemC translation.
UnsupportedTypeException
An exception that is thrown when an unsupported type is used.
ValueWidthMismatchException
An exception that is thrown when LogicValues of different width are found.
WriteAfterReadException
An exception that is thrown when a "write after read" violation occurs.