»ùÓÚFPGAÊý×ÖÃë±íÉè¼Æ(ÍêÕû×ÊÁÏ).doc ÏÂÔØ±¾ÎÄ

4.4°Ë¶ÎÒëÂëÆ÷ 4.4.1°Ë¶ÎÒëÂëÆ÷ʵÏÖ

entity baduan is

Port ( in_7 : in STD_LOGIC_VECTOR (3 downto 0); seg : out STD_LOGIC_VECTOR (7 downto 0)); end baduan;

architecture Behavioral of baduan is

begin

process(in_7) begin

Case in_7 is

when \ when \ when \ when \ when \ when \ when \ when \ when \ when \ when others => seg <=\ end case; end process;

end Behavioral;

27

4.4.2°Ë¶ÎÒëÂëÆ÷·ÂÕæ

tb : PROCESS BEGIN

in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ in_7 <= \ END PROCESS;

ÓÉͼ¿É¼û·ÂÕæ½á¹ûÓë³ÌÐòÍêÈ«·ûºÏ

4.4.3°Ë¶ÎÒëÂëÆ÷µç·×ÛºÏ

28

View Technology Schematic £º

29

4.5¿ØÖÆÆ÷ 4.5.1¿ØÖÆÆ÷

entity kongzhiqi is

Port ( clk_1k : in STD_LOGIC;

start_stop_out : in STD_LOGIC; split_reset_out : in STD_LOGIC;

sreg_out : out STD_LOGIC_VECTOR (2 downto 0)); end kongzhiqi;

architecture Behavioral of kongzhiqi is

signal sreg: STD_LOGIC_VECTOR(2 downto 0):=\ signal snext: STD_LOGIC_VECTOR(2 downto 0); begin

process(clk_1k,start_stop_out,split_reset_out) begin

if rising_edge(clk_1k) then sreg <= snext; end if; end process;

process(start_stop_out,split_reset_out,sreg) begin

case sreg is

when \if start_stop_out = '1' and split_reset_out = '0' then snext <= \ else snext <= sreg;

end if; when \if start_stop_out = '1' and split_reset_out = '0' then snext <= \

30