datatype.mark 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. .//============================================================================
  2. .// File: datatype.mark
  3. .//
  4. .// Description:
  5. .// This marking file is used to specify the marking of User Defined
  6. .// Data Types in the application analysis.
  7. .//
  8. .// Notice:
  9. .// (C) Copyright 1999-2013 Mentor Graphics Corporation
  10. .// All rights reserved.
  11. .//============================================================================
  12. .// Notes:
  13. .// (1) Marking is specified via archetype function invocation(s) in this file.
  14. .// A function invocation statement MUST be specified on a single line.
  15. .// All indicated function input parameters must be supplied.
  16. .// (2) All quoted string parameters are case sensitive.
  17. .// (3) Comments in this file start with ".//".
  18. .// (4) Do not leave any blank lines in this file.
  19. .//============================================================================
  20. .//
  21. .//============================================================================
  22. .// Specify User Data Type Precision:
  23. .//
  24. .// To indicate to the software architecture the 'precision' of a user defined
  25. .// data type (defined in the BridgePoint 'Subsystem Partitioning Model'
  26. .// (SPM) domain data editor), use the following invocation:
  27. .//
  28. .// TagDataTypePrecision( "domain", "dt_name", "tagged_name", "initial_value" )
  29. .//
  30. .// Where the input parameters are:
  31. .// domain - Registered domain name. Use "*" to indictate a System Wide data
  32. .// type (to be applied to all domains containing the user data type).
  33. .// dt_name - Name of the data type as known in the application analysis.
  34. .// tagged_name - Name of the data type as known in generated implementation
  35. .// code (e.g., the 'precision' of the data type). Note (2).
  36. .// initial_value - An optional specification of the default value for the
  37. .// data type. Use "" for the architectural default (e.g., 0 for integer,
  38. .// 0.0 for real). Note (3).
  39. .//
  40. .// Examples:
  41. .// Domain specific precsion:
  42. .// .invoke TagDataTypePrecision( "MyDom", "Octet", "uchar_t", "" )
  43. .// .invoke TagDataTypePrecision( "MyDom", "FunkyReal", "double", "666.999" )
  44. .// .invoke TagDataTypePrecision( "AS", "position", "char", "-1" )
  45. .// System Wide Precision:
  46. .// .invoke TagDataTypePrecision( "*", "SysWideLong", "long int", "-1" )
  47. .//
  48. .// Notes:
  49. .// (1) Mark 'TagDataTypePrecision' may only be used for application analysis
  50. .// data types which are derived from either BridgePoint core data types of
  51. .// 'integer' or 'real'. Also, user defined types that are enumerations
  52. .// can be marked. Such data will have core data type 'string', but
  53. .// will serve as integers. Attempting to use this mark with other core
  54. .// data types will result in a fatal marking error (translation aborted).
  55. .// This restriction applies equally to both domain specific and system
  56. .// wide use of this mark.
  57. .// (2) Precision tag 'tagged_name' may be any standard C/C++ integral/real
  58. .// programatic type. For example, "unsigned char", "long long", "double",
  59. .// etc. POSIX types are also accepted, such as "uchar_t", ulong_t", etc.
  60. .// (3) When an analysis object is instantiated, the default is to initialize
  61. .// attributes of core type 'integer' to 0, and attributes of core type
  62. .// 'real' to 0.0 (declared as code type 'float'). Tag 'initial_value'
  63. .// may be used to re-define the default initialization value.
  64. .// (3.a) Casting may be used in the tag, such as "(unsigned)EACCESS", but
  65. .// should be used only with careful system level discression.
  66. .// (3.b) No translation time error checking is performed on 'initial_value'.
  67. .// So bogus tags such as "&*#$" will only be caught during compilation.
  68. .//============================================================================
  69. .//
  70. .//
  71. .//============================================================================
  72. .// Mapping User Data Type to an Implementation Pointer:
  73. .//
  74. .// To indicate to the model compiler that a user defined data type
  75. .// (defined in the BridgePoint 'Subsystem Partitioning Model' (SPM)
  76. .// domain data editor) shall be implemented as a pointer,
  77. .// use the following invocation:
  78. .//
  79. .// MapDataTypeAsPointer( "domain", "dt_name", "pointer_type", "include_file" )
  80. .//
  81. .// Where the input parameters are:
  82. .// domain - Registered domain name. Use "*" to indictate a system wide data
  83. .// type (to be applied to all domains containing the user data type).
  84. .// dt_name - Name of the data type as known in the application analysis.
  85. .// pointer_type - Name of the pointer data type as it will known be know
  86. .// in the generated code.
  87. .// include_file - An optional include file which declares the
  88. .// implementation type of 'pointer_type'.
  89. .//
  90. .// Examples:
  91. .// Domain specific:
  92. .// .invoke MapDataTypeAsPointer( "MyDom", "DataPacket", "char", "" )
  93. .// .invoke MapDataTypeAsPointer( "MyDom", "AcmeType", "SomeStruct_t", "legacy.h" )
  94. .// System Wide:
  95. .// .invoke MapDataTypeAsPointer( "*", "OpaquePtr", "void", "" )
  96. .//
  97. .// Notes:
  98. .// (1) In general, '*' should not be included in the 'dt_name'. This will
  99. .// result in the model compiler treating the User Data Type as a pointer
  100. .// to a pointer.
  101. .//
  102. .//============================================================================
  103. .//
  104. .//
  105. .//============================================================================
  106. .// Specifying Values for Enumerators
  107. .//
  108. .// To indicate to the model compiler that a user defined enumeration
  109. .// data type enumerator (defined in the BridgePoint Subsystem Partitioning
  110. .// Model (SPM) domain data editor) shall have a value other than the default,
  111. .// use the following invocation:
  112. .//
  113. .// TagEnumeratorDiscreteValue( "domain", "enumeration", "enumerator", "value" )
  114. .//
  115. .// Where the input parameters are:
  116. .// domain - Registered domain name. Use "*" to indicate a system wide
  117. .// enumeration data type (to be applied to all domains containing
  118. .// the user defined enumeration data type).
  119. .// enumeration - Name of the enumeration data type as known in the
  120. .// application analysis.
  121. .// enumerator - Name of the enumerator as known in the application analysis.
  122. .// value - A string containing the value to be assigned to the enumerator.
  123. .//
  124. .// Examples:
  125. .// Domain specific:
  126. .// .invoke TagEnumeratorDiscreteValue( "MO", "wattage", "low", "4" )
  127. .// .invoke TagEnumeratorDiscreteValue( "MO", "wattage", "med", "0x20" )
  128. .// System Wide:
  129. .// .invoke TagEnumeratorDiscreteValue( "*", "wattage", "high", "0x40" )
  130. .//
  131. .//============================================================================
  132. .//
  133. .//
  134. .//============================================================================
  135. .// Specifying Value for the Default Un-Initialized Enumerator
  136. .//
  137. .// To indicate to the software architecture that the un-initialized enumerator
  138. .// of an enumeration (defined in the BridgePoint Subsystem Partitioning Model
  139. .// (SPM) domain data editor) shall have a value other than the default,
  140. .// use the following invocation:
  141. .//
  142. .// TagUninitializedEnumerationValue( "domain", "enumeration", "value" )
  143. .//
  144. .// Where the input parameters are:
  145. .// domain - Registered domain name. Use "*" to indicate a system wide
  146. .// enumeration data type (to be applied to all domains containing
  147. .// the user defined enumeration data type).
  148. .// enumeration - Name of the enumeration data type as known in the
  149. .// application analysis. Use "*" to indicate ALL enumerations.
  150. .// value - A string containing the value to be assigned to the uninitialized
  151. .// enumerator.
  152. .//
  153. .// Examples:
  154. .// Domain specific:
  155. .// .invoke TagUninitializedEnumerationValue( "MO", "wattage", "4" )
  156. .// All Enumerations in Domain:
  157. .// .invoke TagUninitializedEnumerationValue( "MO", "*", "0x40" )
  158. .// System Wide:
  159. .// .invoke TagUninitializedEnumerationValue( "*", "wattage", "0x20" )
  160. .// All Enumerations in All Domains:
  161. .// .invoke TagUninitializedEnumerationValue( "*", "*", "100" )
  162. .//
  163. .//============================================================================
  164. .//
  165. .//
  166. .//============================================================================
  167. .// Do not add anything at the end of this file!
  168. .//============================================================================