named method

Logic named(
  1. String name, {
  2. Naming? naming,
})

Makes a clone with the provided name and optionally naming, then assigns it to be driven by this.

This is a useful utility for naming the result of some hardware construction without separately declaring a new named signal and then assigning. For example:

// named "myImportantNode" instead of a generated name like "a_xor_b"
final myImportantNode = (a ^ b).named('myImportantNode');

Implementation

Logic named(String name, {Naming? naming}) =>
    _clone(name: name, naming: naming)..gets(this);