72153d6dfce722fef47400ff726457905b381c7a
[Mograsim.git] / plugins / 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 architecture. It is not bound to any actual memory.
5  *
6  * @author Christian Femers
7  *
8  */
9 public interface MainMemoryDefinition extends MemoryDefinition
10 {
11         /**
12          * The width in bits of an addressable memory cell/unit. This is often 8 (= one byte). The actual cells/lines of the memory may be a lot
13          * larger.
14          * 
15          * @return the addressable unit width in bits
16          * @author Christian Femers
17          */
18         int getCellWidth();
19
20         public static MainMemoryDefinition create(int memoryAddressBits, int cellWidth, long minimalAddress, long maximalAddress)
21         {
22                 return new StandardMainMemoryDefinition(memoryAddressBits, cellWidth, minimalAddress, maximalAddress);
23         }
24 }