X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2FMainMemoryDefinition.java;fp=plugins%2Fnet.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2FMainMemoryDefinition.java;h=72153d6dfce722fef47400ff726457905b381c7a;hb=7d05144c25daa53e60fc9ed9fd503546a86567f8;hp=0000000000000000000000000000000000000000;hpb=8bed58cd47f4e53a0a83e066d38864aa6875502f;p=Mograsim.git diff --git a/plugins/net.mograsim.machine/src/net/mograsim/machine/MainMemoryDefinition.java b/plugins/net.mograsim.machine/src/net/mograsim/machine/MainMemoryDefinition.java new file mode 100644 index 00000000..72153d6d --- /dev/null +++ b/plugins/net.mograsim.machine/src/net/mograsim/machine/MainMemoryDefinition.java @@ -0,0 +1,24 @@ +package net.mograsim.machine; + +/** + * This interface provides a means to get information about the machines memory architecture. It is not bound to any actual memory. + * + * @author Christian Femers + * + */ +public interface MainMemoryDefinition extends MemoryDefinition +{ + /** + * 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 + * larger. + * + * @return the addressable unit width in bits + * @author Christian Femers + */ + int getCellWidth(); + + public static MainMemoryDefinition create(int memoryAddressBits, int cellWidth, long minimalAddress, long maximalAddress) + { + return new StandardMainMemoryDefinition(memoryAddressBits, cellWidth, minimalAddress, maximalAddress); + } +}