The final restructured version for automatic build using maven tycho
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / standard / memory / WordAddressableMemory.java
diff --git a/net.mograsim.machine/src/net/mograsim/machine/standard/memory/WordAddressableMemory.java b/net.mograsim.machine/src/net/mograsim/machine/standard/memory/WordAddressableMemory.java
deleted file mode 100644 (file)
index 4a54ad9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-package net.mograsim.machine.standard.memory;
-
-import java.math.BigInteger;
-
-import net.mograsim.logic.core.types.Bit;
-import net.mograsim.logic.core.types.BitVector;
-import net.mograsim.machine.GenericMemory;
-import net.mograsim.machine.MainMemory;
-import net.mograsim.machine.MainMemoryDefinition;
-
-public class WordAddressableMemory extends GenericMemory<BitVector> implements MainMemory
-{
-       private final int cellWidth;
-       private final MainMemoryDefinition definition;
-
-       public WordAddressableMemory(MainMemoryDefinition definition)
-       {
-               super(definition);
-               this.cellWidth = definition.getCellWidth();
-               this.definition = definition;
-       }
-
-       @Override
-       public BitVector getCell(long address)
-       {
-               BitVector data = super.getCell(address);
-               return data == null ? BitVector.of(Bit.ZERO, cellWidth) : data;
-       }
-
-       @Override
-       public BigInteger getCellAsBigInteger(long address)
-       {
-               BitVector data = getCell(address);
-               return data == null ? BigInteger.valueOf(0) : data.getUnsignedValue();
-       }
-
-       @Override
-       public void setCellAsBigInteger(long address, BigInteger data)
-       {
-               setCell(address, BitVector.from(data, cellWidth));
-       }
-
-       @Override
-       public MainMemoryDefinition getDefinition()
-       {
-               return definition;
-       }
-}