PAGINA PRINCIPAL

Ver ALUCON.H

ALUCON.C

    En esta archivo implementamos la clase ALUCON.

 

#include<stdio.h>
#include"defs.h"
#include"gates.h"
#include"decods.h"
#include"muxs.h"
#include"latches.h"
#include"srams.h"
#include"alu32.h"
#include"alucon.h"

void ALUCON::run(WIRE in[6], WIRE ALUOp[2], WIRE out[3])
{
p_or[0].run(cable[0],in[0],in[3]);
p_and[0].run(cable[1],ALUOp[1],in[1]);
p_not[0].run(cable[2],ALUOp[1]);
p_not[1].run(cable[3],in[2]);
p_and[1].run(out[0],ALUOp[1],cable[0]);
p_or[1].run(out[1],cable[2],cable[3]);
p_or[2].run(out[2],ALUOp[0],cable[1]);

}