]>
Commit | Line | Data |
---|---|---|
8ad57737 JSC |
1 | > README.Cygnus |
2 | ------------------------------------------------------------------------------- | |
3 | ||
4 | The following are the main reasons for constructing the simulator as a | |
5 | generator: | |
6 | ||
7 | 1) Avoid large fixed decode source file, with lots of #ifs controlling | |
8 | the compilation. i.e. keep the source cleaner, smaller and easier | |
9 | to parse. | |
10 | ||
11 | 2) Allow optimum code to be created, without run-time checks on | |
12 | instruction types. Ensure that the simulator engine only includes | |
13 | code for the architecture being targetted. e.g. This avoids | |
14 | run-time checks on ISA conformance, aswell as increasing | |
15 | throughput. | |
16 | ||
17 | 3) Allow updates to the instruction sets to be added quickly. Having a | |
18 | table means that the information is together, and is easier to | |
19 | manipulate. Having the table generate the engine, rather than the | |
20 | run-time parse the table gives higher performance at simulation | |
21 | time. | |
22 | ||
23 | 4) Keep all the similar simulation code together. i.e. have a single | |
24 | place where, for example, the addition code is held. This ensures that | |
25 | updates to the simulation are not spread over a large flat source | |
26 | file maintained by the developer. | |
27 | ||
28 | ------------------------------------------------------------------------------- | |
29 | ||
30 | To keep the simulator simple (and to avoid the slight chance of | |
31 | mis-matched files) the manifests describing an engine, and the | |
32 | simulator engine itself, are held in the same source file. | |
33 | ||
34 | This means that the engine must be included twice, with the first pass | |
35 | controlled by the SIM_MANIFESTS definition. | |
36 | ||
37 | ------------------------------------------------------------------------------- | |
38 | > EOF README.Cygnus |