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

4.1.1¼ÆÊýÆ÷µç·×ÛºÏ

4.1.2¼ÆÊýÆ÷µç··ÂÕæ

15

ÓÉͼ¿ÉµÃ·ÖƵºóµÄÐźÅÖÜÆÚT=999333718ps¡Ö0.001s ¼´µÄµ½ÁË1KHzµÄÐźÅ

16

ÓÉͼ¿ÉµÃʱÖÓÐźÅÖÜÆÚT=20845ps¡Ö20.845ns ¼´µÄµ½ÁË48MHzµÄʱÖÓÐźÅ

4.2ͬ²½¼ÆÊýÆ÷ 4.2.1¼ÆÊýÆ÷ʵÏÖ

entity count_6 is

Port ( clk_1k : in STD_LOGIC;

d1 : out STD_LOGIC_VECTOR(3 downto 0); d2 : out STD_LOGIC_VECTOR(3 downto 0);

17

d3 : out STD_LOGIC_VECTOR(3 downto 0); d4 : out STD_LOGIC_VECTOR(3 downto 0); d5 : out STD_LOGIC_VECTOR(3 downto 0); d6 : out STD_LOGIC_VECTOR(3 downto 0)); end count_6;

architecture Behavioral of count_6 is

signal z0,z1,z2,z3,z4,z5,z6: STD_LOGIC_VECTOR(3 downto 0):=(others=>'0');

signal clr,en: STD_LOGIC;

Begin

clr <= '0'; ---------------------------------------------ÇåÁãÎÞЧ en <= '1'; ---------------------------------------------¼ÆÊýʹÄÜÓÐЧ

d1 <= z1; d2 <= z2; d3 <= z3; d4 <= z4; d5 <= z5; d6 <= z6;

process(clk_1k,clr) begin

if rising_edge(clk_1k) then if clr = '1' then

z0<=(others=>'0'); z1<=(others=>'0'); z2<=(others=>'0'); z3<=(others=>'0'); z4<=(others=>'0'); z5<=(others=>'0'); z6<=(others=>'0');

18