source: Deliverables/D2.2/8051/README @ 1939

Last change on this file since 1939 was 1700, checked in by tranquil, 9 years ago

updated README

File size: 5.3 KB
Line 
1 Description
2-------------
3
4  This is an experimental annotating C compiler that was built upon
5  the CIL parser[1], Xavier Leroy's translation from C to Clight, and
6  an existing back-end compiler for a register transfer language to a
7  subset of the MIPS assembly language[2].
8
9  We rewrote the whole chain from Clight down to ASM, targetting the
10  8051 architecture. We extended interpreters for the intermediate
11  languages to output a list of labels which denote key control points
12  of the program that   have been crossed during the interpretation.
13  These labels are the places where the code can be instrumented to
14  obtain a precise cost annotation. Thus, in that experiment, the
15  annotation function is the composition of a labelling function
16  followed by an instrumentation function. Labels are moreover indexed
17  by iterations in loop, so that some loop transformations can be
18  carried out without impacting the approach. Other implemented
19  optimizations are constant propagation, copy propagation and partial
20  redundancy elimination.
21
22  The architecture of the compiler is described in full details in the
23  documentation of this development, which can be found in this source
24  tree at doc/html/index.html.
25
26[1] http://cil-parser.sourceforge.net/
27[2] http://www.enseignement.polytechnique.fr/informatique/INF564/petit.tar.gz
28
29 Licence
30---------
31
32  This piece of code must not be distributed. It is addressed to the
33  CerCo partners only.
34
35 Requirements
36--------------
37
38  - ocaml    (>= 3.12)
39  - menhir   (>= 20090505)
40  - CIL      (included in the distribution)
41  - GNU Make (>= 3.8)
42  - gcc
43
44 Compilation
45-------------
46
47  You can compile this compiler using the following command:
48
49  % make
50 
51  (assuming that you are located at the root of the source tree)
52
53 Installation
54--------------
55
56  To install the compiler in your favorite system hierarchy, use:
57
58  % PREFIX=your-directory make install
59
60  The executable "acc" will be installed in the subdirectory "bin/" of
61  "your-directory".
62
63 Usage
64-------
65
66Usage: acc.native [options] file...
67  -l                        Choose the target language between:
68                            Clight, Cminor, RTLabs, RTL, ERTL, LTL, LIN, ASM
69                            [default is ASM]
70  -a                        Add cost annotations on the source code.
71  -i                        Interpret the compiled code.
72  -is                       Interpret all the compilation passes.
73  -d                        Debugging mode.
74  -o                        Prefix of the output files.
75  -asm-pretty               Output a pretty-printed assembly file.
76  -lustre                   Input file is a Lustre file.
77  -remove-lustre-externals  Remove Lustre externals.
78  -lustre-test              Input file is a Lustre file, testing requested.
79  -lustre-test-cases        Set the number of test cases when testing a Lustre
80                            file.
81                            [default is 100]
82  -lustre-test-cycles       Set the number of cycles for each case when testing
83                            a Lustre file.
84                            [default is 100]
85  -lustre-test-min-int      Random int minimum value when testing a Lustre file.
86                            [default is -1000]
87  -lustre-test-max-int      Random int maximum value when testing a Lustre file.
88                            [default is 1000]
89  -peel                     Apply loop peeling.
90                            [reindexing transformation, done in Clight]
91  -cst-prop                 Apply constant propagation.
92                            [done in RTLabs]
93                            [done in RTL]
94  -cpy-prop                 Apply copy propagation.
95                            [done in RTLabs]
96  -pre                      Apply partial redundancy elimination.
97                            [done in RTLabs]
98  -unroll-for               Apply loop unrolling, specifying factor.
99                            [reindexing transformation, done in Clight]
100  -unroll                   Apply loop unrolling.
101                            [reindexing transformation, done in Clight]
102  -peeph                    Apply some basic peephole optimizations.
103                            [done in LIN]
104  -O                        Apply some optimizations.
105  -no-cost-tern             Replace cost ternary expressions with equivalent
106                            branch statements.
107  -no-reindex               Prevent optimizations that reindex labels.
108  -dev                      Playground for developers.
109  -help                     Display this list of options
110  --help                    Display this list of options
111
112 Test-suite
113------------
114
115  You can optionnally check that compilation went well by confronting
116  the freshly built compiler to our test-suite. At the root of the
117  source tree, use:
118
119  % make check
120
121 mcu8051ide
122------------
123
124  The object code can be simulated using the mcu8051ide[3] emulator. The code
125  makes use of an external memory and that the usage of such memory is not the
126  default option in mcu8051ide. In order to enable this option, click on the
127  'Project' menu, and then on 'Edit project'. There is a box to enable 'External
128  RAM (XDATA)' and a scrolling bar to specify its size (we suggest to use the
129  maximum possible). Also, since the produced code might be too big for standard
130  memory, it is recommended to enable 'External ROM/FLASH (XCODE)' to its
131  maximum size.
132
133[3] http://mcu8051ide.sourceforge.net/
Note: See TracBrowser for help on using the repository browser.