MultiCycleDivider.ofLogics constructor
Factory method to create a MultiCycleDivider from explicit Logic signals instead of an interface.
Implementation
factory MultiCycleDivider.ofLogics({
required Logic clk,
required Logic reset,
required Logic validIn,
required Logic dividend,
required Logic divisor,
required Logic isSigned,
required Logic readyOut,
bool reserveName = false,
bool reserveDefinitionName = false,
String? definitionName,
}) {
assert(dividend.width == divisor.width,
'Widths of all data signals do not match!');
final dataWidth = dividend.width;
final intf = MultiCycleDividerInterface(dataWidth: dataWidth);
intf.clk <= clk;
intf.reset <= reset;
intf.validIn <= validIn;
intf.dividend <= dividend;
intf.divisor <= divisor;
intf.isSigned <= isSigned;
intf.readyOut <= readyOut;
return MultiCycleDivider(intf,
reserveName: reserveName,
reserveDefinitionName: reserveDefinitionName,
definitionName:
definitionName ?? 'MultiCycleDivider_W${intf.dataWidth}');
}