CarrySelectCompoundAdder class
Carry-select compound adder.
- Inheritance
-
- Object
- Adder
- CompoundAdder
- CarrySelectCompoundAdder
Constructors
-
CarrySelectCompoundAdder(Logic a, Logic b, {Logic? subtractIn, Logic? carryIn, Adder adderGen(Logic a, Logic b, {Logic? carryIn, String name, Logic? subtractIn}) = _defaultBlockAdder, List<
int> widthGen(int) = splitSelectAdderAlgorithmSingleBlock, String name = 'cs_compound_adder', bool reserveName = false, bool reserveDefinitionName = false, String? definitionName}) - Constructs a CarrySelectCompoundAdder.
Properties
- a → Logic
-
The input to the adder pin a.
no setterinherited
- b → Logic
-
The input to the adder pin b.
no setterinherited
- carryIn → Logic?
-
The input to the carry in pin carryIn
no setterinherited
- definitionName → String
-
The definition name of this
Moduleused when instantiating instances in generated code.no setterinherited - hasBuilt → bool
-
Indicates whether this
Modulehas had thebuildmethod called on it.no setterinherited - hasCarryIn → bool
-
Check if this adder has a carryIn input
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hierarchicalName → String
-
Returns the hierarchical name of this
Modulewith the parenthierarchyincluded, separated by.s, e.g.top.mid.leaf. Because it depends onhierarchy, this is only valid afterbuildhas been called.no setterinherited -
inOuts
→ Map<
String, Logic> -
A map from
inOutport names to thisModuleto correspondingLogicsignals.no setterinherited -
inputs
→ Map<
String, Logic> -
A map from
inputport names to thisModuleto correspondingLogicsignals.no setterinherited -
internalSignals
→ Iterable<
Logic> -
An Iterable of all
Logics contained within thisModulewhich are not an input or output port of thisModule.no setterinherited - name → String
-
The name of this
Module.finalinherited -
outputs
→ Map<
String, Logic> -
A map from
outputport names to thisModuleto correspondingLogicsignals.no setterinherited - parent → Module?
-
The parent
Moduleof thisModule.no setterinherited - reserveDefinitionName → bool
-
If true, guarantees
definitionNameis maintained by aSynthesizer, or else it will fail.finalinherited - reserveName → bool
-
If true, guarantees
uniqueInstanceNamematchesnameor else thebuildwill fail.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
signals
→ Iterable<
Logic> -
An Iterable of all
Logics contained within thisModule, including inputs, outputs, and internal signals of thisModule.no setterinherited -
subModules
→ Iterable<
Module> -
An Iterable of all
Modules contained within thisModule.no setterinherited - sum → Logic
-
The addition results in 2s complement form as sum
no setterinherited
- sumP1 → Logic
-
The addition result sum + 1 in 2s complement form as sumP1
no setterinherited
- uniqueInstanceName → String
-
If this module has a
parent, afterbuildthis will be a guaranteed unique name within its scope.no setterinherited
Methods
-
addInOut(
String name, Logic source, {int width = 1}) → LogicNet -
Registers a signal as an
inOutto thisModuleand returns aninOutport that can be consumed inside thisModule.inherited -
addInOutArray(
String name, Logic source, {List< int> dimensions = const [1], int elementWidth = 1, int numUnpackedDimensions = 0}) → LogicArray -
Registers and returns an inOut
LogicArrayport to thisModulewith the specifieddimensions,elementWidth, andnumUnpackedDimensionsnamedname.inherited -
addInput(
String name, Logic source, {int width = 1}) → Logic -
Registers a signal as an
inputto thisModuleand returns aninputport that can be consumed.inherited -
addInputArray(
String name, Logic source, {List< int> dimensions = const [1], int elementWidth = 1, int numUnpackedDimensions = 0}) → LogicArray -
Registers and returns an input
LogicArrayport to thisModulewith the specifieddimensions,elementWidth, andnumUnpackedDimensionsnamedname.inherited -
addInterfacePorts<
InterfaceType extends Interface< (TagType> , TagType extends Enum>InterfaceType source, {Iterable< TagType> ? inputTags, Iterable<TagType> ? outputTags, Iterable<TagType> ? inOutTags, String uniquify(String original)?}) → InterfaceType -
Connects the
sourceto thisModuleusingInterface.connectIOand returns a copy of thesourcethat can be used within this module.inherited -
addOutput(
String name, {int width = 1}) → Logic -
Registers an
outputto thisModuleand returns anoutputport that can be driven by thisModuleor consumed outside of it.inherited -
addOutputArray(
String name, {List< int> dimensions = const [1], int elementWidth = 1, int numUnpackedDimensions = 0}) → LogicArray -
Registers and returns an output
LogicArrayport to thisModulewith the specifieddimensions,elementWidth, andnumUnpackedDimensionsnamedname.inherited -
addPairInterfacePorts<
InterfaceType extends PairInterface> (InterfaceType source, PairRole role, {String uniquify(String original)?}) → InterfaceType -
Connects the
sourceto thisModuleusingPairInterface.pairConnectIOand returns a copy of thesourcethat can be used within this module.inherited -
addTypedInOut<
LogicType extends Logic> (String name, LogicType source) → LogicType -
Registers a signal as an
inOutto thisModuleand returns aninOutport that can be consumed inside thisModule. The type of the port will beLogicTypeand constructed viaLogic.clone, so it is required that thesourceimplements clone functionality that matches the type and properly updates theLogic.nameas well.inherited -
addTypedInput<
LogicType extends Logic> (String name, LogicType source) → LogicType -
Registers a signal as an
inputto thisModuleand returns aninputport that can be consumed. The type of the port will beLogicTypeand constructed viaLogic.clone, so it is required that thesourceimplements clone functionality that matches the type and properly updates theLogic.nameas well.inherited -
addTypedOutput<
LogicType extends Logic> (String name, LogicType logicGenerator({String name})) → LogicType -
Registers an
outputto thisModuleand returns anoutputport that can be driven by thisModuleor consumed outside of it. The type of the port will beLogicTypeand constructed vialogicGenerator, which must properly update thenameof the generatedLogicTypeas well.inherited -
build(
) → Future< void> -
Builds the
Moduleand allsubModuleswithin it.inherited -
generateSynth(
) → String -
Returns a synthesized version of this
Module.inherited -
hierarchy(
) → Iterable< Module> -
Returns an Iterable of
Modules representing the hierarchical path to thisModule.inherited -
hierarchyString(
[int indent = 0]) → String -
Returns a pretty-print String of the heirarchy of all
Modules within thisModule.inherited -
inOut(
String name) → Logic -
Accesses the
Logicassociated with thisModules inOut port namedname.inherited -
inOutSource(
String name) → Logic -
The original
sourceprovided to the creation of theinOutportnameviaaddInOutoraddInOutArray.inherited -
input(
String name) → Logic -
Accesses the
Logicassociated with thisModulesinputport namedname.inherited -
inputSource(
String name) → Logic -
The original
sourceprovided to the creation of theinputportnameviaaddInputoraddInputArray.inherited -
isInOut(
Logic signal) → bool -
Returns true iff
signalis the sameLogicas theinOutport of thisModulewith the same name.inherited -
isInput(
Logic signal) → bool -
Returns true iff
signalis the sameLogicas theinputport of thisModulewith the same name.inherited -
isOutput(
Logic signal) → bool -
Returns true iff
signalis the sameLogicas theoutputport of thisModulewith the same name.inherited -
isPort(
Logic signal) → bool -
Returns true iff
signalis the sameLogicas aninput,output, orinOutport of thisModulewith the same name.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
output(
String name) → Logic -
Accesses the
Logicassociated with thisModules output port namedname.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
tryInOut(
String name) → Logic? -
Provides the
inOutnamednameif it exists, otherwisenull.inherited -
tryInput(
String name) → Logic? -
Provides the
inputnamednameif it exists, otherwisenull.inherited -
tryOutput(
String name) → Logic? -
Provides the
outputnamednameif it exists, otherwisenull.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
splitSelectAdderAlgorithm4Bit(
int adderWidth) → List< int> -
Adder block size computation algorithm.
Generates 4 bit carry-select blocks with 1st entry width adjusted down.
Return list of block sizes starting from
the LSB connected one.
adderWidthis a whole width of adder. -
splitSelectAdderAlgorithmNBit(
int n) → List< int> Function(int) - Generator of splitter algorithm
-
splitSelectAdderAlgorithmSingleBlock(
int adderWidth) → List< int> -
Adder block size computation algorithm.
Generates only one carry-select block
Return list of adder block sizes starting from
the LSB connected one.
adderWidthis a whole width of adder.