8位串入并出移位寄存器电路的设计.doc
时间:11-05 16:02
查看:945次
下载:162次
简介:
LIBRARY IEEE;
USE IEEE.Std_logic_1164.all;
ENTITY text IS
PORT (a, b, clr, clock: IN BIT;
q : BUFFER BIT_VECTOR(0 TO 7));
END text;
ARCHITECTURE one OF text IS
BEGIN
PROCESS (a,b,clr,clock)
BEGIN
IF clr = '0' THEN
q <= "00000000";
ELSE
IF clock'EVENT AND clock = '1'
THEN
FOR i IN q'RANGE LOOP
IF i = 0 THEN q (i) <= (a AND b);
ELSE
Q (i) <= q(i-1);
END IF;
END LOOP;
END IF;
END IF;
END PROCESS;
END one;