Changes between Version 3 and Version 4 of Soclib Cc/Design Guide


Ignore:
Timestamp:
Mar 25, 2010, 12:51:24 PM (14 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Soclib Cc/Design Guide

    v3 v4  
    99   each of them is a different implementation of the same LRM, and
    1010   yields incompatible objects
    11  * Templated classes, with separate implementation.
    12    In order to reduce compilation time when a file changes, splitting
    13    implementation from header is the right thing to do. Unfortunatelly
    14    it involves manually instaciating source code for each used
    15    template.
     11
     12 * Templated classes. The usual way of using templated code is to
     13   put all code in .h, having template code emitted at use in main C++
     14   file.
     15
     16   This is good for small utilities, but SystemC modules may
     17   be more than 1000 lines-long, and more that 40 of them may be used
     18   in a topcell. This may yield a single translation unit with more than
     19   50000 lines of code, heavily templated. This implies some usage issues
     20   (compiler getting out of memory, unreasonnable compile times)
     21
     22   Therefore we need two features:
     23   * Separate implementation: Put template class definition and implementation
     24     in two separate files. Compile them separately.
     25
     26     This implies template code must be explicitely instanciated with some
     27     `template class Foo<parameters>;` code. It has to be done automatically.
     28   * Object reuse: Once modules built separately, we can put objects
     29     in a global repository and use the in a cached way.
     30
    1631 * Different build modes (debugging, profiling release, others ??)
    17  * Compiled objects reuse: as we may build lots of SoCs with minor
    18    modifications, reusing compiled objects from one build to the other
    19    seems interesting (considering templated C++ build time)
    2032
    2133=== Reuse of current tools ?? ===
     
    2537readibility.
    2638
     39There is no build tool known out the which does object caching and
     40template instantiation at the same time. Even if current build tools
     41may be enhanced to do the job, this is not an easy task.
     42
    2743This very tool has been implemented as a `make` wrapper before,
    2844generated Makefiles were unreadable (all templates parameters in the
    29 middle, ...), and it did not work so well. It had been developped in a
    30 week, debugged in two weeks.
     45middle, ...), and it did not work so well.
    3146
    32 Soclib-cc has been totally developped in 16 hours.
    3347
    3448= Configuration =
     
    3650In order to compile SoCLib objects, we need:
    3751 * a working SystemC installation
    38  * a working GNU-Bfd installation (used for loading binaries into the platform)
    3952 * a working GNU-C++ compiler
    4053