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

📄 dismux1.vhd

📁 Workshop vhdl code from Esperan
💻 VHD
字号:
-----------------------------------------------------------------------
-- 
-- Original Code Copyright (c) 1999 by Esperan. All rights reserved.
-- www.esperan.com
-- 
-- This source file may be used and distributed without restriction
-- provided that this copyright statement is not removed from the file
-- and that any derivative work contains this copyright notice. 
--
-- Esperan VHDL Alarm Clock Lab Exercise Design V5.0
--
-- Dismux1.vhd
-- Display multiplexer
--
--------------------------------------------------------------- 
Library IEEE;
use IEEE.Std_Logic_1164.all;

entity DISMUX is
port ( ALARM_TIME, CURRENT_TIME  : in std_logic_vector (3 downto 0);
       SHOW_A                    : in std_logic;
       DISPLAY_TIME              : out std_logic_vector (3 downto 0));
end DISMUX;  

architecture RTL of DISMUX is
begin

  -- ALARM_TIME, CURRENT_TIME and SHOW_A must all be in the
  -- process sensitivity list

  MUX: process (ALARM_TIME, CURRENT_TIME, SHOW_A)
  begin
    if (SHOW_A = '1') then
      DISPLAY_TIME <= ALARM_TIME;
    else
      DISPLAY_TIME <= CURRENT_TIME;
    end if;
  end process MUX;

end RTL;

⌨️ 快捷键说明

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