Merge branch 'development' into fusebug
[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 extends MemoryDefinition
11 {
12         /**
13          * The width in bits of an addressable memory cell/unit. This is often 8 (= one
14          * byte). The actual cells/lines of the memory may be a lot larger.
15          * 
16          * @return the addressable unit width in bits
17          * @author Christian Femers
18          */
19         int getCellWidth();
20         
21         public static MainMemoryDefinition create(int memoryAddressBits, int cellWidth, long minimalAddress, long maximalAddress)
22         {
23                 return new StandardMainMemoryDefinition(memoryAddressBits, cellWidth, minimalAddress, maximalAddress);
24         }
25 }