Abstract
Design automation for embedded systems comprising both hardware and software components demands for code generators integrated into electronic CAD systems. These code generators provide the necessary link between software synthesis tools in HW/SW codesign systems and embedded processors. General-purpose compilers for standard processors are often insufficient, because they do not provide flexibility with respect to different target processors and also suffer from inferior code quality. While recent research on code generation for embedded processors has primarily focussed on code quality issues, in this contribution we emphasize the importance of retargetability, and we describe an approach to achieve retargetability. We propose usage of uniform, external target processor models in code generation, which describe embedded processors by means of RT-level netlists. Such structural models incorporate more hardware details than purely behavioral models, thereby permitting a close link to hardware design tools and fast adaptation to different target processors. The MSSQ compiler, which is part of the MIMOLA hardware design system, operates on structural models. We describe input formats, central data structures, and code generation techniques in MSSQ. The compiler has been successfully retargeted to a number of real-life processors, which proves feasibility of our approach with respect to retargetability. We discuss capabilities and limitations of MSSQ, and identify possible areas of improvement.
Similar content being viewed by others
References
R.K. Gupta, G. De Micheli: System-Level Synthesis Using Re-Programmable Components, European Conference on Design Automation (EDAC), 1992, pp. 2–8
P. Chou, G. Boriello: Software Scheduling in the Co-Synthesis of Reactive Real-Time Systems, 31st Design Automation Conference (DAC), 1994, pp. 1–4
R. Ernst, J. Henkel, T. Benner: Hardware-Software Cosynthesis for Microcontrollers, IEEE Design & Test Magazine, no. 12, 1993, pp. 64–75
K. Buchenrieder, A. Sedlmeier, C. Veith: Design of HW/SW Systems with VLSI Subsystems Using CODES, 6th IEEE Workshop on VLSI Signal Processing, 1993, pp. 233–239
A. Kalavade, E.A. Lee: A Hardware-Software Codesign Methodology for DSP Applications, IEEE Design & Test Magazine, no. 9, 1993, pp. 16–28
R. Camposano, J. Wilberg: Embedded System Design, Design Automation for Embedded Systems, vol. 1, nos.1-2, 1996
G. Goossens, F. Catthoor, D. Lanneer, H. De Man: Integration of Signal Processing Systems on Heterogeneous IC Architectures, 5th High-Level Synthesis Workshop (HLSW), 1992, pp. 16–26
P. Paulin, C. Liem, T. May, S. Sutarwala: DSP Design Tool Requirements for the Nineties: An Industrial Perspective, Technical Report, Bell Northern Research, 1992
M. Strik, J. van Meerbergen, A. Timmer, J. Jess, S. Note: Efficient Code Generation for In-House DSP Cores, European Design and Test Conference (ED & TC), 1995, pp. 244–249
V. Zivojnovic, J.M. Velarde, C. Schläger: DSPStone - A DSP-Oriented Benchmarking Methodology, Technical Report, Dept. of Electrical Engineering, Institute for Integrated Systems for Signal Processing, University of Aachen, Germany, 1994
P. Marwedel: A new Synthesis Algorithm for the MIMOLA Software System, 23rd Design Automation Conference (DAC), 1986, pp. 271–277
P. Marwedel: Matching System and Component Behaviour in the MIMOLA Synthesis Tools, European Conference on Design Automation (EDAC), 1990, pp. 146–156
P. Marwedel: Tree-based Mapping of Algorithms to Predefined Structures, Int. Conf. on Computer-Aided Design (ICCAD), 1993, pp. 586–993
G. Krüger: A Tool for Hierarchical Test Generation, IEEE Trans. on CAD, vol. 10, no.4, 1991, pp. 519–524
U. Bieker, P. Marwedel: Retargetable Self-Test Program Generation Using Constraint Logic Programming, 32nd Design Automation Conference (DAC), 1995, pp. 605–611
P. Marwedel, W. Schenk: Cooperation of Synthesis, Retargetable Code Generation and Test Generation in the MIMOLA Software System, European Conference on Design Automation (EDAC), 1993, pp. 63–69
M.E. Conway: Proposal for an UNCOL, Comm. of the ACM, vol. 1, 1958
R.S. Glanville: A Machine Independent Algorithm for Code Generation and its Use in Retargetable Compilers, Doctoral thesis, University of California at Berkeley, 1977
R.G.G. Cattell: Formalization and Automatic Derivation of Code Generators, Doctoral thesis, Dept. of Computer Science, Carnegie-Mellon University, Pittsburgh, 1978
M. Ganapathi, C.N. Fischer, J.L. Hennessy: Retargetable Compiler Code Generation, ACM Computing Surveys, vol. 14, 1982, pp. 573–592
R.M. Stallmann: Using and Porting GNU CCV2.4, Free Software Foundation, Cambridge/Massachusetts, 1993
H. Emmelmann, F.W. Schröer, R. Landwehr: BEG - A Generator for Efficient Backends, ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), SIGPLAN Notices 24, no.7, 1989, pp. 227–237
A.V. Aho, M. Ganapathi, S.W.K Tjiang: Code Generation Using Tree Matching and Dynamic Programming, ACM Trans. on Programming Languages and Systems 11, no.4, 1989, pp. 491–516
C.W. Fraser, D.R. Hanson, T.A. Proebsting: Engineering a Simple, Efficient Code Generator Generator, ACM Letters on Programming Languages and Systems, vol. 1, no.3, 1992, pp. 213–226
D.J. DeWitt: A Machine Independent Approach to the Production of Optimal Horizontal Microcode, Doctoral thesis, Technical Report 76 DT 4, University of Michigan, 1976
S. Davidson, D. Landskov, B.D. Shriver, P.W. Mallet: Some Experiments in Local Microcode Compaction for Horizontal Machines, IEEE Trans. on Computers, vol. 30, no.7, 1981, pp. 460–477
J.A. Fisher: Trace Scheduling: A Technique for Global Microcode Compaction, IEEE Trans. on Computers, vol. 30, no.7, 1981, pp. 478–490
A. Aiken, A. Nicolau: A Development Environment for Horizontal Microcode, IEEE Trans. on Software Engineering, no. 14, 1988, pp. 584–594
R. Potasman, J. Lis, A. Nicolau, D. Gajski: Percolation Based Synthesis, 27th Design Automation Conference (DAC), 1990, pp. 444–449
T. Baba, H. Hagiwara: The MPG System: A Machine Independent Efficient Microprogram Generator, IEEE Trans. on Computers, vol. 30, no.6, 1981, pp. 373–395
S.R. Vegdahl: Local Code Generation and Compaction in Optimizing Microcode Compilers, Doctoral thesis, Dept. of Computer Science, Carnegie-Mellon University, 1982
S.R. Vegdahl: Phase Coupling and Constant Generation in an Optimizing Microcode Compiler, 15th Ann. Workshop on Microprogramming (MICRO-15), 1982, pp. 125–133
R.A. Mueller, J. Varghese: Flow Graph Machine Models in Microcode Synthesis, 16th Ann. Workshop on Microprogramming (MICRO-16), 1983, pp. 159–167
K. Rimey, P.N. Hilfinger: Lazy Data Routing and Greedy Scheduling for Application-Specific Signal Processors, 21st AnnualWorkshop on Microprogramming and Microarchitecture (MICRO-21), 1988, pp. 111–115
R. Hartmann: Combined Scheduling and Data Routing for Programmable ASIC Systems, European Conference on Design Automation (EDAC), 1992, pp. 486–490
B. Wess: On the Optimal Generation for Signal Flow Graph Computation, IEEE Int. Symp. on Circuits and Systems (ISCAS), 1990, pp. 444–447
A.V. Aho, S.C. Johnson: Optimal Code Generation for Expression Trees, Journal of the ACM, vol. 23, no.3, 1976, pp. 488–501
B. Wess: Automatic Code Generation for Integrated Digital Signal Processors, IEEE Int. Symp. on Circuits and Systems (ISCAS), 1991, pp. 33–36
A. Fauth, A. Knoll: Translating Signal Flowcharts into Microcode for Custom Digital Signal Processors, Int. Conf. on Signal Processing (ICSP), 1993, pp. 65–68
A. Fauth, G. Hommel, A. Knoll, C. M üller: Global Code Selection for Directed Acyclic Graphs, in: P.A. Fritzson (ed.): 5th Int. Conference on Compiler Construction, 1994
D. Lanneer, M. Cornero, G. Goossens, H. De Man: Data Routing: A Paradignm for Efficient Data-Path Synthesis and Code Generation, 7th Int. Symp. on High-Level Synthesis (HLSS), 1994, pp. 17–21
J. Van Praet, G. Goossens, D. Lanneer, H. De Man: Instruction Set Definition and Instruction Selection for ASIPs, 7th Int. Symp. on High-Level Synthesis (HLSS), 1994, pp. 11–16
A. Fauth, J. Van Praet, M. Freericks: Describing Instruction-Set Processors in nML, European Design and Test Conference (ED & TC), 1995, pp. 503–507
C. Liem, T. May, P. Paulin: Instruction-Set Matching and Selection for DSP and ASIP Code Generation, European Design and Test Conference (ED & TC), 1994, pp. 31–37
C. Liem, T. May, P. Paulin: Register Assignment through Resource Classification for ASIP Microcode Generation, Int. Conf. on Computer-Aided Design (ICCAD), 1994, pp. 397–402
G. Araujo, S. Malik: Optimal Code Generation for Embedded Memory Non-Homogeneous Register Architectures, 8th Int. Symp. on System Synthesis (ISSS), 1995, pp. 36–41
S. Liao, S. Devadas, K. Keutzer, S. Tjiang, A. Wang: Storage Assignment to Decrease Code Size, ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 1995
D.H. Bartley: Optimizing Stack Frame Accesses for Processors with Restricted Addressing Modes, Software - Practice and Experience, vol. 22(2), 1992, pp. 101–110
S. Liao, S. Devadas, K. Keutzer, S. Tjiang, A. Wang: Code Optimization Techniques for Embedded DSP Microprocessors, 32nd Design Automation Conference (DAC), 1995, pp. 599–604
A. Sudarsanam, S. Malik: Memory Bank and Register Allocation in Software Synthesis for ASIPs, Int. Conf. on Computer-Aided Design (ICCAD), 1995, pp. 388–392
S. Novack, A. Nicolau, N. Dutt: A Unified Code Generation Approach using Mutation Scheduling, chapter 12 in [55]
W. Schenk: Retargetable Code Generation for Parallel, Pipelined Processor Structures, chapter 7 in [55]
T. Wilson, G. Grewal, B. Halley, D. Banerji: An Integrated Approach to Retargetable Code Generation, 7th Int. Symp. on High-Level Synthesis (HLSS), 1994, pp. 70–75
A. Timmer, M. Strik, J. van Meerbergen, J. Jess: Conflict Modelling and Instruction Scheduling in Code Generation for In-House DSP Cores, 32nd Design Automation Conference (DAC), 1995, pp. 593–598
P. Marwedel, G. Goossens (eds.): Code Generation for Embedded Processors, Kluwer Academic Publishers, 1995
S. Bashford, U. Bieker, B. Harking, R. Leupers, P. Marwedel, A. Neumann, D. Voggenauer: The MIMOLA Language V4.1, Technical Report, University of Dortmund, Dept. of Computer Science, September 1994
P. Marwedel: Implementation of IF-statements in the TODOS microarchitecture synthesis system, in: G. Saucier, J. Trilhe (eds.): Synthesis for Control Dominated Circuits, IFIP Trans. A-22, North-Holland, 1993, pp. 249–262
Advanced Micro Devices: Bipolar Microprocessor Logic and Interface Data Book, Sunnyvale, 1983
L. Nowak: SAMP: A General Purpose Processor Based on a Self-Timed VLIW Structure, ACM Comp. Arch. News, vol. 15, no.4, 1987, pp. 32–39
W. Schenk: A High Speed PROLOG Implementation on a VLIW Processor, Microprocessing and Microprogramming, vol. 27, nos.1-5, 1989, pp. 601–606
C. Albrecht, S. Bashford, P. Marwedel, A. Neumann, W. Schenk: The Design of the PRIPS Microprocessor, 4th EUROCHIP Workshop on VLSI Design Training, 1993, pp. 254–259
L. Nowak: Graph Based Retargetable Microcode Compilation in the MIMOLA Design System, 20th Ann. Workshop on Microprogramming (MICRO-20), 1987, pp. 126–132
Texas Instruments: TMS320C2x User's Guide, rev. B, 1990
Motorola Inc.: DSP 56156 Digital Signal Processor User's Manual, 1992
R. Leupers, P. Marwedel: A BDD-based Frontend for Retargetable Compilers, European Design & Test Conference (ED & TC), 1995, pp. 239–243
R. Leupers, P. Marwedel: Retargetable Generation of Code Selectors from HDL Processor ModelsEuropean Design & Test Conference (ED & TC), 1997
R. Leupers, P. Marwedel: Time-constrained Code Compaction for DSPs, 8th Int. System Synthesis Symposium (ISSS), 1995, pp. 54–59
R. Leupers, P. Marwedel: Algorithms for Address Assignment in DSP Code Generation, Int. Conference on Computer-Aided Design (ICCAD), 1996
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Leupers, R., Marwedel, P. Retargetable Code Generation Based on Structural Processor Description. Design Automation for Embedded Systems 3, 75–108 (1998). https://doi.org/10.1023/A:1008807631619
Issue Date:
DOI: https://doi.org/10.1023/A:1008807631619