Merge remote-tracking branch 'origin/development' into development
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / MainMemoryDefinition.java
1 package net.mograsim.machine;
2
3 /**
4  * This interface provides a means to get information about the machines memory
5  * architecture. It is not bound to any actual memory.
6  *
7  * @author Christian Femers
8  *
9  */
10 public interface MainMemoryDefinition {
11
12         /**
13          * The number of bits that the main memory uses to address cells. Note that this
14          * does not need to equal {@link MachineDefinition#getAddressBits()}.
15          * 
16          * @return the number of bits used to address a memory cell
17          * @author Christian Femers
18          */
19         int getMemoryAddressBits();
20
21         /**
22          * The width in bits of an addressable memory cell/unit. This is often 8 (= one
23          * byte). The actual cells/lines of the memory may be a lot larger.
24          * 
25          * @return the addressable unit width in bits
26          * @author Christian Femers
27          */
28         int getCellWidth();
29
30         /**
31          * The minimal address possible to address/use. This is usually 0.
32          * 
33          * @return the minimal possible address.
34          * @author Christian Femers
35          */
36         long getMinimalAddress();
37
38         /**
39          * The maximal address possible to address/use.
40          * 
41          * @return the maximal possible address as <b>unsigned long</b>
42          * @author Christian Femers
43          */
44         long getMaximalAddress();
45 }