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

📄 jh_cpu1.vhd

📁 Jh_cpu is a cpu with 12 address,8 data bus, adn give direct address ,indirect address two addressin
💻 VHD
字号:
-- clock generation block 
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_unsigned.all ;
use ieee.std_logic_arith.all ;
use work.cpupack.all ;

entity jh_cpu1 is
  port( clk, intr : in  std_logic ;
        clk1,clk2   : out std_logic ) ;
end jh_cpu1 ;

architecture behavioral of jh_cpu1  is
signal ring : std_logic_vector(7 downto 0) ;
begin

----------------------------------------------------------------------------------------- 
 clk_process :  --- clk1 and clk2 gereration block
   process(clk, intr) 
   variable q : std_logic_vector(7 downto 0) := "01100000";
   begin 
   ---**************************************
    If intr = '1' then 
       q := "01100000" ;
	elsIF (clk'EVENT AND clk= '1') THEN
         q := q(0) & q(7 downto 1)  ;            
		END IF;
     ---**************************************
    ring <= q ;
   end process ;
      
     clk1 <= ring(7) ;
     clk2 <= ring(3) ;
-----------------------------------------------------------------------------------------
-- other VHDL codes     
-----------------------------------------------------------------------------------------
end behavioral  ;        

⌨️ 快捷键说明

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