16位锁存器.txt

来自「16位锁存器」· 文本 代码 · 共 39 行

TXT
39
字号
library ieee;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;    
                          
entity mcu_latch is
  generic (setup_time : TIME := 10 ns );
port( 
       MCU_EN_LATCH1 :  in std_logic;
       AD :             inout std_logic_vector(16 DOWNTO 0);
       D :              in std_logic_vector(16 DOWNTO 0);
       SRAM_CPLD_ADDR : out std_logic_vector(16 DOWNTO 0)
     );
end mcu_latch ; 

architecture behavioral1 of mcu_latch is     
   
begin 
     AD <= D ;
process(MCU_EN_LATCH1)

begin
    if (MCU_EN_LATCH1 = '1') then 
       SRAM_CPLD_ADDR <= "ZZZZZZZZZZZZZZZZZ";    
    else
      if (MCU_EN_LATCH1 = '0') then
       NULL ;
        elsif MCU_ALE1'event and MCU_ALE1 = '1' and MCU_ALE1'LAST_VALUE ='0' then
           NULL ;
         elsif MCU_ALE1'LAST_EVENT >= setup_time then
          if MCU_ALE1'event and MCU_ALE1 = '0'and MCU_ALE1'LAST_VALUE ='1' then
         else
           SRAM_CPLD_ADDR <= AD ;
         end if ;
       end if ;
    end if ;
end process ;

end behavioral1;

⌨️ 快捷键说明

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