Skip to main content
Log in

Retargetable Code Generation Based on Structural Processor Description

  • Published:
Design Automation for Embedded Systems Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. R.K. Gupta, G. De Micheli: System-Level Synthesis Using Re-Programmable Components, European Conference on Design Automation (EDAC), 1992, pp. 2–8

  2. P. Chou, G. Boriello: Software Scheduling in the Co-Synthesis of Reactive Real-Time Systems, 31st Design Automation Conference (DAC), 1994, pp. 1–4

  3. R. Ernst, J. Henkel, T. Benner: Hardware-Software Cosynthesis for Microcontrollers, IEEE Design & Test Magazine, no. 12, 1993, pp. 64–75

    Google Scholar 

  4. 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

  5. A. Kalavade, E.A. Lee: A Hardware-Software Codesign Methodology for DSP Applications, IEEE Design & Test Magazine, no. 9, 1993, pp. 16–28

    Google Scholar 

  6. R. Camposano, J. Wilberg: Embedded System Design, Design Automation for Embedded Systems, vol. 1, nos.1-2, 1996

  7. 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

  8. P. Paulin, C. Liem, T. May, S. Sutarwala: DSP Design Tool Requirements for the Nineties: An Industrial Perspective, Technical Report, Bell Northern Research, 1992

  9. 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

  10. 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

    Google Scholar 

  11. P. Marwedel: A new Synthesis Algorithm for the MIMOLA Software System, 23rd Design Automation Conference (DAC), 1986, pp. 271–277

  12. P. Marwedel: Matching System and Component Behaviour in the MIMOLA Synthesis Tools, European Conference on Design Automation (EDAC), 1990, pp. 146–156

  13. P. Marwedel: Tree-based Mapping of Algorithms to Predefined Structures, Int. Conf. on Computer-Aided Design (ICCAD), 1993, pp. 586–993

  14. G. Krüger: A Tool for Hierarchical Test Generation, IEEE Trans. on CAD, vol. 10, no.4, 1991, pp. 519–524

    Google Scholar 

  15. U. Bieker, P. Marwedel: Retargetable Self-Test Program Generation Using Constraint Logic Programming, 32nd Design Automation Conference (DAC), 1995, pp. 605–611

  16. 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

  17. M.E. Conway: Proposal for an UNCOL, Comm. of the ACM, vol. 1, 1958

  18. R.S. Glanville: A Machine Independent Algorithm for Code Generation and its Use in Retargetable Compilers, Doctoral thesis, University of California at Berkeley, 1977

  19. R.G.G. Cattell: Formalization and Automatic Derivation of Code Generators, Doctoral thesis, Dept. of Computer Science, Carnegie-Mellon University, Pittsburgh, 1978

    Google Scholar 

  20. M. Ganapathi, C.N. Fischer, J.L. Hennessy: Retargetable Compiler Code Generation, ACM Computing Surveys, vol. 14, 1982, pp. 573–592

    Google Scholar 

  21. R.M. Stallmann: Using and Porting GNU CCV2.4, Free Software Foundation, Cambridge/Massachusetts, 1993

    Google Scholar 

  22. 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

    Google Scholar 

  23. 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

    Google Scholar 

  24. 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

    Google Scholar 

  25. 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

  26. 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

    Google Scholar 

  27. J.A. Fisher: Trace Scheduling: A Technique for Global Microcode Compaction, IEEE Trans. on Computers, vol. 30, no.7, 1981, pp. 478–490

    Google Scholar 

  28. A. Aiken, A. Nicolau: A Development Environment for Horizontal Microcode, IEEE Trans. on Software Engineering, no. 14, 1988, pp. 584–594

    Google Scholar 

  29. R. Potasman, J. Lis, A. Nicolau, D. Gajski: Percolation Based Synthesis, 27th Design Automation Conference (DAC), 1990, pp. 444–449

  30. 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

    Google Scholar 

  31. S.R. Vegdahl: Local Code Generation and Compaction in Optimizing Microcode Compilers, Doctoral thesis, Dept. of Computer Science, Carnegie-Mellon University, 1982

  32. S.R. Vegdahl: Phase Coupling and Constant Generation in an Optimizing Microcode Compiler, 15th Ann. Workshop on Microprogramming (MICRO-15), 1982, pp. 125–133

  33. R.A. Mueller, J. Varghese: Flow Graph Machine Models in Microcode Synthesis, 16th Ann. Workshop on Microprogramming (MICRO-16), 1983, pp. 159–167

  34. 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

  35. R. Hartmann: Combined Scheduling and Data Routing for Programmable ASIC Systems, European Conference on Design Automation (EDAC), 1992, pp. 486–490

  36. B. Wess: On the Optimal Generation for Signal Flow Graph Computation, IEEE Int. Symp. on Circuits and Systems (ISCAS), 1990, pp. 444–447

  37. A.V. Aho, S.C. Johnson: Optimal Code Generation for Expression Trees, Journal of the ACM, vol. 23, no.3, 1976, pp. 488–501

    Google Scholar 

  38. B. Wess: Automatic Code Generation for Integrated Digital Signal Processors, IEEE Int. Symp. on Circuits and Systems (ISCAS), 1991, pp. 33–36

  39. A. Fauth, A. Knoll: Translating Signal Flowcharts into Microcode for Custom Digital Signal Processors, Int. Conf. on Signal Processing (ICSP), 1993, pp. 65–68

  40. 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

  41. 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

  42. 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

  43. A. Fauth, J. Van Praet, M. Freericks: Describing Instruction-Set Processors in nML, European Design and Test Conference (ED & TC), 1995, pp. 503–507

  44. 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

  45. 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

  46. 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

  47. 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

  48. D.H. Bartley: Optimizing Stack Frame Accesses for Processors with Restricted Addressing Modes, Software - Practice and Experience, vol. 22(2), 1992, pp. 101–110

    Google Scholar 

  49. 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

  50. 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

  51. S. Novack, A. Nicolau, N. Dutt: A Unified Code Generation Approach using Mutation Scheduling, chapter 12 in [55]

  52. W. Schenk: Retargetable Code Generation for Parallel, Pipelined Processor Structures, chapter 7 in [55]

  53. 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

  54. 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

  55. P. Marwedel, G. Goossens (eds.): Code Generation for Embedded Processors, Kluwer Academic Publishers, 1995

  56. 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

  57. 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

  58. Advanced Micro Devices: Bipolar Microprocessor Logic and Interface Data Book, Sunnyvale, 1983

  59. 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

    Google Scholar 

  60. W. Schenk: A High Speed PROLOG Implementation on a VLIW Processor, Microprocessing and Microprogramming, vol. 27, nos.1-5, 1989, pp. 601–606

    Google Scholar 

  61. 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

  62. L. Nowak: Graph Based Retargetable Microcode Compilation in the MIMOLA Design System, 20th Ann. Workshop on Microprogramming (MICRO-20), 1987, pp. 126–132

  63. Texas Instruments: TMS320C2x User's Guide, rev. B, 1990

  64. Motorola Inc.: DSP 56156 Digital Signal Processor User's Manual, 1992

  65. R. Leupers, P. Marwedel: A BDD-based Frontend for Retargetable Compilers, European Design & Test Conference (ED & TC), 1995, pp. 239–243

  66. R. Leupers, P. Marwedel: Retargetable Generation of Code Selectors from HDL Processor ModelsEuropean Design & Test Conference (ED & TC), 1997

  67. R. Leupers, P. Marwedel: Time-constrained Code Compaction for DSPs, 8th Int. System Synthesis Symposium (ISSS), 1995, pp. 54–59

  68. R. Leupers, P. Marwedel: Algorithms for Address Assignment in DSP Code Generation, Int. Conference on Computer-Aided Design (ICCAD), 1996

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1008807631619

Navigation