diff options
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/hwpf/fapi/fapiParseAttributeInfo.pl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl b/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl index 1ee4119e9..4e092f90f 100755 --- a/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl +++ b/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl @@ -60,6 +60,7 @@ # mjjones 05/21/12 Ignore newlines and whitespace when # parsing enumerations # mjjones 06/12/12 Add new include file to fapiChipEcFeature.C +# mjjones 08/08/12 Output target types and if PlatInit # # End Change Log ****************************************************** @@ -128,6 +129,7 @@ print AIFILE "// fapiAttributeIds.H\n"; print AIFILE "// This file is generated by perl script fapiParseAttributeInfo.pl\n\n"; print AIFILE "#ifndef FAPIATTRIBUTEIDS_H_\n"; print AIFILE "#define FAPIATTRIBUTEIDS_H_\n\n"; +print AIFILE "#include <fapiTarget.H>\n\n"; print AIFILE "namespace fapi\n"; print AIFILE "{\n\n"; print AIFILE "\/**\n"; @@ -378,6 +380,49 @@ foreach my $argnum (1 .. $#ARGV) } #---------------------------------------------------------------------- + # Print the target type(s) that the attribute is associated with + #---------------------------------------------------------------------- + if (! exists $attr->{targetType}) + { + print ("fapiParseAttributeInfo.pl ERROR. Att 'targetType' missing\n"); + exit(1); + } + + print AIFILE "const TargetTypes_t $attr->{id}_TargetTypes = "; + + # Split on commas + my @targTypes = split(',', $attr->{targetType}); + + my $targTypeCount = 0; + foreach my $targType (@targTypes) + { + # Remove newlines and leading/trailing whitespace + $targType =~ s/\n//; + $targType =~ s/^\s+//; + $targType =~ s/\s+$//; + + if ($targTypeCount != 0) + { + print AIFILE " | "; + } + print AIFILE "$targType"; + $targTypeCount++; + } + print AIFILE ";\n"; + + #---------------------------------------------------------------------- + # Print if the attribute is a platInit attribute + #---------------------------------------------------------------------- + if (exists $attr->{platInit}) + { + print AIFILE "const bool $attr->{id}_PlatInit = true;\n"; + } + else + { + print AIFILE "const bool $attr->{id}_PlatInit = false;\n"; + } + + #---------------------------------------------------------------------- # Print the value enumeration (if specified) to fapiAttributeIds.H #---------------------------------------------------------------------- if (exists $attr->{enum}) |