X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model.am2900%2Ftest%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fam2900%2Fam2904%2FTestableAm2904Impl.java;h=03e9d5b31a2e9e049e4de799fbbee52927f119f9;hb=56293586fd93882b6c4c96a81ae87a5a78c09066;hp=2e84000477e9bde203e2df61a8f3436c34fa1f3d;hpb=c97e7e60186ded3b41fe09494a18aac06a1c3a6b;p=Mograsim.git diff --git a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/am2904/TestableAm2904Impl.java b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/am2904/TestableAm2904Impl.java index 2e840004..03e9d5b3 100644 --- a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/am2904/TestableAm2904Impl.java +++ b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/am2904/TestableAm2904Impl.java @@ -208,6 +208,12 @@ public class TestableAm2904Impl implements TestableAm2904 am2904.setHighLevelState(regToStateID(r), bv); } + @Override + public void setDirectly(CompleteStatus r, String z_c_n_ovr) + { + am2904.setHighLevelState(regToStateID(r), BitVector.parse(z_c_n_ovr)); + } + @Override public String getC0() { @@ -262,11 +268,25 @@ public class TestableAm2904Impl implements TestableAm2904 return bv.getMSBit(r.ordinal() % 4).getSymbol(); } + @Override + public String getDirectly(CompleteStatus r) + { + var bv = (BitVector) am2904.getHighLevelState(regToStateID(r)); + return bv.toString(); + } + private static String regToStateID(Register r) { - if (r.ordinal() > 3) - return "msr.q"; - return "musr.q"; + if (r.ordinal() < 4) + return "musr.q"; + return "msr.q"; + } + + private static String regToStateID(CompleteStatus r) + { + if (r == CompleteStatus.micro) + return "musr.q"; + return "msr.q"; } @Override