subFieldDescriptors property

List<({String expectedName, String fieldLabel, int startBit, Map<String, Object?>? subLogicType, int width})> get subFieldDescriptors

Returns the expected sub-field signal names derived from logicType.

For structs, the synthesizer creates separate netnames for each field following the Namer/Sanitizer conventions: Sanitizer.sanitizeSV(structureName){parentName}_{fieldName}

For example, signal fp with fields mantissa, exponent, sign produces sub-field signal names: fp_mantissa, fp_exponent, fp_sign.

These become separate SignalOccurrence entries in the same parent module. Use HierarchyOccurrence.findSubFieldSignals to look them up.

Returns a list of (expectedName, fieldLabel, width, startBit, subLogicType) for direct children. expectedName follows the {parentSignalName}_{fieldName} convention. subLogicType is non-null when the child is itself a sub-array (remaining dimensions) and can be further expanded. Empty if this is not a struct/array with known sub-fields.

Implementation

List<
    ({
      String expectedName,
      String fieldLabel,
      int width,
      int startBit,
      Map<String, Object?>? subLogicType,
    })> get subFieldDescriptors {
  if (logicType == null) {
    return const [];
  }
  return subFieldDescriptorsForType(logicType!, name);
}