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

📄 embedded_kcpsm2.vhd

📁 Xillinx 的8位MCU软核的源代码
💻 VHD
字号:
--
-- EMBEDDED_KCPSM2.VHD
--
-- Ken Chapman - Xilinx Ltd - February 2002
--
-- This file instantiates the KCPSM-II processor macro and connects the 
-- program ROM.
--
-- NOTE: The name of the program ROM will probably need to be changed to 
--       reflect the name of the program (PSM) file applied to the assembler.
--
------------------------------------------------------------------------------------
--
-- Standard IEEE libraries
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--
------------------------------------------------------------------------------------
--
--
entity embedded_kcpsm2 is
   Port (      port_id : out std_logic_vector(7 downto 0);
          write_strobe : out std_logic;
           read_strobe : out std_logic;
              out_port : out std_logic_vector(7 downto 0);
               in_port : in std_logic_vector(7 downto 0);
             interrupt : in std_logic;
                 reset : in std_logic;
                   clk : in std_logic);
end embedded_kcpsm2;
--
------------------------------------------------------------------------------------
--
architecture connectivity of embedded_kcpsm2 is
--
------------------------------------------------------------------------------------
--
-- Declaration of KCPSM-II 
--
  component kcpsm2 
    Port (      address : out std_logic_vector(9 downto 0);
            instruction : in std_logic_vector(17 downto 0);
                port_id : out std_logic_vector(7 downto 0);
           write_strobe : out std_logic;
               out_port : out std_logic_vector(7 downto 0);
            read_strobe : out std_logic;
                in_port : in std_logic_vector(7 downto 0);
              interrupt : in std_logic;
                  reset : in std_logic;
                    clk : in std_logic);
    end component;
--
-- declaration of program ROM
--
  component prog_rom 
    Port (      address : in std_logic_vector(9 downto 0);
            instruction : out std_logic_vector(17 downto 0);
                    clk : in std_logic);
    end component;
--
------------------------------------------------------------------------------------
--
-- Signals used to connect KCPSM-II to program ROM
--
signal address : std_logic_vector(9 downto 0);
signal instruction : std_logic_vector(17 downto 0);
--
------------------------------------------------------------------------------------
--
-- Connection of macros
--
begin

  processor: kcpsm2
    port map(      address => address,
               instruction => instruction,
                   port_id => port_id,
              write_strobe => write_strobe,
                  out_port => out_port,
               read_strobe => read_strobe,
                   in_port => in_port,
                 interrupt => interrupt,
                     reset => reset,
                       clk => clk);
  program: prog_rom
    port map(      address => address,
               instruction => instruction,
                       clk => clk);

end connectivity ;

------------------------------------------------------------------------------------
--
-- END OF FILE EMBEDDED_KCPSM2.VHD
--
------------------------------------------------------------------------------------

⌨️ 快捷键说明

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