Ejemplo n.º 1
0
 public Instruccion(Instruccion i)
 {
     this.CodigoDeOperacion = i.CodigoDeOperacion;
     this.Operando          = new int[3];
     for (int j = 0; j < 3; j++)
     {
         this.Operando[j] = i.Operando[j];
     }
 }
Ejemplo n.º 2
0
 public Hilillo(int direccionDeInicio, string nombre)
 {
     PC          = direccionDeInicio;
     this.Nombre = nombre;
     IR          = new Instruccion(0);
     Debug.Assert(IR.Operando[0] == 0);
     Registro = new int[32];
     Ciclos   = 0;
     Fase     = FaseDeHilillo.L;
 }
Ejemplo n.º 3
0
        public CacheInstrucciones(int tamano)
        {
            Cache     = new Instruccion[4, tamano];
            NumBloque = new int[tamano];
            Reservado = new bool[tamano];
            Lock      = new Object[tamano];

            for (int i = 0; i < tamano; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Cache[j, i] = new Instruccion(0);
                }
                NumBloque[i] = 0;
                Reservado[i] = false;
                Lock[i]      = new Object();
            }
        }