Download Memoria (spa)
Transcript
signal CNTBIT : std_logic_vector(2 downto 0); begin -- Proceso secuencial para ESTADO process (CLK, RST) begin if (RST='1') then ESTADO <= STOP; elsif (CLK'event and CLK='1') then if EN='1' then ESTADO <= nESTADO; end if; end if; end process; -- Proceso combinacional para ESTADO process (ESTADO, WR, CNTBIT) begin nESTADO <= ESTADO; case ESTADO is when INICIO => nESTADO <= DATOS; when DATOS => if CNTBIT=DWL1 then --7 nESTADO <= PARIDAD; end if; when PARIDAD => nESTADO <= STOP; when STOP => if WR = '1' then nESTADO <= INICIO; end if; end case; end process; -- Contador que determina el bit de DATOS process (CLK, RST) begin if RST='1' then CNTBIT <= (others => '0'); elsif (CLK'event and CLK='1') then if EN='1' then if ESTADO=DATOS then 107