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