📄 mmu_utlb_ram.vhd
字号:
--------------------------------------------------------------------------------- $Id: mmu_utlb_ram.vhd,v 1.1 2007/10/12 09:11:36 stefana Exp $--------------------------------------------------------------------------------- mmu_utlb_ram.vhd - Entity and architecture---- ***************************************************************************-- ** Copyright(C) 2007 by Xilinx, Inc. All rights reserved. **-- ** **-- ** This text contains proprietary, confidential **-- ** information of Xilinx, Inc. , is distributed by **-- ** under license from Xilinx, Inc., and may be used, **-- ** copied and/or disclosed only pursuant to the terms **-- ** of a valid license agreement with Xilinx, Inc. **-- ** **-- ** Unmodified source code is guaranteed to place and route, **-- ** function and run at speed according to the datasheet **-- ** specification. Source code is provided "as-is", with no **-- ** obligation on the part of Xilinx to provide support. **-- ** **-- ** Xilinx Hotline support of source code IP shall only include **-- ** standard level Xilinx Hotline support, and will only address **-- ** issues and questions related to the standard released Netlist **-- ** version of the core (and thus indirectly, the original core source). **-- ** **-- ** The Xilinx Support Hotline does not have access to source **-- ** code and therefore cannot answer specific questions related **-- ** to source HDL. The Xilinx Support Hotline will only be able **-- ** to confirm the problem in the Netlist version of the core. **-- ** **-- ** This copyright and support notice must be retained as part **-- ** of this text at all times. **-- ***************************************************************************----------------------------------------------------------------------------------- Filename: mmu_utlb_ram.vhd---- Description: This file contains an implementation of the unified Memory-- Management Unit Translation Look-aside Buffer block RAM.---- VHDL-Standard: VHDL'93/02--------------------------------------------------------------------------------- Structure: -- mmu_utlb_ram.vhd----------------------------------------------------------------------------------- Author: stefana-- Revision: $Revision: 1.1 $-- Date: $Date: 2007/10/12 09:11:36 $---- History:-- stefana 2007-02-16 First Version----------------------------------------------------------------------------------- Naming Conventions:-- active low signals: "*_n"-- clock signals: "clk", "clk_div#", "clk_#x" -- reset signals: "rst", "rst_n" -- generics: "C_*" -- user defined types: "*_TYPE" -- state machine next state: "*_ns" -- state machine current state: "*_cs" -- combinatorial signals: "*_com" -- pipelined or register delay signals: "*_d#" -- counter signals: "*cnt*"-- clock enable signals: "*_ce" -- internal version of output port "*_i"-- device pins: "*_pin" -- ports: - Names begin with Uppercase -- processes: "*_PROCESS" -- component instantiations: "<ENTITY_>I_<#|FUNC>-------------------------------------------------------------------------------library IEEE;use IEEE.std_logic_1164.all;entity MMU_UTLB_RAM is port( clka : in std_logic; clkb : in std_logic; ena : in std_logic; enb : in std_logic; wea : in std_logic; web : in std_logic; addra : in std_logic_vector(8 downto 0); addrb : in std_logic_vector(8 downto 0); dia : in std_logic_vector(35 downto 0); dib : in std_logic_vector(35 downto 0); doa : out std_logic_vector(35 downto 0); dob : out std_logic_vector(35 downto 0) );end MMU_UTLB_RAM;library IEEE;use IEEE.numeric_std.all;architecture IMP of MMU_UTLB_RAM is type ram_type is array (511 downto 0) of std_logic_vector(35 downto 0); shared variable RAM : ram_type;begin process (CLKA) begin if CLKA'event and CLKA = '1' then if ENA = '1' then if WEA = '1' then RAM(to_integer(unsigned(ADDRA))) := DIA; end if; DOA <= RAM(to_integer(unsigned(ADDRA))); end if; end if; end process; process (CLKB) begin if CLKB'event and CLKB = '1' then if ENB = '1' then if WEB = '1' then RAM(to_integer(unsigned(ADDRB))) := DIB; end if; DOB <= RAM(to_integer(unsigned(ADDRB))); end if; end if; end process;end IMP;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -