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

📄 tech_map.vhd

📁 ARM7的源代码
💻 VHD
📖 第 1 页 / 共 3 页
字号:
------------------------------------------------------------------------------  This file is a part of the LEON VHDL model--  Copyright (C) 1999  European Space Agency (ESA)----  This library is free software; you can redistribute it and/or--  modify it under the terms of the GNU Lesser General Public--  License as published by the Free Software Foundation; either--  version 2 of the License, or (at your option) any later version.----  See the file COPYING.LGPL for the full details of the license.------------------------------------------------------------------------------- Package: 	tech_map-- File:	tech_map.vhd-- Author:	Jiri Gaisler - ESA/ESTEC-- Description:	Technology mapping of cache-rams, regfiles, pads and multiplier------------------------------------------------------------------------------LIBRARY ieee;use IEEE.std_logic_1164.all;use work.leon_iface.all;package tech_map is-- IU three-port regfile  component regfile_iu  generic (     rftype : integer := 1;    abits : integer := 8; dbits : integer := 32; words : integer := 128  );  port (    rst      : in std_logic;    clk      : in clk_type;    clkn     : in clk_type;    rfi      : in rf_in_type;    rfo      : out rf_out_type);  end component;-- CP three-port  component regfile_cp  generic (     abits : integer := 4; dbits : integer := 32; words : integer := 16  );  port (    rst      : in std_logic;    clk      : in clk_type;    rfi      : in rf_cp_in_type;    rfo      : out rf_cp_out_type);  end component;-- single-port sync ram  component syncram   generic ( abits : integer := 10; dbits : integer := 8);  port (    address  : in std_logic_vector((abits -1) downto 0);    clk      : in clk_type;    datain   : in std_logic_vector((dbits -1) downto 0);    dataout  : out std_logic_vector((dbits -1) downto 0);    enable   : in std_logic;    write    : in std_logic  );   end component;     -- dual-port sync ram  component dpsyncram   generic ( abits : integer := 10; dbits : integer := 8);  port (    address1 : in std_logic_vector((abits -1) downto 0);    clk      : in clk_type;    datain1  : in std_logic_vector((dbits -1) downto 0);    dataout1 : out std_logic_vector((dbits -1) downto 0);    enable1  : in std_logic;    write1   : in std_logic;    address2 : in std_logic_vector((abits -1) downto 0);    datain2  : in std_logic_vector((dbits -1) downto 0);    dataout2 : out std_logic_vector((dbits -1) downto 0);    enable2  : in std_logic;    write2   : in std_logic  );   end component;     -- sync prom (used for boot-prom option)  component bprom  port (    clk       : in std_logic;    cs        : in std_logic;    addr      : in std_logic_vector(31 downto 0);    data      : out std_logic_vector(31 downto 0)  );  end component;-- signed multiplercomponent hw_smult  generic ( abits : integer := 10; bbits : integer := 8 );  port (    clk  : in  clk_type;    holdn: in  std_logic;    a    : in  std_logic_vector(abits-1 downto 0);    b    : in  std_logic_vector(bbits-1 downto 0);    c    : out std_logic_vector(abits+bbits-1 downto 0)  ); end component; component clkgen port (    clkin   : in  std_logic;    pciclkin: in  std_logic;    clk     : out std_logic;			-- main clock    clkn    : out std_logic;			-- inverted main clock    sdclk   : out std_logic;			-- SDRAM clock    pciclk  : out std_logic;			-- PCI clock    cgi     : in clkgen_in_type;    cgo     : out clkgen_out_type);end component;-- pads  component inpad port (pad : in std_logic; q : out std_logic); end component;  component smpad port (pad : in std_logic; q : out std_logic); end component;  component outpad    generic (drive : integer := 1);    port (d : in std_logic; pad : out std_logic);  end component;  component toutpadu    generic (drive : integer := 1);    port (d : in std_logic; pad : out std_logic);  end component;  component odpad    generic (drive : integer := 1);    port (d : in std_logic; pad : out std_logic);  end component;  component iodpad    generic (drive : integer := 1);    port ( d : in std_logic; q : out std_logic; pad : inout std_logic);  end component;  component iopad    generic (drive : integer := 1);    port ( d, en : in  std_logic; q : out std_logic; pad : inout std_logic);  end component;  component smiopad     generic (drive : integer := 1);    port ( d, en : in  std_logic; q : out std_logic; pad : inout std_logic);  end component;   component pciinpad port (pad : in std_logic; q : out std_logic); end component;  component pcioutpad port (d : in std_logic; pad : out std_logic); end component;  component pcitoutpad port (d, en : in std_logic; pad : out std_logic); end component;  component pciiopad    port ( d, en : in  std_logic; q : out std_logic; pad : inout std_logic);  end component;  component pciiodpad    port ( d : in  std_logic; q : out std_logic; pad : inout std_logic);  end component; end tech_map;-- syncronous ramLIBRARY ieee;use IEEE.std_logic_1164.all;use work.leon_target.all;use work.leon_config.all;use work.leon_iface.all;use work.tech_atc25.all;use work.tech_atc18.all;use work.tech_atc35.all;use work.tech_fs90.all;use work.tech_umc18.all;use work.tech_generic.all;use work.tech_virtex.all;use work.tech_virtex2.all;use work.tech_tsmc25.all;use work.tech_proasic.all;use work.tech_axcel.all;entity syncram is  generic ( abits : integer := 8; dbits : integer := 32);  port (    address : in std_logic_vector (abits -1 downto 0);    clk     : in clk_type;    datain  : in std_logic_vector (dbits -1 downto 0);    dataout : out std_logic_vector (dbits -1 downto 0);    enable  : in std_logic;    write   : in std_logic  );end;architecture behav of syncram isbegin  inf : if INFER_RAM generate     u0 : generic_syncram generic map (abits => abits, dbits => dbits)         port map (address, clk , datain, dataout, enable, write);  end generate;  hb : if (not INFER_RAM) generate     at1 : if TARGET_TECH = atc18 generate      u0 : atc18_syncram generic map (abits => abits, dbits => dbits)	 port map (address, clk, datain, dataout, enable, write);    end generate;    at2 : if TARGET_TECH = atc25 generate      u0 : atc25_syncram generic map (abits => abits, dbits => dbits)	 port map (address, clk, datain, dataout, enable, write);    end generate;    at3 : if TARGET_TECH = atc35 generate      u0 : atc35_syncram generic map (abits => abits, dbits => dbits)	 port map (address, clk , datain, dataout, enable, write);    end generate;    fs9 : if TARGET_TECH = fs90 generate      u0 : fs90_syncram generic map (abits => abits, dbits => dbits)	 port map (address, clk , datain, dataout, enable, write);    end generate;    umc1 : if TARGET_TECH = umc18 generate      u0 : umc18_syncram generic map (abits => abits, dbits => dbits)         port map (address, clk , datain, dataout, enable, write);    end generate;    xcv : if TARGET_TECH = virtex generate       u0 : virtex_syncram generic map (abits => abits, dbits => dbits)	   port map (address, clk , datain, dataout, enable, write);    end generate;    xc2v : if TARGET_TECH = virtex2 generate       u0 : virtex2_syncram generic map (abits => abits, dbits => dbits)	   port map (address, clk , datain, dataout, enable, write);    end generate;    sim : if TARGET_TECH = gen generate      u0 : generic_syncram generic map (abits => abits, dbits => dbits)           port map (address, clk , datain, dataout, enable, write);    end generate;        tsmc : if TARGET_TECH = tsmc25 generate      u0 : tsmc25_syncram generic map (abits => abits, dbits => dbits)           port map (address, clk , datain, dataout, enable, write);    end generate;        proa : if TARGET_TECH = proasic generate      u0 : proasic_syncram generic map (abits => abits, dbits => dbits)           port map (address, clk , datain, dataout, enable, write);    end generate;        axc : if TARGET_TECH = axcel generate      u0 : axcel_syncram generic map (abits => abits, dbits => dbits)           port map (address, clk , datain, dataout, enable, write);    end generate;      end generate;end;-- syncronous dual-port ramLIBRARY ieee;use IEEE.std_logic_1164.all;use work.leon_target.all;use work.leon_config.all;use work.leon_iface.all;use work.tech_generic.all;use work.tech_atc18.all;use work.tech_atc25.all;use work.tech_virtex.all;use work.tech_virtex2.all;use work.tech_tsmc25.all;entity dpsyncram is  generic ( abits : integer := 8; dbits : integer := 32);  port (    address1 : in std_logic_vector((abits -1) downto 0);    clk      : in clk_type;    datain1  : in std_logic_vector((dbits -1) downto 0);    dataout1 : out std_logic_vector((dbits -1) downto 0);    enable1  : in std_logic;    write1   : in std_logic;    address2 : in std_logic_vector((abits -1) downto 0);    datain2  : in std_logic_vector((dbits -1) downto 0);    dataout2 : out std_logic_vector((dbits -1) downto 0);    enable2  : in std_logic;    write2   : in std_logic  );end;architecture behav of dpsyncram isbegin-- pragma translate_off  inf : if INFER_RAM generate     x : process(clk)    begin      assert false 	report "infering of dual-port rams not supported!"      severity error;    end process;  end generate;-- pragma translate_on  hb : if (not INFER_RAM) generate     atc1 : if TARGET_TECH = atc18 generate       u0 : atc18_dpram generic map (abits => abits, dbits => dbits)	   port map (address1, clk, datain1, dataout1, enable1, write1,	             address2, datain2, dataout2, enable2, write2);    end generate;    atc2 : if TARGET_TECH = atc25 generate       u0 : atc25_dpram generic map (abits => abits, dbits => dbits)	   port map (address1, clk, datain1, dataout1, enable1, write1,	             address2, datain2, dataout2, enable2, write2);    end generate;    xcv : if TARGET_TECH = virtex generate       u0 : virtex_dpram generic map (abits => abits, dbits => dbits)	   port map (address1, clk, datain1, dataout1, enable1, write1,	             address2, clk, datain2, dataout2, enable2, write2);    end generate;    xc2v : if TARGET_TECH = virtex2 generate       u0 : virtex2_dpram generic map (abits => abits, dbits => dbits)	   port map (address1, clk, datain1, dataout1, enable1, write1,	             address2, clk, datain2, dataout2, enable2, write2);    end generate;    tsmc : if TARGET_TECH = tsmc25 generate       u0 : tsmc25_dpram generic map (abits => abits, dbits => dbits)	   port map (address1, clk, datain1, dataout1, enable1, write1,	             address2, datain2, dataout2, enable2, write2);    end generate;-- pragma translate_off    notech : if ((TARGET_TECH /= virtex) and (TARGET_TECH /= atc25) and                  (TARGET_TECH /= virtex2) and                  (TARGET_TECH /= atc18) and (TARGET_TECH /= tsmc25)) generate       x : process(clk)      begin        assert false 	  report "dual-port rams not supported for this technology!"        severity error;      end process;    end generate;-- pragma translate_on  end generate;end;-- IU regfileLIBRARY ieee;use IEEE.std_logic_1164.all;use work.leon_target.all;use work.leon_config.all;use work.leon_iface.all;use work.tech_atc18.all;use work.tech_atc25.all;use work.tech_atc35.all;use work.tech_fs90.all;use work.tech_umc18.all;use work.tech_generic.all;use work.tech_virtex.all;use work.tech_virtex2.all;use work.tech_tsmc25.all;use work.tech_proasic.all;use work.tech_axcel.all;entity regfile_iu is  generic (     rftype : integer := 1;    abits : integer := 8; dbits : integer := 32; words : integer := 128  );  port (    rst      : in std_logic;    clk      : in clk_type;    clkn     : in clk_type;    rfi      : in rf_in_type;    rfo      : out rf_out_type);end;architecture rtl of regfile_iu issignal vcc : std_logic;begin  vcc <= '1';  inf : if INFER_REGF generate     u0 : generic_regfile_iu generic map (rftype, abits, dbits, words)         port map (rst, clk, clkn, rfi, rfo);  end generate;  ninf : if not INFER_REGF generate     atm1 : if TARGET_TECH = atc18 generate       u0 : atc18_regfile_iu generic map (rftype, abits, dbits, words)

⌨️ 快捷键说明

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