X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fstandard%2Fmemory%2FWordAddressableMemory.java;h=2e209f1c172f0515e9ca279e4925b6574cc041b5;hb=153f81323a215691a0477af3fd1dd4a9d5b02958;hp=ee40201b7594af53f34c900b4c51726bca5efbe6;hpb=40fa7adb9fe05cd2d2eeb18a787b98299b76136a;p=Mograsim.git 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 index ee40201b..2e209f1c 100644 --- a/net.mograsim.machine/src/net/mograsim/machine/standard/memory/WordAddressableMemory.java +++ b/net.mograsim.machine/src/net/mograsim/machine/standard/memory/WordAddressableMemory.java @@ -112,9 +112,9 @@ public class WordAddressableMemory implements MainMemory public void setCell(int index, BitVector bits) { - if (bits.length() != cellWidth) + if (bits.width() != cellWidth) throw new IllegalArgumentException(String.format( - "BitVector to be saved in memory cell has unexpected length. Expected: %d Actual: %d", cellWidth, bits.length())); + "BitVector to be saved in memory cell has unexpected width. Expected: %d Actual: %d", cellWidth, bits.width())); memory[index] = bits; }