📄 mt48lc4m16.vhd
字号:
--------------------------------------------------------------------------------- File Name: mt48lc4m16.vhd--------------------------------------------------------------------------------- Copyright (C) 2004-2008 Free Model Foundry; http://www.FreeModelFoundry.com---- This program is free software; you can redistribute it and/or modify-- it under the terms of the GNU General Public License version 2 as-- published by the Free Software Foundation.---- MODIFICATION HISTORY:---- version: | author: | mod date: | changes made:-- V1.0 M.Marinkovic 04 Jan 15 Initial-- V1.1 S.Janevski 08 Feb 28 Implemented full page read-- V1.2 S.Janevski 08 Mar 26 Assertions of wrong DQM settings-- during powerup removed-- V1.3 R. Munden 08 Aug 10 Corrected timing generic name--------------------------------------------------------------------------------- PART DESCRIPTION:---- Library: RAM-- Technology: CMOS-- Part: mt48lc4m16---- Description: 1M x 16 x 4Banks SDRAM-------------------------------------------------------------------------------LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; USE IEEE.VITAL_timing.ALL; USE IEEE.VITAL_primitives.ALL; USE STD.textio.ALL;LIBRARY FMF; USE FMF.gen_utils.ALL; USE FMF.conversions.ALL;--------------------------------------------------------------------------------- ENTITY DECLARATION-------------------------------------------------------------------------------ENTITY mt48lc4m16 IS GENERIC ( -- tipd delays: interconnect path delays tipd_BA0 : VitalDelayType01 := VitalZeroDelay01; tipd_BA1 : VitalDelayType01 := VitalZeroDelay01; tipd_DQML : VitalDelayType01 := VitalZeroDelay01; tipd_DQMH : VitalDelayType01 := VitalZeroDelay01; tipd_DQ0 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ1 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ2 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ3 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ4 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ5 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ6 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ7 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ8 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ9 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ10 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ11 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ12 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ13 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ14 : VitalDelayType01 := VitalZeroDelay01; tipd_DQ15 : VitalDelayType01 := VitalZeroDelay01; tipd_CLK : VitalDelayType01 := VitalZeroDelay01; tipd_CKE : VitalDelayType01 := VitalZeroDelay01; tipd_A0 : VitalDelayType01 := VitalZeroDelay01; tipd_A1 : VitalDelayType01 := VitalZeroDelay01; tipd_A2 : VitalDelayType01 := VitalZeroDelay01; tipd_A3 : VitalDelayType01 := VitalZeroDelay01; tipd_A4 : VitalDelayType01 := VitalZeroDelay01; tipd_A5 : VitalDelayType01 := VitalZeroDelay01; tipd_A6 : VitalDelayType01 := VitalZeroDelay01; tipd_A7 : VitalDelayType01 := VitalZeroDelay01; tipd_A8 : VitalDelayType01 := VitalZeroDelay01; tipd_A9 : VitalDelayType01 := VitalZeroDelay01; tipd_A10 : VitalDelayType01 := VitalZeroDelay01; tipd_A11 : VitalDelayType01 := VitalZeroDelay01; tipd_WENeg : VitalDelayType01 := VitalZeroDelay01; tipd_RASNeg : VitalDelayType01 := VitalZeroDelay01; tipd_CSNeg : VitalDelayType01 := VitalZeroDelay01; tipd_CASNeg : VitalDelayType01 := VitalZeroDelay01; -- tpd delays tAC tHZ tpd_CLK_DQ0 : VitalDelayType01Z := UnitDelay01Z; --CL2 tpd_CLK_DQ1 : VitalDelayType01Z := UnitDelay01Z; --CL3 -- tpw values: pulse widths tpw_CLK_posedge : VitalDelayType := UnitDelay; --tCH tpw_CLK_negedge : VitalDelayType := UnitDelay; --tCL -- tsetup values: setup times tsetup_A0_CLK : VitalDelayType := UnitDelay; --tAS tsetup_DQ0_CLK : VitalDelayType := UnitDelay; --tDS tsetup_CKE_CLK : VitalDelayType := UnitDelay; --tCKS tsetup_CSNeg_CLK : VitalDelayType := UnitDelay; --tCMS -- thold values: hold times thold_A0_CLK : VitalDelayType := UnitDelay; --tAH thold_DQ0_CLK : VitalDelayType := UnitDelay; --tDH thold_CKE_CLK : VitalDelayType := UnitDelay; --tCKH thold_CSNeg_CLK : VitalDelayType := UnitDelay; --tCMH -- tperiod_min: minimum clock period = 1/max freq tCK tperiod_CLK : VitalDelayType := UnitDelay; --CL2 tperiod_CLK_CAS3 : VitalDelayType := UnitDelay; --CL3 -- tdevice values: values for internal delays tdevice_REF : VitalDelayType := 15_625 ns; tdevice_TRC : VitalDelayType := 66 ns; tdevice_TRCD : VitalDelayType := 20 ns; tdevice_TRP : VitalDelayType := 20 ns; tdevice_TRCAR : VitalDelayType := 66 ns; tdevice_TRAS : VitalDelayType01 := (42 ns, 120_000 ns); -- tpowerup: Power up initialization time. Data sheets say 100 us. -- May be shortened during simulation debug. tpowerup : TIME := 100 us; -- generic control parameters InstancePath : STRING := DefaultInstancePath; TimingChecksOn : BOOLEAN := DefaultTimingChecks; MsgOn : BOOLEAN := DefaultMsgOn; XOn : BOOLEAN := DefaultXon; SeverityMode : SEVERITY_LEVEL := WARNING; -- memory file to be loaded mem_file_name : STRING := "none"; -- preload variable UserPreload : BOOLEAN := FALSE; -- For FMF SDF technology file usage TimingModel : STRING := DefaultTimingModel ); PORT ( BA0 : IN std_logic := 'U'; BA1 : IN std_logic := 'U'; DQML : IN std_logic := 'U'; DQMH : IN std_logic := 'U'; DQ0 : INOUT std_logic := 'U'; DQ1 : INOUT std_logic := 'U'; DQ2 : INOUT std_logic := 'U'; DQ3 : INOUT std_logic := 'U'; DQ4 : INOUT std_logic := 'U'; DQ5 : INOUT std_logic := 'U'; DQ6 : INOUT std_logic := 'U'; DQ7 : INOUT std_logic := 'U'; DQ8 : INOUT std_logic := 'U'; DQ9 : INOUT std_logic := 'U'; DQ10 : INOUT std_logic := 'U'; DQ11 : INOUT std_logic := 'U'; DQ12 : INOUT std_logic := 'U'; DQ13 : INOUT std_logic := 'U'; DQ14 : INOUT std_logic := 'U'; DQ15 : INOUT std_logic := 'U'; CLK : IN std_logic := 'U'; CKE : IN std_logic := 'U'; A0 : IN std_logic := 'U'; A1 : IN std_logic := 'U'; A2 : IN std_logic := 'U'; A3 : IN std_logic := 'U'; A4 : IN std_logic := 'U'; A5 : IN std_logic := 'U'; A6 : IN std_logic := 'U'; A7 : IN std_logic := 'U'; A8 : IN std_logic := 'U'; A9 : IN std_logic := 'U'; A10 : IN std_logic := 'U'; A11 : IN std_logic := 'U'; WENeg : IN std_logic := 'U'; RASNeg : IN std_logic := 'U'; CSNeg : IN std_logic := 'U'; CASNeg : IN std_logic := 'U' ); ATTRIBUTE VITAL_LEVEL0 of mt48lc4m16 : ENTITY IS TRUE;END mt48lc4m16;--------------------------------------------------------------------------------- ARCHITECTURE DECLARATION-------------------------------------------------------------------------------ARCHITECTURE vhdl_behavioral of mt48lc4m16 IS ATTRIBUTE VITAL_LEVEL0 of vhdl_behavioral : ARCHITECTURE IS TRUE; CONSTANT PartID : STRING := "mt48lc4m16"; CONSTANT hi_bank : NATURAL := 3; CONSTANT depth : NATURAL := 16#100000#; SIGNAL CKEreg : X01 := 'X'; SIGNAL PoweredUp : boolean := false; SIGNAL BA0_ipd : std_ulogic := 'X'; SIGNAL BA1_ipd : std_ulogic := 'X'; SIGNAL DQML_ipd : std_ulogic := 'U'; SIGNAL DQMH_ipd : std_ulogic := 'U'; SIGNAL DQ0_ipd : std_ulogic := 'X'; SIGNAL DQ1_ipd : std_ulogic := 'X'; SIGNAL DQ2_ipd : std_ulogic := 'X'; SIGNAL DQ3_ipd : std_ulogic := 'X'; SIGNAL DQ4_ipd : std_ulogic := 'X'; SIGNAL DQ5_ipd : std_ulogic := 'X'; SIGNAL DQ6_ipd : std_ulogic := 'X'; SIGNAL DQ7_ipd : std_ulogic := 'X'; SIGNAL DQ8_ipd : std_ulogic := 'X'; SIGNAL DQ9_ipd : std_ulogic := 'X'; SIGNAL DQ10_ipd : std_ulogic := 'X'; SIGNAL DQ11_ipd : std_ulogic := 'X'; SIGNAL DQ12_ipd : std_ulogic := 'X'; SIGNAL DQ13_ipd : std_ulogic := 'X'; SIGNAL DQ14_ipd : std_ulogic := 'X'; SIGNAL DQ15_ipd : std_ulogic := 'X'; SIGNAL CLK_ipd : std_ulogic := 'X'; SIGNAL CKE_ipd : std_ulogic := 'X'; SIGNAL A0_ipd : std_ulogic := 'X'; SIGNAL A1_ipd : std_ulogic := 'X'; SIGNAL A2_ipd : std_ulogic := 'X'; SIGNAL A3_ipd : std_ulogic := 'X'; SIGNAL A4_ipd : std_ulogic := 'X'; SIGNAL A5_ipd : std_ulogic := 'X'; SIGNAL A6_ipd : std_ulogic := 'X'; SIGNAL A7_ipd : std_ulogic := 'X'; SIGNAL A8_ipd : std_ulogic := 'X'; SIGNAL A9_ipd : std_ulogic := 'X'; SIGNAL A10_ipd : std_ulogic := 'X'; SIGNAL A11_ipd : std_ulogic := 'X'; SIGNAL WENeg_ipd : std_ulogic := 'X'; SIGNAL RASNeg_ipd : std_ulogic := 'X'; SIGNAL CSNeg_ipd : std_ulogic := 'X'; SIGNAL CASNeg_ipd : std_ulogic := 'X'; SIGNAL BA0_nwv : std_ulogic := 'X'; SIGNAL BA1_nwv : std_ulogic := 'X'; SIGNAL DQML_nwv : std_ulogic := 'X'; SIGNAL DQMH_nwv : std_ulogic := 'X'; SIGNAL DQ0_nwv : std_ulogic := 'X'; SIGNAL DQ1_nwv : std_ulogic := 'X'; SIGNAL DQ2_nwv : std_ulogic := 'X'; SIGNAL DQ3_nwv : std_ulogic := 'X'; SIGNAL DQ4_nwv : std_ulogic := 'X'; SIGNAL DQ5_nwv : std_ulogic := 'X'; SIGNAL DQ6_nwv : std_ulogic := 'X'; SIGNAL DQ7_nwv : std_ulogic := 'X'; SIGNAL DQ8_nwv : std_ulogic := 'X'; SIGNAL DQ9_nwv : std_ulogic := 'X'; SIGNAL DQ10_nwv : std_ulogic := 'X'; SIGNAL DQ11_nwv : std_ulogic := 'X'; SIGNAL DQ12_nwv : std_ulogic := 'X'; SIGNAL DQ13_nwv : std_ulogic := 'X'; SIGNAL DQ14_nwv : std_ulogic := 'X'; SIGNAL DQ15_nwv : std_ulogic := 'X'; SIGNAL A0_nwv : std_ulogic := 'X'; SIGNAL A1_nwv : std_ulogic := 'X'; SIGNAL A2_nwv : std_ulogic := 'X'; SIGNAL A3_nwv : std_ulogic := 'X'; SIGNAL A4_nwv : std_ulogic := 'X'; SIGNAL A5_nwv : std_ulogic := 'X'; SIGNAL A6_nwv : std_ulogic := 'X'; SIGNAL A7_nwv : std_ulogic := 'X'; SIGNAL A8_nwv : std_ulogic := 'X'; SIGNAL A9_nwv : std_ulogic := 'X'; SIGNAL A10_nwv : std_ulogic := 'X'; SIGNAL A11_nwv : std_ulogic := 'X'; SIGNAL CLK_nwv : std_ulogic := 'X'; SIGNAL CKE_nwv : std_ulogic := 'X'; SIGNAL WENeg_nwv : std_ulogic := 'X'; SIGNAL RASNeg_nwv : std_ulogic := 'X'; SIGNAL CSNeg_nwv : std_ulogic := 'X'; SIGNAL CASNeg_nwv : std_ulogic := 'X'; SIGNAL rct_in : std_ulogic := '0'; SIGNAL rct_out : std_ulogic := '0'; SIGNAL rcdt_in : std_ulogic_vector(3 downto 0) := (others => '0'); SIGNAL rcdt_out : std_ulogic_vector(3 downto 0) := (others => '0'); SIGNAL pre_in : std_ulogic := '0'; SIGNAL pre_out : std_ulogic := '0'; SIGNAL refreshed_in : std_ulogic := '0'; SIGNAL refreshed_out : std_ulogic := '0'; SIGNAL rcar_out : std_ulogic := '0'; SIGNAL rcar_in : std_ulogic := '0'; SIGNAL ras_in : std_ulogic_vector(3 downto 0) := (others => '0'); SIGNAL ras_out : std_ulogic_vector(3 downto 0) := (others => '0');BEGIN --------------------------------------------------------------------------- -- Internal Delays --------------------------------------------------------------------------- -- Artificial VITAL primitives to incorporate internal delays REF : VitalBuf (refreshed_out, refreshed_in, (UnitDelay, tdevice_REF)); TRC : VitalBuf (rct_out , rct_in , (tdevice_TRC, UnitDelay)); TRCD : VitalBuf (rcdt_out(0) , rcdt_in(0) , (UnitDelay, tdevice_TRCD)); TRCD1 : VitalBuf (rcdt_out(1) , rcdt_in(1) , (UnitDelay, tdevice_TRCD)); TRCD2 : VitalBuf (rcdt_out(2) , rcdt_in(2) , (UnitDelay, tdevice_TRCD)); TRCD3 : VitalBuf (rcdt_out(3) , rcdt_in(3) , (UnitDelay, tdevice_TRCD)); TRP : VitalBuf (pre_out , pre_in , (tdevice_TRP , UnitDelay)); TRCAR : VitalBuf (rcar_out , rcar_in , (tdevice_TRCAR, UnitDelay)); TRAS : VitalBuf (ras_out(0) , ras_in(0) , tdevice_TRAS); TRAS1 : VitalBuf (ras_out(1) , ras_in(1) , tdevice_TRAS); TRAS2 : VitalBuf (ras_out(2) , ras_in(2) , tdevice_TRAS); TRAS3 : VitalBuf (ras_out(3) , ras_in(3) , tdevice_TRAS); --------------------------------------------------------------------------- -- Wire Delays --------------------------------------------------------------------------- WireDelay : BLOCK BEGIN w_1 : VitalWireDelay (BA0_ipd, BA0, tipd_BA0); w_2 : VitalWireDelay (BA1_ipd, BA1, tipd_BA1); w_3 : VitalWireDelay (DQML_ipd, DQML, tipd_DQML); w_4 : VitalWireDelay (DQMH_ipd, DQMH, tipd_DQMH); w_5 : VitalWireDelay (DQ0_ipd, DQ0, tipd_DQ0); w_6 : VitalWireDelay (DQ1_ipd, DQ1, tipd_DQ1); w_7 : VitalWireDelay (DQ2_ipd, DQ2, tipd_DQ2); w_8 : VitalWireDelay (DQ3_ipd, DQ3, tipd_DQ3); w_9 : VitalWireDelay (DQ4_ipd, DQ4, tipd_DQ4); w_10 : VitalWireDelay (DQ5_ipd, DQ5, tipd_DQ5); w_11 : VitalWireDelay (DQ6_ipd, DQ6, tipd_DQ6); w_12 : VitalWireDelay (DQ7_ipd, DQ7, tipd_DQ7); w_13 : VitalWireDelay (DQ8_ipd, DQ8, tipd_DQ8); w_14 : VitalWireDelay (DQ9_ipd, DQ9, tipd_DQ9); w_15 : VitalWireDelay (DQ10_ipd, DQ10, tipd_DQ10); w_16 : VitalWireDelay (DQ11_ipd, DQ11, tipd_DQ11); w_17 : VitalWireDelay (DQ12_ipd, DQ12, tipd_DQ12); w_18 : VitalWireDelay (DQ13_ipd, DQ13, tipd_DQ13); w_20 : VitalWireDelay (DQ14_ipd, DQ14, tipd_DQ14); w_21 : VitalWireDelay (DQ15_ipd, DQ15, tipd_DQ15);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -