This content is not included in your SAE MOBILUS subscription, or you are not logged in.
Methods for Modeling and Code Generation for Custom Lookup Tables
ISSN: 0148-7191, e-ISSN: 2688-3627
Published April 12, 2010 by SAE International in United States
Annotation ability available
Lookup tables and functions are widely used in real-time embedded automotive applications to conserve scarce processor resources. To minimize the resource utilization, these lookup tables (LUTs) commonly use custom data structures. The lookup function code is optimized to process these custom data structures. The legacy routines for these lookup functions are very efficient and have been in production for many years. These lookup functions and the corresponding data structures are typically used for calibration tables. The third-party calibration tools are specifically tailored to support these custom data structures. These tools assist the calibrators in optimizing the control algorithm performance for the targeted environment for production.
Application software typically contains a mix of both automatically generated software and manually developed code. Some of the same calibration tables may be used in both auto generated and hand-code [ 1 ] [ 2 ]. Model Based Design (MBD) and Automatic Code Generation (ACG) Tools support a variety of general purpose lookup table constructs. Automatically generated software for these lookup tables and functions may not meet the needs of some customers in terms of readability and efficiency. Additionally, the data format of the resulting data structures and the code for the general purpose lookup functions may not be compatible with the existing legacy code. For example, some code generation tools flatten multi-dimensional arrays making the code unable to share the same calibration tables with legacy or hand-coded portions of the application software.
This paper presents methods to model and automatically generate efficient code and the necessary data structures for the custom lookup tables and functions. The proposed graphical LUT modeling blocks encapsulate highly optimized, readable, and reusable code that can be used in multiple environments such as model-in-loop, software-in-loop, and hardware-in-loop without modifications. The encapsulated code uses the same data storage format as the legacy software or manually generated code and thus allows integration, without additional processing, with the rest of the application software.
CitationNallapa, V., Syed, F., Russell, J., Spiteri, R. et al., "Methods for Modeling and Code Generation for Custom Lookup Tables," SAE Technical Paper 2010-01-0941, 2010, https://doi.org/10.4271/2010-01-0941.
- Syed, F. Nallapa, R. Grand, K. Ramaswamy, D. “Integrated Modeling Environment for Detailed Algorithm Design, Simulation and Code Generation,” SAE Technical Paper 2007-01-0274 2007
- Syed, F. Nallapa, R. Jiang, F. Semenov, S. “Automated Migration of Legacy Functions and Algorithms to Model Based Design,” SAE Technical Paper 2008-01-0747 2008
- Syed, F. Czubay, J. “Improving the Efficiency of Production Level Algorithm Development for an SUV HEV Powertrain,” SAE Technical Paper 2004-01-3039 2004
- Wartnaby, C.E. Bennett, S.M. Ellims, M. Raju, R.R. et al. “Auto-Generated Production Code Development for Ford/Think Fuel Cell Vehicle Programme,” SAE Technical Paper 2003-01-0863 2003
- Erkkinen, T. Breiner, S. “Automatic Code Generation - Technology Adoption Lessons Learned from Commercial Vehicle Case Studies,” SAE Technical Paper 2007-01-4249 2007