Abstract:
A method is provided for operating a first computer device, in which a source program code is generated which contains a functional model that is hierarchically composed of functions which are hierarchically composed of components, the visibility of the components within the functional model being determined by the hierarchy. Placeholders are used within the hierarchy for determined components and executable program code is generated, the placeholders being replaced by the determined components via a correspondingly executed mapping rule before executable program code is generated. This method allows the locality principle to be maintained, for example on experimental hardware.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a method for operating a computer device as recited in the preamble of Claim  1 , a corresponding computer program, and a computer program product. 
       BACKGROUND INFORMATION 
       [0002]    In the following description, reference is essentially made to motor vehicle regulation and control algorithms without limiting the method according to the present invention to this application. 
         [0003]    Functional models of motor vehicle regulation and/or control algorithms are generally hierarchically structured. Components are combined into functions in a stepwise manner during the development or modeling. A component limits outside access to internal data or signals by providing explicit interfaces. In addition, access to the interfaces of other components is explicitly specified by an interface description. A hierarchy composed of multiple functions may encompass the entire vehicle. A function contains a hierarchy composed of components. 
         [0004]    The exchange of signals or data between components and functions likewise occurs via interfaces, or “ports.” For components which are described in greater detail below, actuators which are able to influence the physical or material characteristics of their surroundings and sensors which are able to detect the characteristics of their surroundings are controlled via these ports. 
         [0005]    To maintain the clarity of models constructed in this manner, the visibility of sensor and actuator communication is locally limited (locality principle). If a sensor or actuator signal is required by only one component, the visibility of the signal is limited to this component. 
         [0006]    A component which encapsulates a locally visible sensor or actuator signal is referred to as a sensor or actuator component. Other components are usually referred to as leaf components. Function-wide sensor or actuator signals are visible only within a function, whereas vehicle-wide sensor or actuator signals are visible on the highest hierarchical level of all functions. 
         [0007]    The locality principle is implemented by locating the sensor or actuator components on the particular hierarchical level, and the placement of interfaces into the reading or writing components. The number of interfaces on the function and vehicle levels is significantly reduced via this procedure, and functional encapsulation of the sensor and actuator components is achieved. 
         [0008]    This locality principle is violated when, according to the aforementioned rules, modeled functions are carried out on experimental hardware, for example rapid prototyping (RP) systems or electronic control units (ECU). 
         [0009]    It is necessary to introduce into the model a set of sensor and actuator components which corresponds to the experimental hardware. The representation of these sensor and actuator components, referred to as platform software components, within the model depends on the actual characteristics of the experimental hardware, for example, the peripheral modules for microcontrollers of an ECU, or the input/output cards in RP systems. 
         [0010]    These platform software components deliver the exact number of signals from the corresponding hardware module as inputs or outputs. For today&#39;s modeling tools, these components and therefore all inputs and outputs are defined on the highest hierarchical level and are therefore visible system-wide. This prevents local use of individual signals within the leaf components of a function hierarchy or component hierarchy. 
         [0011]    As a result, unclear models are obtained which violate the locality principle described above. 
       SUMMARY OF THE INVENTION 
       [0012]    In the method according to the present invention for operating a first computer device, a source program code is generated which contains a functional model that is hierarchically composed of functions which are hierarchically composed of components. The visibility of the components within the functional model is determined by the hierarchy, and placeholders are used within the hierarchy for determined components. An executable program code is generated, and the placeholders are replaced by the determined components via an appropriately executed mapping rule before executable program code is generated. The introduction of this mapping rule makes it possible to maintain the locality principle. 
         [0013]    In the method according to the present invention, the executable program code is advantageously generated on a second computer device and is transferred to the first computer device. A conventional computer, for example, may be used as the second computer device. 
         [0014]    The method according to the present invention is particularly preferred when sensor and/or actuator components are used as components, in particular as placeholders. 
         [0015]    In one preferred embodiment of the method according to the present invention, the functional model represents a motor vehicle regulation and/or control algorithm. In particular in automotive engineering, the use of computer devices for implementing regulation and/or control algorithms which involves violation of the locality principle is frequently encountered. The advantageous use of the method according to the present invention provides improved clarity of the functional model. 
         [0016]    In the method according to the present invention it is advantageous to use experimental hardware, in particular rapid prototyping systems or electronic control units, as the first computer device. This use enables the preferred maintenance of the locality principle in the generation of functional models for experimental hardware. 
         [0017]    In the method according to the present invention it is particularly preferred for the mapping rule to be present in a list-type structure in which the components are associated with the placeholders. 
         [0018]    It is also preferred if in the method according to the present invention the mapping rule is provided graphically where the components are associated with the placeholders. 
         [0019]    These two specific embodiments of the mapping rule may be managed in a particularly simple manner. 
         [0020]    The method according to the present invention is particularly preferred when the functional model for the source program code is generated from another functional model in which no placeholders are used within the hierarchy for determined components, and the mapping rule is generated. This allows the advantageous use of the method according to the present invention for models that have already been generated. 
         [0021]    The computer program according to the present invention having program code means is designed to carry out and/or generate the mapping rule of the method according to the present invention when this computer program is executed on a computer or an appropriate computing unit. 
         [0022]    The computer program product according to the present invention having program code means which are stored on a computer-readable data carrier is provided for carrying out and/or generating the mapping rule of the method according to the present invention when this computer program is carried out on a computer or an appropriate computing unit, in particular a device according to the present invention. 
         [0023]    Further advantages and embodiments of the present invention result from the description and the accompanying drawing. 
         [0024]    It is understood that the features described above and to be explained below may be used not only in the particular combination stated, but also in other combinations or alone without departing from the scope of the present invention. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0025]      FIG. 1  shows a function of a functional model composed of two subfunctions, to which the method according to the present invention may be applied. 
           [0026]      FIG. 2  shows the components of one of the subfunctions illustrated in  FIG. 1 . 
           [0027]      FIG. 3  shows the components of the other subfunction illustrated in  FIG. 1 . 
           [0028]      FIG. 4  shows the function and the subfunction within a functional model hierarchy. 
           [0029]      FIG. 5  shows the platform software components within the hierarchy. 
           [0030]      FIG. 6  shows the graphic representation of a mapping rule. 
           [0031]      FIG. 7  shows a schematic illustration of one preferred specific embodiment of the method according to the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0032]      FIG. 1  shows a function designated overall by reference numeral  100 . The highest hierarchical level of the function is illustrated. Function  100  has a first subfunction  110  and a second subfunction  120 . The function also has a sensor component  130  which provides its sensor signal to both subfunctions  110  and  120 . 
         [0033]      FIG. 2  shows the hierarchy composed of components of subfunction  110 . The highest hierarchical level is designated by reference numeral  110 . Subfunction  110  has a local sensor component  111  and two local actuator components  112 ,  113 . The subfunction also has a leaf component  114 . Leaf component  114  is designed as a computation component which relates values from local sensor component  111  to signals from function-wide sensor component  130  and uses the computation results thereof to control local actuator components  112 ,  113 . 
         [0034]      FIG. 3  shows the hierarchy composed of components of subfunction  120 . The highest hierarchical level is designated by reference numeral  120 . Subfunction  120  has a local sensor component  121 , two local leaf components  122 ,  123 , and a local actuator component  124 . 
         [0035]    Leaf component  122  is designed as a computation component which relates values from local sensor component  121  to signals from function-wide sensor component  130  and delivers the computation results to next leaf component  123 . Leaf component  123  also carries out computations, for example, and uses the results thereof to control local actuator component  124 . 
         [0036]      FIG. 4  shows two hierarchical levels of function  100 . Function  100  has first subfunction  110  and second subfunction  120 . The function also has sensor component  130  which provides its sensor signal to both subfunctions  110  and  120 . 
         [0037]    Subfunction  110  has local sensor component  111 , two local actuator components  112 ,  113 , and leaf component  114  which relates the values from local sensor component  111  to signals from function-wide sensor component  130  and uses the computation results to control local actuator components  112 ,  113 . Sensor component  111  and actuator components  112 ,  113  are functionally encapsulated within subfunction  110 . 
         [0038]    Subfunction  120  has local sensor component  121 , two local leaf components  122 ,  123 , and local actuator component  124 . 
         [0039]    Leaf component  122  relates the values from local sensor component  121  to signals from function-wide sensor component  130  and delivers the computation results to next leaf component  123 , which also carries out computations, for example, and uses the results thereof to control local actuator component  124 . Sensor component  121  and actuator component  124  are functionally encapsulated within subfunction  120 . 
         [0040]      FIGS. 1 through 4  show various views within the hierarchical levels which are possible for illustrated function  100  together with its subfunctions  110 ,  120 . 
         [0041]      FIG. 5  shows the mapping of function  100 , equivalent to  FIG. 4 , after the introduction of platform software components, for example for experimental hardware. The introduction violates the locality principle, and the functional encapsulation of the sensor and actuator components is lost. 
         [0042]    Function  100  in turn has subfunctions  110  and  120  together with their leaf components  122 ,  123 , and  114 . Input platform software component  140  and output platform software component  150  are illustrated adjacent thereto. Input platform software component  140  has a number of channel components  141  through  146  which correspond to the physical characteristics of the associated experimental hardware. Likewise, output platform software component  150  has a number of channel components  151  through  156  which correspond to the physical characteristics of the associated experimental hardware. Channel components, i.e., channels,  142 ,  143 ,  145 ,  152 ,  153 ,  154  are not occupied or connected. 
         [0043]    In this platform-oriented view, all connections between channel and leaf components are globally visible. Sensor components  130 ,  111 , and  121 , present in the previous views in  FIGS. 1 through 4 , have been replaced by channels  144 ,  146 , and  141  of input platform software component  140 ; namely,  130  has been replaced by  144 ,  111  by  146 , and  121  by  141 . 
         [0044]    Likewise, actuator components  124 ,  113 , and  112  have been replaced by channels  151 ,  155 , and  156  of output platform software component  150 ; namely,  124  has been replaced by  151 ,  113  by  155 , and  112  by  156 . 
         [0045]    In this illustration the connections from the channels to the leaf components, discernible for example in the connection of channel  144  to leaf components  110  and  130 , run separately (unbundled). It is also possible to run the connection jointly (bundled). This is possible when the connected leaf components are present on one hierarchical level. In one such case (not shown), the connection runs jointly from the channel to the hierarchical level, and is not split (unbundled) until it reaches the hierarchical level. It is understood that this channel bundling and separation may be used for the connections of leaf components for both the input and the output platform software components. 
         [0046]      FIG. 6  shows the mapping of function  100 , equivalent to  FIG. 4 , after the introduction of platform software components, for example for experimental hardware, according to one preferred specific embodiment of the method according to the present invention. 
         [0047]    Function  100  has the two subfunctions  110 ,  120  and sensor component  130 , which provides its sensor signal to both subfunctions  110  and  120 . 
         [0048]    Subfunction  110  has local sensor component  111 , two local actuator components  112 ,  113 , and leaf component  114 . Sensor component  111  and actuator components  112 ,  113  are functionally encapsulated within subfunction  110 . 
         [0049]    Subfunction  120  has local sensor component  121 , two local leaf components  122 ,  123 , and local actuator component  124 . Sensor component  121  and actuator component  124  are functionally encapsulated within subfunction  120 . 
         [0050]    Also illustrated are input platform software component  140  having channels  141  through  146 , and output platform software component  150  having channels  151  through  156 . The number of channels corresponds to the physical characteristics of the associated experimental hardware. Channels  142 ,  143 ,  145 ,  152 ,  153 ,  154  are not occupied or connected. 
         [0051]    The mapping rule for one preferred specific embodiment of the method according to the present invention is graphically represented via black arrows  160  through  165 . Mapping arrows  160  through  165  together with platform software components  140  and  150  are not visible during the modeling phase. 
         [0052]    In the conventional method a model is generated according to  FIG. 5  in the modeling phase, for experimental hardware, for example. In one preferred embodiment of the method according to the present invention, a model may instead be generated according to  FIG. 4  or  FIG. 6 , in which local sensor and actuator components  130 ,  121 ,  124 ,  111 ,  112 ,  113  are used as placeholders for channel components  141  through  146  and  151  through  156  of platform software components  140  and  150 . 
         [0053]    According to one preferred specific embodiment of the method according to the present invention, the mapping rule is present in  FIG. 6  as graphic representation  160  through  165 . 
         [0054]    It is also preferred to generate a model containing placeholders according to  FIG. 4  or  FIG. 6  from a hierarchical model already present in the platform view according to  FIG. 5 . 
         [0055]    One preferred embodiment of the method according to the present invention is illustrated in  FIG. 7 . The following method steps are carried out, based on a model in the platform view. 
         [0056]    In step  701 , starting from a channel component of the input software component, a connection is followed via each connected hierarchical component until a leaf component or a channel separation is reached. 
         [0057]    In step  702  a determination is made as to how many components and channel separations are connected to the channel. If the channel is connected to exactly one component or channel separation, step  703   a  follows. If the channel is connected to more than one component and/or channel separation, step  703   b  follows. 
         [0058]    In step  703   a  the connection of the channel to the component or channel separation is broken, and a local sensor component is generated as a placeholder on the hierarchical level of the leaf function which contains the component or channel separation, and is connected to the leaf components that were originally connected directly to the channel or the channel separation. The channel separation is removed. 
         [0059]    In step  703   b  a search is made for any additional component or channel separation which is connected to the channel and which determines the hierarchical level of the additional component or channel separation. In step  704  a local sensor component is applied as a placeholder on the highest common hierarchical level, and is connected to the leaf components and/or hierarchically subordinate channel separations. Channel separations on the highest hierarchical level are removed. The connection of the channel to the leaf components and/or channel separations is interrupted. 
         [0060]    In step  705 , for each sensor component generated in  703   a  or  704  an entry is generated in, for example, a list-type structure which associates the name or identifier of the added local sensor component (placeholder) with the corresponding channel component of the input platform software component. 
         [0061]    In step  706  the next channel of the input platform software components connected to leaf components is determined, and the procedure continues with step  701 . Step  711  follows if there is no additional connected channel. 
         [0062]    In step  711 , starting from a channel component of the output software component, a connection is followed via each connected hierarchical component until a leaf component or a channel separation is reached. 
         [0063]    In step  712  a determination is made as to how many components and channel separations are connected to the channel. If the channel is connected to exactly one component or channel separation, step  713   a  follows. If the channel is connected to more than one component and/or channel separation, step  713   b  follows. 
         [0064]    In step  713   a  the connection of the channel to the component or channel separation is broken, and a local actuator component is generated as a placeholder on the hierarchical level of the leaf function which contains the component or channel separation, and is connected to the leaf components that were originally connected directly to the channel or the channel separation. The channel separation is removed. 
         [0065]    In step  713   b  a search is made for any additional component or channel separation which is connected to the channel and which determines the hierarchical level of the additional component or channel separation. In step  714  a local actuator component is applied as a placeholder on the highest common hierarchical level, and is connected to the leaf components and/or hierarchically subordinate channel separations. Channel separations on the highest hierarchical level are removed. The connection of the channel to the leaf components and/or channel separations is interrupted. 
         [0066]    In step  715 , for each actuator component generated in  713   a  or  714  an entry is generated in the list-type structure which associates the name or identifier of the added local actuator component (placeholder) with the corresponding channel of the output platform software component. 
         [0067]    In step  716  the next channel of the input platform software component connected to leaf components is determined, and the procedure continues with step  711 . Step  720  follows if there is no additional connected channel. 
         [0068]    In step  720  the placeholders are replaced by the platform software components or the channels thereof, using the generated mapping rule according to the list-type structure, and executable program code is generated. 
         [0069]    In step  721 , the executable program code according to one preferred specific embodiment of the method according to the present invention is transferred to the computer device, which advantageously is experimental hardware. 
         [0070]    In step  722  the computer device is operated using the transferred executable program code.