?? display1.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 + -