verilogContents method

  1. @override
String verilogContents(
  1. int indent,
  2. Map<String, String> inputsNameMap,
  3. Map<String, String> outputsNameMap,
  4. String assignOperator,
)
override

Returns a String of SystemVerilog to be used in generated output.

The indent is used for pretty-printing, and should generally be incremented for sub-Conditionals. The inputsNameMap and outputsNameMap are a mapping from port names to SystemVerilog variable names for inputs and outputs, respectively. The assignOperator is the SystemVerilog operator that should be used for any assignments within this Conditional.

Implementation

@override
String verilogContents(int indent, Map<String, String> inputsNameMap,
    Map<String, String> outputsNameMap, String assignOperator) {
  final padding = Conditional.calcPadding(indent);
  final driverName = inputsNameMap[driverInput(driver).name]!;
  final receiverName = outputsNameMap[receiverOutput(receiver).name]!;
  return '$padding$receiverName $assignOperator $driverName;';
}