tmpl.vhdl

来自「宇航级微处理器LEON2 2.2 VHDL源代码,很难找的.」· VHDL 代码 · 共 54 行

VHDL
54
字号
----------------------------------------------------------------------------------- ROM core VHDL template. See the macro description included-- behind this frame.---- Copyright (C) 2000 Rudolf Matousek <matousek@utia.cas.cz>---- Modified by Jiri Gaisler <jgais@ws.estec.esa.nl> for LEON boot prom.---- This code may be used under the terms of Version 2 of the GPL,-- read the file COPYING for details.-----------------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;entity synplify_bprom is    port(      clk : in std_logic;      csn : in std_logic;      addr : in std_logic_vector (29 downto 0);      data : out std_logic_vector (31 downto 0)      );end;architecture rtl of synplify_bprom is  signal raddr : std_logic_vector($a downto 0);  signal d : std_logic_vector(31 downto 0);  attribute syn_romstyle : string;  attribute syn_romstyle of d : signal is "select_rom";  begin  p : process(raddr)  begin    case raddr is$i    when others => d <= (others => '-');    end case;  end process;  r : process (clk)  begin    if rising_edge(clk) then      if csn = '0' then raddr <= addr($a downto 0); end if;    end if;  end process;  data <= d;end rtl;

⌨️ 快捷键说明

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