Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model.am2900 / test / net / mograsim / logic / model / am2900 / am2904 / TestableAm2904.java
index c10672d..e41e3fe 100644 (file)
@@ -19,7 +19,7 @@ public interface TestableAm2904 extends TestableCircuit
 
        void setCX(String val_1_bit);
 
-       void setY3(String val_1_bit);
+       void setY(String z_c_n_ovr);
 
        void setIZ(String val_1_bit);
 
@@ -29,12 +29,12 @@ public interface TestableAm2904 extends TestableCircuit
 
        void setIN(String val_1_bit);
 
-       default void setI(String z_c_ovr_n)
+       default void setI(String z_c_n_ovr)
        {
-               setIZ(z_c_ovr_n.substring(0, 1));
-               setIC(z_c_ovr_n.substring(1, 2));
-               setIOVR(z_c_ovr_n.substring(2, 3));
-               setIN(z_c_ovr_n.substring(3, 4));
+               setIZ(z_c_n_ovr.substring(0, 1));
+               setIC(z_c_n_ovr.substring(1, 2));
+               setIN(z_c_n_ovr.substring(2, 3));
+               setIOVR(z_c_n_ovr.substring(3, 4));
        }
 
        void set_CEM(String val_1_bit);
@@ -55,12 +55,12 @@ public interface TestableAm2904 extends TestableCircuit
 
        void set_EN(String val_1_bit);
 
-       default void set_E(String z_c_ovr_n)
+       default void set_E(String z_c_n_ovr)
        {
-               set_EZ(z_c_ovr_n.substring(0, 1));
-               set_EC(z_c_ovr_n.substring(1, 2));
-               set_EOVR(z_c_ovr_n.substring(2, 3));
-               set_EN(z_c_ovr_n.substring(3, 4));
+               set_EZ(z_c_n_ovr.substring(0, 1));
+               set_EC(z_c_n_ovr.substring(1, 2));
+               set_EN(z_c_n_ovr.substring(2, 3));
+               set_EOVR(z_c_n_ovr.substring(3, 4));
        }
 
        void setSIO0(String val_1_bit);
@@ -71,11 +71,15 @@ public interface TestableAm2904 extends TestableCircuit
 
        void setQIO3(String val_1_bit);
 
+       void setDirectly(Register r, String val_1_bit);
+
+       void setDirectly(CompleteStatus r, String z_c_n_ovr);
+
        String getC0();
 
        String getCT();
 
-       String getY3();
+       String getY();
 
        String getSIO0();
 
@@ -85,12 +89,16 @@ public interface TestableAm2904 extends TestableCircuit
 
        String getQIO3();
 
-       public enum Am2904_ShiftDir
+       String getDirectly(Register r);
+
+       String getDirectly(CompleteStatus r);
+
+       enum Am2904_ShiftDir
        {
                RIGHT, LEFT;
        }
 
-       public enum Am2904_Carry
+       enum Am2904_Carry
        {
                CI0, CI1, CX, USE_SR;
        }
@@ -104,7 +112,7 @@ public interface TestableAm2904 extends TestableCircuit
         * <li>condCode = the boolean term defining the CT output</li>
         * </ul>
         */
-       public enum Am2904_Inst
+       enum Am2904_Inst
        {
                // @formatter:off
                LoadM_LoadY_µ_NxorOVRorZ(0_00),
@@ -214,4 +222,15 @@ public interface TestableAm2904 extends TestableCircuit
                        return (code & 0b001_110) == 0b001_000;
                }
        }
+
+       enum Register
+       {
+               µZ, µC, µN, µOVR, MZ, MC, MN, MOVR;
+       }
+
+       enum CompleteStatus
+       {
+               micro, MAKRO;
+       }
+
 }