Abstract:
A model calculation unit for calculating a data-based function model, in particular a Gaussian process model, in a control unit, including: a processor core to carry out a strictly hardware-based calculation of an algorithm for a data-based function model, the data-based function model being calculated using provided calculation data, in particular hyperparameters and node data; and a strictly hardware-based conversion unit to provide the processor core with at least a portion of the calculation data, in particular the provided node data, in a predefined number format.

Description:
RELATED APPLICATION INFORMATION 
       [0001]    The present application claims priority to and the benefit of German patent application no. 10 2013 212 840.1, which was filed in Germany on Jul. 2, 2013, the disclosure of which is incorporated herein by reference. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to model calculation units for control units, in particular hardwired model calculation units as hardware units, in which or with the aid of which data-based function models may be calculated, in particular for controlling engine systems. The present application also relates to the provision and processing of configuration data of data-based function models in such model calculation units. 
       BACKGROUND INFORMATION 
       [0003]    Control units having a main processing unit and a separate model calculation unit for calculating data-based function models are known from the related art. The publication DE 10 2010 028 266 A1, for example, discusses a control unit having an additional logic circuit as a model calculation unit. The additional logic circuit is configured on the hardware side for calculating exponential functions and sum functions. This makes it possible to support in a hardware unit Bayesian regression methods which are required in particular for calculating Gaussian process models. 
         [0004]    The model calculation unit is configured to carry out mathematical processes for calculating the data-based function model based on parameters/hyperparameters and node or training data. In particular, the model calculation unit is configured on the hardware side for efficiently calculating exponential functions to thereby enable calculation of Gaussian process models at a higher computation rate than is possible in the main processing unit using suitable software. 
         [0005]    In general, configuration data which contain parameters and nodes for calculating the data-based function model are provided for calculation in the model calculation unit, and the calculations based on the configuration data are carried out by the hardware of the model calculation unit. 
         [0006]    The node data are generally predefined as floating point data or fixed point data. When implementing in hardware, however, the algorithms which are based on floating point arithmetic must be implemented separately from the algorithms which are based on fixed point arithmetic. 
         [0007]    The publication U.S. Pat. No. 4,675,809 discusses the use of various floating point data types in a system by employing a conversion unit. 
         [0008]    The publication U.S. Pat. No. 5,161,117 discusses a method for utilizing various floating point values having various bases. 
       SUMMARY OF THE INVENTION 
       [0009]    Provided according to the present invention are the hardware model calculation unit as described herein and the control unit including a model calculation unit as described herein. 
         [0010]    Additional advantageous embodiments of the present invention are specified in the further descriptions herein. 
         [0011]    According to one first aspect, a model calculation unit for calculating a data-based function model, in particular a Gaussian process model, is provided in a control unit, including:
       a processor core configured to carry out a strictly hardware-based calculation of an algorithm for a data-based function model, the data-based function model being calculated using provided calculation data, in particular hyperparameters and node data; and   a strictly hardware-based conversion unit which is configured to provide the processor core with at least a portion of the provided calculation data, in particular node data, in a predefined number format.       
 
         [0014]    In addition to a software-controlled main processing unit, the control units described at the outset include a model calculation unit implemented in hardware, which along with an exponential function calculation unit also include hardware logic for calculating sums in at least one loop. The calculation resorts to predefined calculation data, for Gaussian process models, parameters and node data in particular, which are stored in a memory area accessible for the model calculation unit. 
         [0015]    In the configuration of the model calculation unit, the hardware blocks are generally configured in such a way that calculations may be calculated with the values of the maximally occurring bit resolution. In conventional control units, this corresponds, for example, to a 32-bit resolution in floating point number format. 
         [0016]    The calculation data are generally predefined in the form of floating point data or fixed point data. When implementing in hardware, however, the algorithms which are based on floating point arithmetic must be implemented separately from the algorithms which are based on fixed point arithmetic. In order, however, to limit the space requirements for an integrated configuration of the hardware of the model calculation unit, only the processing of the calculation data is provided in a number format. If calculation data are wholly or partially present in another number format, then a preprocessing for the relevant calculation data must be provided in order to render these in the desired number format, i.e., either in a fixed point number format a or floating point number format. 
         [0017]    While it is sufficient for calculating data-based function models that the calculation data are provided, for example, with an accuracy of 8 bits or 16 bits as fixed point or floating point values, floating point calculations take place in the main processing unit generally with 32-bit wide floating point values. 
         [0018]    In order to minimize the memory requirements for providing calculation data and still provide a model calculation unit having an option for calculating calculation data with great accuracy, a model calculation unit may therefore be provided which includes a conversion unit as an input stage. With the conversion unit it is possible to directly provide the model calculation unit with other number formats of calculation data for the calculation such as, for example, values in 16-bit floating point number format or values in 16-bit fixed point number format, and to use these there without providing a separate hardware in the model calculation unit. 
         [0019]    The conversion unit also makes it possible for a conversion of the data necessary for the calculation not to have to be carried out in the main processing unit, the capacity of which is normally limited in control units. Sensor data which are normally provided as fixed point values may also be suitably converted on the fly in the conversion unit, i.e., without intervention from the main processing unit, with the aid of a provided shared exponential parameter. 
         [0020]    The conversion unit may also be configured to carry out, as a function of a selection signal, a conversion of provided calculation data of a number format which differs from the predefined number format into the predefined number format. 
         [0021]    According to one specific embodiment, the conversion unit may include at least one conversion block for converting data of a first number format into data of the predefined number format, as well as a multiplexer, in order, as a function of the selection signal, to forward to the processor core either the provided calculation data or the calculation data converted by one of the at least one conversion blocks into the predefined number format. 
         [0022]    It may be provided that the predefined number format corresponds to a 32-bit floating point number format. 
         [0023]    In particular, a first conversion block may be configured to convert data from a floating point number format, which has a bit number lower than the predefined number format, into the predefined number format. 
         [0024]    A second conversion block may be configured to convert data from a fixed point number format into the predefined number format. 
         [0025]    The second conversion block may also be configured to take into account a predefined exponent value when converting data from the fixed point number format into the predefined number format. 
         [0026]    According to another aspect, a control unit is provided, in particular, structurally integrated, for example, in the form of a chip. The control unit includes:
       a main processing unit for software-controlled execution of functions;   a memory unit for storing calculation data in at least one number format; and   the above-mentioned model calculation unit.       
 
         [0030]    In addition, the main processing unit may provide a selection signal to the model calculation unit as a function of the number format in which the calculation data are stored in the memory unit, so that as a function of the selection signal, the conversion unit carries out a conversion of the calculation data into the predefined number format. 
         [0031]    Specific embodiments of the present invention are explained in greater detail below with reference to the appended drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0032]      FIG. 1  shows a schematic representation of a control unit including a main processing unit and a model calculation unit. 
           [0033]      FIG. 2  shows a schematic representation of the model calculation unit of  FIG. 1  having a conversion unit. 
           [0034]      FIG. 3  shows a detailed representation of the conversion unit of  FIG. 2 . 
           [0035]      FIG. 4  shows a representation of a conversion from a 16-bit fixed point value having a shared exponent into a value in floating point number format. 
       
    
    
     DETAILED DESCRIPTION 
       [0036]      FIG. 1  shows a schematic representation of a hardware architecture for an integrated control unit  1  in which a main processing unit  2 , for example, in the form of a microcontroller, as well as a model calculation unit  3  for hardware-based calculation of a, in particular data-based function model are provided in an integrated manner (for example, monolithic). Main processing unit  2  and model calculation unit  3  communicate with each other via a system bus  6 . Model calculation unit  3  is configured exclusively as hardware (hardwired) and is therefore unable to execute any software code. For this reason, no processor or the like is provided in model calculation unit  3  either. This makes possible a resource-optimized implementation of such a model calculation unit  3 . 
         [0037]    Control unit  1  also includes an internal memory unit  4  and a DMA unit  5  (DMA—direct memory access) which is connected to main processing unit  2  and model calculation unit  3  via an internal communication link  6  such as, for example, an internal data bus. 
         [0038]    In  FIG. 2 , model calculation unit  3  is shown in detail. It is apparent that a processor core  31  having an exponential unit  32 , an addition and multiplication unit  33  which in some cases may be provided in combination in a shared FMA unit (FMA=fused multiply add), in addition to a logic unit  34  for providing a fixed computation sequence using aforementioned units  32 ,  33 , is provided for calculating a data-based function model. 
         [0039]    In general, two IEEE-754 floating point standards as a data format are known. The floating point standards correspond in the case of simple accuracy to a 32-bit resolution, i.e., one sign-bit, 8 exponent bits and 23 mantissa bits, and in the case of half the accuracy to a 16-bit resolution, i.e. one sign-bit, 
         [0040]    5 exponent bits and 10 mantissa bits. Moreover, in the case of a 16-bit fixed point number format, 16-bit values are used to represent a data value without the provision of an exponent. 
         [0041]    In addition to the 16-bit fixed point number format, a shared exponent for a series of data values may be provided, so that the data are assigned a common order of magnitude. 
         [0042]    To enable model calculation unit  3  to use data values having different data formats, a conversion unit  35  is provided in model calculation unit  3 , as is shown in greater detail in conjunction with  FIG. 3 . Conversion unit  35  converts calculation data, i.e., for example, the node data, into a predefined number format such as, for example, into a 32-bit floating point number format, and provides this to the hardware which reproduces the calculation algorithm, in model calculation unit  3  as processing data V. The data elements of the calculation data may also be present in various number formats, so that the calculation data are correspondingly converted to the number format of the data elements. 
         [0043]    Conversion unit  35  includes a multiplexer  36  for providing converted processing data V for calculating the data-based function model in model calculation unit  3 . In the present case, the node data of model calculation unit  3  may be provided as data D32F in the form of a 32-bit floating point number format (floating point format with simple accuracy), data D16F in the form of a 16-bit floating point number format (floating point number format with half accuracy) or data D16 in the form of a 16-bit fixed point number format in conjunction with a predefined shared exponent CE. 
         [0044]    Data D16F in the 16-bit floating point number format and data D16 in the 16-bit fixed point number format are converted in a known manner in corresponding first and second conversion blocks  37 ,  38  into a 32-bit floating point number format, and together with data D32F in 32-bit floating point number format which do not have to be converted, are fed to multiplexer  36 . Accordingly, one of data formats D16F, D32F, D16 is selected in multiplexer  36  with the aid of a selection signal S which, for example, may be provided by main processing unit  2 . 
         [0045]    The conversion from the 16-bit floating point number format into the 32-bit floating point number format in first conversion block  37  is a simple bit operation. The 5 bits for the exponent which are interpreted as signed ±15 (excess−15), and the 32-bit floating point number format which uses 8 bits for the exponent which are interpreted as signed ±127 (excess−127), result in an exponent conversion by an addition of  112  (i.e., 127−15), which typically in an integrated configuration may be implemented in a space-efficient manner as a multiplexer having two inputs, which is controlled by the highest exponent bit, a zero value, an indication for +∞ or −∞, and NaN (not-a-number) being treated as special cases, so that the conversion result yields the same value. The expansion of the mantissa values from 10 bits to 23 bits uses a simple insertion of zeroes as the lowest-order bits, which may be achieved, for example, by a left shift operation by 13 digits or a concatenation having 10 mantissa bits and 13 zero bits. 
         [0046]    The conversion from a 16-bit fixed point number format into a 32-bit floating point number format may be implemented, for example, with the aid of second conversion block  38  shown in  FIG. 4 . At the same time predefined shared exponent CE may be taken into account. Second conversion block  38  of  FIG. 4  makes it possible to generate a 32-bit floating point value from a signed 16-bit fixed point number format. 
         [0047]    In the process, the sign-bit of the input value is extracted in a sign extraction block  41  and is used as the sign-bit for the output value. In addition, the sign-bit is extracted in a value extraction block  42  from the input value and subsequently shifted to the left in a normalization block  43  by a bit shift operation until the highest value bit corresponds to “1,” a zero value of the input value being treated as a special case, so that the conversion result also yields zero. Normalization block  43  supplies an indication of a number of the required bit shifts to an exponent addition unit  44 , which subtracts the number of bit shifts from the value of the shared exponent and provides this as the exponent value of the 32-bit floating point value as the conversion result. The conversion result is produced by combining the mantissa value obtained in normalization block  43 , the sign-bit extracted in sign extraction block  41  and the exponent value obtained in exponent addition unit  44 . The conversion result is then provided to model calculation unit  3  as processing data V which contains the converted node data.