[an error occurred while processing this directive]
|
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Uup is
Port (
ZR: in STD_LOGIC;
DZR: out STD_LOGIC:='0';
N: in STD_LOGIC;
-- DOUT: out BIT_VECTOR(3 downto 0);
DOUT: out STD_LOGIC_VECTOR(3 downto 0);
CLK: in STD_LOGIC
);
end Uup;
architecture Uup of Uup is
--signal REG: BIT_VECTOR(3 downto 0):="0001";
signal REG: STD_LOGIC_VECTOR(3 downto 0):="0001";
begin
process (CLK)
begin
if CLK'event and CLK='1' then
elsif N = '0' then
REG(3)<=REG(2);
REG(2)<=REG(1);
REG(1)<=REG(0);
REG(0)<=REG(3);
else
REG(3)<=REG(0);
REG(2)<=REG(3);
REG(1)<=REG(2);
REG(0)<=REG(1);
end if;
DOUT <= REG;
if ZR='0' then
DOUT <= "0000";
DZR <= '1';
else DZR <= '0';
end if;
end process;
end Uup;
E-mail: info@telesys.ru