|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
entity register1 is
Port ( CLK: in STD_LOGIC;
RESET: in STD_LOGIC;
LOAD: in STD_LOGIC;
DIN: in STD_LOGIC_VECTOR (7 downto 0);
DOUT: out STD_LOGIC_VECTOR (7 downto 0)
);
end register1;
architecture Behavioral of register is
SIGNAL N_STATE,P_STATE:STD_LOGIC_VECTOR(7 DOWNTO 0);
begin
DOUT<=P_STATE;
COM ROCESS(P_STATE,LOAD,DIN)
BEGIN
N_STATE<=P_STATE;
IF(LOAD='1')THEN
N_STATE<=DIN;
END IF;
END PROCESS;
STATE ROCESS(CLK,RESET)
BEGIN
IF(RESET='0')THEN
P_STATE<='11111111';
ELSIF(CLK'EVENT AND CLK='1')THEN
P_STATE<=N_STATE;
END IF;
END PROCESS;
end Behavioral;
能帮我看一下,为什么不能仿真或仿真错误??出不来最后的波形 |
|