1 package net.mograsim.machine;
\r
3 import java.util.Set;
\r
5 public interface MachineDefinition {
\r
8 * Creates a new instance of the machine
\r
10 * @return a new object of an {@link Machine} implementation.
\r
11 * @author Christian Femers
\r
13 Machine createNew();
\r
16 * Returns the schema that all possible ISAs (Instruction Set Architecture) must
\r
19 * @return an {@link ISASchema} implementation fitting the machine
\r
20 * @author Christian Femers
\r
22 ISASchema getISASchema();
\r
25 * Returns a set of all {@link Register}s present in the machine.
\r
27 * @return all registers present in the machine.
\r
28 * @author Christian Femers
\r
30 Set<Register> getRegisters();
\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
37 * @return the number of bits used by the CPU
\r
38 * @see MainMemoryDefinition#getMemoryAddressBits()
\r
39 * @author Christian Femers
\r
41 int getAddressBits();
\r
44 * Returns the definition of the machines main memory.
\r
46 * @return the {@link MainMemoryDefinition} that defines the main memory.
\r
47 * @author Christian Femers
\r
49 MainMemoryDefinition getMainMemoryDefinition();
\r