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

📄 display1.vhd

📁 消抖程序
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
--调时和调价输出的切换

entity display1 is
port(
      flag1    :in std_logic;        --调价标志
      flag2    :in std_logic;        --调时标志     
      price1   : in std_logic_vector(3 downto 0);
      price2   : in std_logic_vector(3 downto 0);
      price3   : in std_logic_vector(3 downto 0);
       sec1    : in std_logic_vector(3 downto 0);
       sec2    : in std_logic_vector(3 downto 0);
       hour1   : in std_logic_vector(3 downto 0);
       hour2   : in std_logic_vector(3 downto 0);
        pout1  :out std_logic_vector(3 downto 0);
        pout2  :out std_logic_vector(3 downto 0);
        pout3  :out std_logic_vector(3 downto 0);
        pout4  :out std_logic_vector(3 downto 0)
        );
end entity;
architecture arc of display1 is
   signal   data1    :  std_logic_vector(3 downto 0);
   signal   data2    :  std_logic_vector(3 downto 0);
   signal   data3    :  std_logic_vector(3 downto 0);
   signal   data4    :  std_logic_vector(3 downto 0);
begin
process(flag1,flag2,price1,price2,price3,sec1,sec2 ,hour1,hour2 ) is 
begin
if(flag1='1')then
    data1<=price1;
    data2<=price2;
    data3<=price3;
    data4<="0000";
 elsif(flag2='1')then
    data1<=sec1;
    data2<=sec2;
    data3<=hour1;
    data4<=hour2;
end if;
end process;

pout1<=data1;
pout2<=data2;
pout3<=data3;
pout4<=data4;

end arc;

⌨️ 快捷键说明

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