Added machine plugin project to repository
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / MachineDefinition.java
1 package net.mograsim.machine;\r
2 \r
3 import java.util.Set;\r
4 \r
5 public interface MachineDefinition {\r
6 \r
7         /**\r
8          * Creates a new instance of the machine\r
9          * \r
10          * @return a new object of an {@link Machine} implementation.\r
11          * @author Christian Femers\r
12          */\r
13         Machine createNew();\r
14 \r
15         /**\r
16          * Returns the schema that all possible ISAs (Instruction Set Architecture) must\r
17          * be based on.\r
18          * \r
19          * @return an {@link ISASchema} implementation fitting the machine\r
20          * @author Christian Femers\r
21          */\r
22         ISASchema getISASchema();\r
23 \r
24         /**\r
25          * Returns a set of all {@link Register}s present in the machine.\r
26          * \r
27          * @return all registers present in the machine.\r
28          * @author Christian Femers\r
29          */\r
30         Set<Register> getRegisters();\r
31 \r
32         /**\r
33          * The number of bits used by the machine to address main memory. Note that this\r
34          * should be the number of bits used in the CPU, not a possibly different one\r
35          * used by the bus system.\r
36          * \r
37          * @return the number of bits used by the CPU\r
38          * @see MainMemoryDefinition#getMemoryAddressBits()\r
39          * @author Christian Femers\r
40          */\r
41         int getAddressBits();\r
42 \r
43         /**\r
44          * Returns the definition of the machines main memory.\r
45          * \r
46          * @return the {@link MainMemoryDefinition} that defines the main memory.\r
47          * @author Christian Femers\r
48          */\r
49         MainMemoryDefinition getMainMemoryDefinition();\r
50 }\r