Está en la página 1de 3

Laboratory report

Jose Luis Coronacion Sedano


Department of electrical and electronic engineering
Universidad Nacional de Ingeniería
Lima, Perú
jose.coronacion.s@uni.pe

Abstract—This electronic document is an advance of the laboratory code number 3.

I. ADVANCE
Usando la herammienta

Se genero la memoria

Se plantea una maquina de estados que oscile entre los valores de las operaciones:

Codigo VHDL

type state_OPERATION is (s_FETCH,s_DECO,s_EJE);


signal state_regOP, state_nextOP: state_OPERATION;

Para el clock se trabaja:


process (clk, reset)
begin
if (reset = '1') then Volver al estado inicial haciendo que los valores vuelvan a 0.

state_OPERATION<=s_FETCH;
counter<=(OTHERS => '0');
datos_out<=(OTHERS => '0');
direccion<=(OTHERS => '0');

elsif (clock'event and clock = '1') then

state_regOP <= state_nextOP;

end if;
end process;

Donde cada estado representa un ciclo:


1
PROCESS(state_regOP )
fetch <= '0';
eje <= '0';
deco <= '0';
begin
case state_OPERATION is
when s_FETCH => e<=0;Se utiliza los enteros e,f para poder establecer un determinado
ciclos del reloj por operación.

fetch <= '1';


if (f=0) then En este proceso se realiza para manter el estado
direccion <=std_logic_vector(counter);
f<=f+1;
state_nextOP<=s_FETCH;
elsif(f=1) then
counter<=counter+1;
state_nextOP<=s_FETCH;
else
instruccion<=datos_in;
state_nextOP<=s_DECO;

when s_DECO => f<=0;


e<=0;
deco=> '1';

direccion <=intruccion(4 downto 0);

state_nextOP<=s_EJE;

when s_EJE => f=0;

eje => '1';


if (instruccion (7 downto 5)="000") then --load

elsif(instruccion (7 downto 5)="001") then --store

elsif(instruccion (7 downto 5)="010") then --add

elsif(instruccion (7 downto 5)="011") then --sub

elsif(instruccion (7 downto 5)="100") then --inc

elsif(instruccion (7 downto 5)="101") then --br

elsif(instruccion (7 downto 5)="110") then --bp

elsif(instruccion (7 downto 5)="111") then --jmp

2
end process;

II. BIBLIOGRAPHY

https://www.allaboutcircuits.com/technical-articles/integer-and-its-subtypes-in-vhdl/

Arquitectura de Computadoras - M. Morris Mano - 3ra Edición

Guia de laboratorio
(https://onedrive.live.com/?authkey=
%21AF3OoMX2jdkFCcM&cid=2391F58CC6C90DD4&id=2391F58CC6C90DD4%211222&parId=2391F58CC6C90DD4%
21853&o=OneUp)

También podría gustarte