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

📄 stratixii_ddr_phy.vhd

📁 free hardware ip core about sparcv8,a soc cpu in vhdl
💻 VHD
📖 第 1 页 / 共 2 页
字号:
--------------------------------------------------------------------------------  This file is a part of the GRLIB VHDL IP LIBRARY--  Copyright (C) 2003, Gaisler Research----  This program is free software; you can redistribute it and/or modify--  it under the terms of the GNU General Public License as published by--  the Free Software Foundation; either version 2 of the License, or--  (at your option) any later version.----  This program is distributed in the hope that it will be useful,--  but WITHOUT ANY WARRANTY; without even the implied warranty of--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the--  GNU General Public License for more details.----  You should have received a copy of the GNU General Public License--  along with this program; if not, write to the Free Software--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA ------------------------------------------------------------------------------- Entity: 	stratixii_ddr_phy-- File:	stratixii_ddr_phy.vhd-- Author:	Jiri Gaisler, Gaisler Research-- Description:	DDR PHY for Altera FPGAs------------------------------------------------------------------------------ LIBRARY stratixii; USE stratixii.all; LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY  altdqs_stxii_adqs_n7i2 IS 	 generic (width : integer := 2; period : string := "10000ps");	 PORT 	 ( 		 dll_delayctrlout	:	OUT  STD_LOGIC_VECTOR (5 DOWNTO 0);		 dqinclk	:	OUT  STD_LOGIC_VECTOR (width-1 downto 0);		 dqs_datain_h	:	IN  STD_LOGIC_VECTOR (width-1 downto 0);		 dqs_datain_l	:	IN  STD_LOGIC_VECTOR (width-1 downto 0);		 dqs_padio	:	INOUT  STD_LOGIC_VECTOR (width-1 downto 0);		 dqsundelayedout	:	OUT  STD_LOGIC_VECTOR (width-1 downto 0);		 inclk	:	IN  STD_LOGIC := '0';		 oe	:	IN  STD_LOGIC_VECTOR (width-1 downto 0) := (OTHERS => '1');		 outclk	:	IN  STD_LOGIC_VECTOR (width-1 downto 0);		 outclkena	:	IN  STD_LOGIC_VECTOR (width-1 downto 0) := (OTHERS => '1')	 );  END altdqs_stxii_adqs_n7i2; ARCHITECTURE RTL OF altdqs_stxii_adqs_n7i2 IS	 ATTRIBUTE synthesis_clearbox : boolean;	 ATTRIBUTE synthesis_clearbox OF RTL : ARCHITECTURE IS true;	 SIGNAL  wire_stxii_dll1_delayctrlout	:	STD_LOGIC_VECTOR (5 DOWNTO 0);	 SIGNAL  wire_stxii_dll1_dqsupdate	:	STD_LOGIC;	 SIGNAL  wire_stxii_dll1_offsetctrlout	:	STD_LOGIC_VECTOR (5 DOWNTO 0);	 SIGNAL  wire_stxii_io2a_combout	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_datain	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_ddiodatain	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_dqsbusout	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_oe	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_outclk	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  wire_stxii_io2a_outclkena	:	STD_LOGIC_VECTOR (width-1 downto 0);	 SIGNAL  delay_ctrl :	STD_LOGIC_VECTOR (5 DOWNTO 0);	 SIGNAL  dqs_update :	STD_LOGIC;	 SIGNAL  offset_ctrl :	STD_LOGIC_VECTOR (5 DOWNTO 0);	 COMPONENT  stratixii_dll	 GENERIC 	 (		DELAY_BUFFER_MODE	:	STRING := "low";		DELAY_CHAIN_LENGTH	:	NATURAL := 12;		DELAYCTRLOUT_MODE	:	STRING := "normal";		INPUT_FREQUENCY	:	STRING;		JITTER_REDUCTION	:	STRING := "false";		OFFSETCTRLOUT_MODE	:	STRING := "static";		SIM_LOOP_DELAY_INCREMENT	:	NATURAL := 0;		SIM_LOOP_INTRINSIC_DELAY	:	NATURAL := 0;		SIM_VALID_LOCK	:	NATURAL := 5;		SIM_VALID_LOCKCOUNT	:	NATURAL := 0;		STATIC_DELAY_CTRL	:	NATURAL := 0;		STATIC_OFFSET	:	STRING;		USE_UPNDNIN	:	STRING := "false";		USE_UPNDNINCLKENA	:	STRING := "false";		lpm_type	:	STRING := "stratixii_dll"	 );	 PORT	 ( 		addnsub	:	IN STD_LOGIC := '1';		aload	:	IN STD_LOGIC := '0';		clk	:	IN STD_LOGIC;		delayctrlout	:	OUT STD_LOGIC_VECTOR(5 DOWNTO 0);		dqsupdate	:	OUT STD_LOGIC;		offset	:	IN STD_LOGIC_VECTOR(5 DOWNTO 0) := (OTHERS => '0');		offsetctrlout	:	OUT STD_LOGIC_VECTOR(5 DOWNTO 0);		upndnin	:	IN STD_LOGIC := '0';		upndninclkena	:	IN STD_LOGIC := '1';		upndnout	:	OUT STD_LOGIC	 ); 	 END COMPONENT;	 COMPONENT  stratixii_io	 GENERIC 	 (		BUS_HOLD	:	STRING := "false";		DDIO_MODE	:	STRING := "none";		DDIOINCLK_INPUT	:	STRING := "negated_inclk";		DQS_CTRL_LATCHES_ENABLE	:	STRING := "false";		DQS_DELAY_BUFFER_MODE	:	STRING := "none";		DQS_EDGE_DETECT_ENABLE	:	STRING := "false";		DQS_INPUT_FREQUENCY	:	STRING := "unused";		DQS_OFFSETCTRL_ENABLE	:	STRING := "false";		DQS_OUT_MODE	:	STRING := "none";		DQS_PHASE_SHIFT	:	NATURAL := 0;		EXTEND_OE_DISABLE	:	STRING := "false";		GATED_DQS	:	STRING := "false";		INCLK_INPUT	:	STRING := "normal";		INPUT_ASYNC_RESET	:	STRING := "none";		INPUT_POWER_UP	:	STRING := "low";		INPUT_REGISTER_MODE	:	STRING := "none";		INPUT_SYNC_RESET	:	STRING := "none";		OE_ASYNC_RESET	:	STRING := "none";		OE_POWER_UP	:	STRING := "low";		OE_REGISTER_MODE	:	STRING := "none";		OE_SYNC_RESET	:	STRING := "none";		OPEN_DRAIN_OUTPUT	:	STRING := "false";		OPERATION_MODE	:	STRING;		OUTPUT_ASYNC_RESET	:	STRING := "none";		OUTPUT_POWER_UP	:	STRING := "low";		OUTPUT_REGISTER_MODE	:	STRING := "none";		OUTPUT_SYNC_RESET	:	STRING := "none";		SIM_DQS_DELAY_INCREMENT	:	NATURAL := 0;		SIM_DQS_INTRINSIC_DELAY	:	NATURAL := 0;		SIM_DQS_OFFSET_INCREMENT	:	NATURAL := 0;		TIE_OFF_OE_CLOCK_ENABLE	:	STRING := "false";		TIE_OFF_OUTPUT_CLOCK_ENABLE	:	STRING := "false";		lpm_type	:	STRING := "stratixii_io"	 );	 PORT	 ( 		areset	:	IN STD_LOGIC := '0';		combout	:	OUT STD_LOGIC;		datain	:	IN STD_LOGIC := '0';		ddiodatain	:	IN STD_LOGIC := '0';		ddioinclk	:	IN STD_LOGIC := '0';		ddioregout	:	OUT STD_LOGIC;		delayctrlin	:	IN STD_LOGIC_VECTOR(5 DOWNTO 0) := (OTHERS => '0');		dqsbusout	:	OUT STD_LOGIC;		dqsupdateen	:	IN STD_LOGIC := '1';		inclk	:	IN STD_LOGIC := '0';		inclkena	:	IN STD_LOGIC := '1';		linkin	:	IN STD_LOGIC := '0';		linkout	:	OUT STD_LOGIC;		oe	:	IN STD_LOGIC := '1';		offsetctrlin	:	IN STD_LOGIC_VECTOR(5 DOWNTO 0) := (OTHERS => '0');		outclk	:	IN STD_LOGIC := '0';		outclkena	:	IN STD_LOGIC := '1';		padio	:	INOUT STD_LOGIC;		regout	:	OUT STD_LOGIC;		sreset	:	IN STD_LOGIC := '0';		terminationcontrol	:	IN STD_LOGIC_VECTOR(13 DOWNTO 0) := (OTHERS => '0')	 ); 	 END COMPONENT; BEGIN	delay_ctrl <= wire_stxii_dll1_delayctrlout;	dll_delayctrlout <= delay_ctrl;	dqinclk <= wire_stxii_io2a_dqsbusout;	dqs_update <= wire_stxii_dll1_dqsupdate;	dqsundelayedout <= wire_stxii_io2a_combout;	offset_ctrl <= wire_stxii_dll1_offsetctrlout;	stxii_dll1 :  stratixii_dll	  GENERIC MAP (		DELAY_BUFFER_MODE => "low",		DELAY_CHAIN_LENGTH => 12,		DELAYCTRLOUT_MODE => "normal",		INPUT_FREQUENCY => period, --"10000ps",		JITTER_REDUCTION => "false",		OFFSETCTRLOUT_MODE => "static",		SIM_LOOP_DELAY_INCREMENT => 132,		SIM_LOOP_INTRINSIC_DELAY => 3840,		SIM_VALID_LOCK => 1,		SIM_VALID_LOCKCOUNT => 46,		STATIC_OFFSET => "0",		USE_UPNDNIN => "false",		USE_UPNDNINCLKENA => "false"	  )	  PORT MAP ( 		clk => inclk,		delayctrlout => wire_stxii_dll1_delayctrlout,		dqsupdate => wire_stxii_dll1_dqsupdate,		offsetctrlout => wire_stxii_dll1_offsetctrlout	  );	wire_stxii_io2a_datain <= dqs_datain_h;	wire_stxii_io2a_ddiodatain <= dqs_datain_l;	wire_stxii_io2a_oe <= oe;	wire_stxii_io2a_outclk <= outclk;	wire_stxii_io2a_outclkena <= outclkena;	loop0 : FOR i IN 0 TO width-1 GENERATE 	  stxii_io2a :  stratixii_io	  GENERIC MAP (		DDIO_MODE => "output",		DQS_CTRL_LATCHES_ENABLE => "true",		DQS_DELAY_BUFFER_MODE => "low",		DQS_EDGE_DETECT_ENABLE => "false",		DQS_INPUT_FREQUENCY => period, --"10000ps",		DQS_OFFSETCTRL_ENABLE => "true",		DQS_OUT_MODE => "delay_chain3",		DQS_PHASE_SHIFT => 9000,		EXTEND_OE_DISABLE => "false",		GATED_DQS => "false",		OE_ASYNC_RESET => "none",		OE_POWER_UP => "low",		OE_REGISTER_MODE => "register",		OE_SYNC_RESET => "none",		OPEN_DRAIN_OUTPUT => "false",		OPERATION_MODE => "bidir",		OUTPUT_ASYNC_RESET => "none",		OUTPUT_POWER_UP => "low",		OUTPUT_REGISTER_MODE => "register",		OUTPUT_SYNC_RESET => "none",		SIM_DQS_DELAY_INCREMENT => 22,		SIM_DQS_INTRINSIC_DELAY => 960,		SIM_DQS_OFFSET_INCREMENT => 11,		TIE_OFF_OE_CLOCK_ENABLE => "false",		TIE_OFF_OUTPUT_CLOCK_ENABLE => "false"	  )	  PORT MAP ( 		combout => wire_stxii_io2a_combout(i),		datain => wire_stxii_io2a_datain(i),		ddiodatain => wire_stxii_io2a_ddiodatain(i),		delayctrlin => delay_ctrl,		dqsbusout => wire_stxii_io2a_dqsbusout(i),		dqsupdateen => dqs_update,		oe => wire_stxii_io2a_oe(i),		offsetctrlin => offset_ctrl,		outclk => wire_stxii_io2a_outclk(i),		outclkena => wire_stxii_io2a_outclkena(i),		padio => dqs_padio(i)	  );	END GENERATE loop0; END RTL; --altdqs_stxii_adqs_n7i2LIBRARY ieee;USE ieee.std_logic_1164.all;ENTITY altdqs_stxii IS	generic (width : integer := 2; period : string := "10000ps");	PORT	(		dqs_datain_h		: IN STD_LOGIC_VECTOR (width-1 downto 0);		dqs_datain_l		: IN STD_LOGIC_VECTOR (width-1 downto 0);		inclk		: IN STD_LOGIC ;		oe		: IN STD_LOGIC_VECTOR (width-1 downto 0);		outclk		: IN STD_LOGIC_VECTOR (width-1 downto 0);		dll_delayctrlout		: OUT STD_LOGIC_VECTOR (5 DOWNTO 0);		dqinclk		: OUT STD_LOGIC_VECTOR (width-1 downto 0);		dqs_padio		: INOUT STD_LOGIC_VECTOR (width-1 downto 0);		dqsundelayedout		: OUT STD_LOGIC_VECTOR (width-1 downto 0)	);END;ARCHITECTURE RTL OF altdqs_stxii IS	ATTRIBUTE synthesis_clearbox: boolean;	ATTRIBUTE synthesis_clearbox OF RTL: ARCHITECTURE IS TRUE;	SIGNAL sub_wire0	: STD_LOGIC_VECTOR (5 DOWNTO 0);	SIGNAL sub_wire1	: STD_LOGIC_VECTOR (width-1 downto 0);	SIGNAL sub_wire2	: STD_LOGIC_VECTOR (width-1 downto 0);	SIGNAL sub_wire3_bv	: BIT_VECTOR (width-1 downto 0);	SIGNAL sub_wire3	: STD_LOGIC_VECTOR (width-1 downto 0);	COMPONENT altdqs_stxii_adqs_n7i2	generic (width : integer := 2; period : string := "10000ps");	PORT (			outclk	: IN STD_LOGIC_VECTOR (width-1 downto 0);			dqs_padio	: INOUT STD_LOGIC_VECTOR (width-1 downto 0);			outclkena	: IN STD_LOGIC_VECTOR (width-1 downto 0);			oe	: IN STD_LOGIC_VECTOR (width-1 downto 0);			dqs_datain_h	: IN STD_LOGIC_VECTOR (width-1 downto 0);			inclk	: IN STD_LOGIC ;			dqs_datain_l	: IN STD_LOGIC_VECTOR (width-1 downto 0);			dll_delayctrlout	: OUT STD_LOGIC_VECTOR (5 DOWNTO 0);			dqinclk	: OUT STD_LOGIC_VECTOR (width-1 downto 0);			dqsundelayedout	: OUT STD_LOGIC_VECTOR (width-1 downto 0)	);	END COMPONENT;BEGIN	sub_wire3_bv(width-1 downto 0) <= (others => '1');	sub_wire3    <= To_stdlogicvector(sub_wire3_bv);	dll_delayctrlout    <= sub_wire0(5 DOWNTO 0);	dqinclk    <= not sub_wire1(width-1 downto 0);	dqsundelayedout    <= sub_wire2(width-1 downto 0);	altdqs_stxii_adqs_n7i2_component : altdqs_stxii_adqs_n7i2	generic map (width, period)	PORT MAP (		outclk => outclk,		outclkena => sub_wire3,		oe => oe,		dqs_datain_h => dqs_datain_h,		inclk => inclk,

⌨️ 快捷键说明

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