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