Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Examples of VHDL Descriptions phần 7 pptx
MIỄN PHÍ
Số trang
8
Kích thước
308.3 KB
Định dạng
PDF
Lượt xem
1544

Tài liệu đang bị lỗi

File tài liệu này hiện đang bị hỏng, chúng tôi đang cố gắng khắc phục.

Examples of VHDL Descriptions phần 7 pptx

Nội dung xem thử

Mô tả chi tiết

Examples of VHDL Descriptions

end if;

when state1 =>

state <= state2;

when state2 =>

if id = x"7" then

state <= state3;

else

state <= state2;

end if;

when state3 =>

if id < x"7" then

state <= state0;

elsif id = x"9" then

state <= state4;

else

state <= state3;

end if;

when state4 =>

if id = x"b" then

state <= state0;

else

state <= state4;

end if;

when others =>

state <= state0;

end case;

end if;

end process;

--assign state outputs (equal to state std_logics)

y <= state(1 downto 0);

end archmoore2;

State Machine with Moore and Mealy outputs

library ieee;

use ieee.std_logic_1164.all;

entity mealy1 is port(

clk, rst: in std_logic;

id: in std_logic_vector(3 downto 0);

w: out std_logic;

y: out std_logic_vector(1 downto 0));

end mealy1;

architecture archmealy1 of mealy1 is

type states is (state0, state1, state2, state3, state4);

signal state: states;

begin

moore: process (clk, rst)

begin

if rst='1' then

state <= state0;

elsif (clk'event and clk='1') then

case state is

when state0 =>

if id = x"3" then

state <= state1;

else

state <= state0;

end if;

when state1 =>

state <= state2;

when state2 =>

if id = x"7" then

state <= state3;

￾h￾t￾t￾p￾:￾/￾/￾w￾w￾w￾.￾a￾m￾i￾.￾b￾o￾l￾t￾o￾n￾.￾a￾c￾.￾u￾k￾/￾c￾o￾u￾r￾s￾e￾w￾a￾r￾e￾/￾a￾d￾v￾e￾d￾a￾/￾v￾h

Tải ngay đi em, còn do dự, trời tối mất!