X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fstandard%2Fmemory%2FWordAddressableMemory.java;h=e828a24942c4a79d014231c592411e5757196a99;hb=4d7f92457692ef00a591084390dc191f84c99628;hp=2e209f1c172f0515e9ca279e4925b6574cc041b5;hpb=153f81323a215691a0477af3fd1dd4a9d5b02958;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 2e209f1c..e828a249 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.width() != cellWidth) + if (bits.length() != cellWidth) throw new IllegalArgumentException(String.format( - "BitVector to be saved in memory cell has unexpected width. Expected: %d Actual: %d", cellWidth, bits.width())); + "BitVector to be saved in memory cell has unexpected width. Expected: %d Actual: %d", cellWidth, bits.length())); memory[index] = bits; }