1 package net.mograsim.machine;
5 import net.mograsim.machine.mi.MicroInstructionMemoryDefinition;
6 import net.mograsim.machine.registers.Register;
7 import net.mograsim.machine.registers.RegisterGroup;
9 public interface MachineDefinition
12 * This returns the MachineDefinitions ID. This must be consistent and coherent with the id in the extension point (Eclipse plugin xml)
13 * providing the definition.
15 * @return a human readable, unique id representing the specified machine.
16 * @author Christian Femers
21 * Creates a new instance of the machine
23 * @return a new object of an {@link Machine} implementation.
24 * @author Christian Femers
29 * Returns the schema that all possible ISAs (Instruction Set Architecture) must be based on.
31 * @return an {@link ISASchema} implementation fitting the machine
32 * @author Christian Femers
34 ISASchema getISASchema();
37 * Returns a set of all {@link Register}s present in the machine that are not part of a register group.
39 * @return all registers present in the machine.
40 * @author Christian Femers
42 List<Register> getUnsortedRegisters();
45 * Returns a set of all RegisterGroups that the machine contains
47 * @return all register groups present in the machine.
48 * @author Christian Femers
50 List<RegisterGroup> getRegisterGroups();
53 * The number of bits used by the machine to address main memory. Note that this should be the number of bits used in the CPU, not a
54 * possibly different one used by the bus system.
56 * @return the number of bits used by the CPU
57 * @see MainMemoryDefinition#getMemoryAddressBits()
58 * @author Christian Femers
63 * Returns the definition of the machines main memory.
65 * @return the {@link MainMemoryDefinition} that defines the main memory.
66 * @author Christian Femers
68 MainMemoryDefinition getMainMemoryDefinition();
71 * Returns the definition of the machines instruction memory.
73 * @return the {@link InstructionMemoryDefinition} that defines the instruction memory.
75 MicroInstructionMemoryDefinition getMicroInstructionMemoryDefinition();