addOutput method

  1. @protected
Logic addOutput(
  1. String name,
  2. {int width = 1}

Registers an output to this Module and returns an output port that can be driven.

The return value is the same as what is returned by output().


Logic addOutput(String name, {int width = 1}) {

  final outPort = Port(name, width)
    // ignore: invalid_use_of_protected_member
    ..parentModule = this;

  _outputs[name] = outPort;

  return outPort;