* sim-main.h: shadow NUM_CORE_REGS from tm-txvu.h
[deliverable/binutils-gdb.git] / sim / mips / README.Cygnus
1 This directory contains two very different simulators:
2
3 o gencode (old)
4
5 Gencode.c outputs a single monolithic file that is
6 #included by interp.c
7
8 o igen (new)
9
10 The *.igen files are used as inputs to ../igen/igen.
11 A number of separate, fairly modula files, are created.
12
13 The new simulator has a number of advantages:
14
15 o builtin support for multi-simming (single simulator
16 image supporting a number of different instruction
17 set architectures).
18
19 o Easier maintenance. The input files are not confused
20 by an intermixing with the generator code.
21
22 gencode continues to exist so that old architectures can be emulated.
23 *.igen should be used when adding new architectures or adding
24 instructions to an existing ISA.
25
26 Known bugs?
27
28 In mips.igen, the semantics for many of the instructions were created
29 using code generated by gencode. Those semantic segments could be
30 greatly simplified.
31
32
33 ----
34
35 Old README.Cygnus ...
36
37 > README.Cygnus
38 -------------------------------------------------------------------------------
39
40 The following are the main reasons for constructing the simulator as a
41 generator:
42
43 1) Avoid large fixed decode source file, with lots of #ifs controlling
44 the compilation. i.e. keep the source cleaner, smaller and easier
45 to parse.
46
47 2) Allow optimum code to be created, without run-time checks on
48 instruction types. Ensure that the simulator engine only includes
49 code for the architecture being targetted. e.g. This avoids
50 run-time checks on ISA conformance, aswell as increasing
51 throughput.
52
53 3) Allow updates to the instruction sets to be added quickly. Having a
54 table means that the information is together, and is easier to
55 manipulate. Having the table generate the engine, rather than the
56 run-time parse the table gives higher performance at simulation
57 time.
58
59 4) Keep all the similar simulation code together. i.e. have a single
60 place where, for example, the addition code is held. This ensures that
61 updates to the simulation are not spread over a large flat source
62 file maintained by the developer.
63
64 -------------------------------------------------------------------------------
65
66 To keep the simulator simple (and to avoid the slight chance of
67 mis-matched files) the manifests describing an engine, and the
68 simulator engine itself, are held in the same source file.
69
70 This means that the engine must be included twice, with the first pass
71 controlled by the SIM_MANIFESTS definition.
72
73 -------------------------------------------------------------------------------
74 > EOF README.Cygnus
This page took 0.033807 seconds and 4 git commands to generate.