⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lat_receive.vhd

📁 上海外滩看到的最大的LED显示屏的内核源代码
💻 VHD
字号:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;

ENTITY lat_receive IS
PORT (	in_lat        :IN		std_logic; 
		in_rclk		:IN		STD_LOGIC;
        out_rclk  	:OUT	std_logic;
        out_lat    	:OUT	std_logic
		);

END lat_receive;

ARCHITECTURE A OF lat_receive IS 
  SIGNAL		rclk    	 : STD_LOGIC;
  SIGNAL		t0_in_lat  	 : STD_LOGIC;
  SIGNAL		t1_in_lat  	 : STD_LOGIC;
  SIGNAL		lat_temp   	 : STD_LOGIC;
  signal		count      	: integer range 0 to 1024;
 BEGIN 
   out_rclk<=rclk;  
   out_lat<=lat_temp; 
   process (in_rclk)
      begin
      if in_rclk'event and in_rclk='0' then
        if count<11 then
           rclk<=not rclk;
        elsif count=11 then

        elsif count=12 then
           rclk<=not rclk;
        end if;
       end if;
   end process;

    process (rclk)
       begin
       if rclk'event and rclk='1' then
          t0_in_lat<=in_lat;
       end if;
   end process;

    process (rclk)
       begin
       if rclk'event and rclk='0' then
          t1_in_lat<=in_lat;
       end if;
   end process;

    process (rclk)
       begin
       if rclk'event and rclk='0' then
          if t0_in_lat='0' and t1_in_lat='1' then
             lat_temp<='0' ;
          elsif t0_in_lat='1' and t1_in_lat='0' then
             lat_temp<='1' ;
        --  else
        --     t0_in_lat<=in_lat;
          end if;
       end if;
   end process;

process(in_rclk)
begin
if lat_temp='0' then
	count<=0;
elsif in_rclk='1' and in_rclk'event then
	if count<12 then
		count<=count+1;
	else
		count<=0;
	end if;
end if;
end process;
END ;




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -