Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.38 KB | None | 0 0
  1. entity xxx is
  2. port(a,b,c : in std_logic;
  3.         Q : out std_logic)
  4. end;
  5.  
  6. architecture rtl of xxx is
  7. begin
  8.     process(A,B)
  9.     variable qv : std_logic_vector(0 to 2);
  10.     begin
  11.         if A = '0' then qv := (others => '0');
  12.             elsif rising_edge(B) then if C = '0' then gv := not gv(2) & qv(0 to 1); else gv := not gv(1) & gv(0 to 1);
  13.             end if;
  14.         end if;
  15.         Q <= qv(0);
  16.     end process;
  17. end rtl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement