亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sram512k32bit50mhz-sv05.vhd

?? audio file on virtex
?? VHD
字號:
-- -------------------------------------------------------------------
-- sram512k32bit50mhz-sv05.vhd
--
-- Entity: sraminterface
--
-- * Provides a simple interface to the SRAM on an XSV Board, v1.0
-- * 512k address space (512 * 1024 addressable locations, meaning
--   that addresses are 19 bits wide).
--   locations
-- * 32 bit data (each location holds 32 bits). 
--
-- Author:	James Brennan
-- Date:	January 2001
-- -------------------------------------------------------------------

-- ---------------------------------
-- Clock:
-- 50Mhz or slower required.
-- Must have a 50% duty cycle.
-- ---------------------------------

-- The doWrite signal is currently redundant. It is included for 
-- possible future changes to the interface.
-- The two signal canRead and canWrite are are high when reads
-- are writes respectively can be performed. Currently, both
-- signals are identical, but in future this may change.

-- Both a write and a read take one clock cycle each. Writes and
-- reads can be performed in any order and can be interspersed in
-- any way.

-- To perform a write:
-- *	Place the write address on writeAddr and the write data on 
--		writeData.
-- *	Wait until canWrite is '1'. then assert doWrite (set to '1').
-- *	The sraminterface will see doWrite is '1' on the next rising
--		clock edge and on the same edge will register (i.e. place in
--		registers) writeAddr and writeData. The write will take place
--		in the cycle after this first edge and will be completed at
--		the second rising clock edge after doWrite is asserted.
-- To perform a read:
-- * 	When no write is being performed, reads are automatically
--		being performed.
-- * 	Therefore, first wait until canRead is high (indicating that
--		no write is being performed).
-- *	Then place the read address on readAddr at the
--		start of a clock cycle. By the end of the same clock cycle
--		the valid data read from SRAM will be on readData. This data
--		should then be registered.
-- * NOTE: The sraminterface does NOT itself register data read from
--		SRAM. Therefore when performing a read, the "host" or "user
--		entity" should itself register readData before changing
--		readAddr

library IEEE;
use IEEE.std_logic_1164.all;

entity sraminterface is
    port (
        CLK: in STD_LOGIC;								-- Clock signal.
        Resetn: in STD_LOGIC;							-- Asynchronous reset
        doRead: in STD_LOGIC;							-- Currently unused but may be used in future.							
        doWrite: in STD_LOGIC;							-- Set to perform a write.
        readAddr: in STD_LOGIC_VECTOR (18 downto 0);	-- Address to read from (user-side).
        writeAddr: in STD_LOGIC_VECTOR (18 downto 0);	-- Address to write to (user-side).
        readData: out STD_LOGIC_VECTOR (31 downto 0);	-- Data read (user-side).
        writeData: in STD_LOGIC_VECTOR (31 downto 0);	-- Data to write (user-side).
        canRead: out STD_LOGIC;							-- Is '1' when a read can be performed.							
        canWrite: out STD_LOGIC;						-- Is '1' when a write can be performed.
        CELeftn: out STD_LOGIC;							-- CEn signal to left SRAM bank.
        CERightn: out STD_LOGIC;						-- CEn signal to right SRAM bank.
        OELeftn: out STD_LOGIC;							-- OEn signal to left SRAM bank.
        OERightn: out STD_LOGIC;						-- OEn signal to right SRAM bank.
        WELeftn: out STD_LOGIC;							-- WEn signal to left SRAM bank.
        WERightn: out STD_LOGIC;						-- WEn signal to right SRAM bank.
        SRAMLeftAddr: out STD_LOGIC_VECTOR (18 downto 0);	-- Address bus to left SRAM bank.
        SRAMRightAddr: out STD_LOGIC_VECTOR (18 downto 0);	-- Address bus to right SRAM bank.
        SRAMLeftData: inout STD_LOGIC_VECTOR (15 downto 0);	-- Data bus to left SRAM bank.
        SRAMRightData: inout STD_LOGIC_VECTOR (15 downto 0)	-- Data bus to right SRAM bank.
    );
end sraminterface;

architecture sraminterface_arch of sraminterface is

	-- ========================================
	-- Architechture declarations:
	-- ========================================	

	-- Constants:
	-- Constants for addrSelect signal:
	constant CONST_USE_READ_ADDR : STD_LOGIC := '0';
	constant CONST_USE_WRITE_ADDR : STD_LOGIC := '1';	

	-- Constants for 3-state buffers:
	constant CONST_ENABLED : STD_LOGIC := '1';
	constant CONST_DISABLED : STD_LOGIC := '0';
	
	-- Signals for registers:
	signal writeAddrReg : STD_LOGIC_VECTOR(18 downto 0);
	signal writeDataReg : STD_LOGIC_VECTOR(31 downto 0);
		
	-- Clock-enable controls for the registers:
	signal regWriteAddr : STD_LOGIC;
	signal regWriteData : STD_LOGIC;
	
	-- Control signals common to both left and right banks of SRAM:
	signal CEn : STD_LOGIC;
	signal OEn : STD_LOGIC;
	signal WEn : STD_LOGIC;

	-- Common address bus for both SRAM banks
	signal SRAMAddr : STD_LOGIC_VECTOR(18 downto 0);
	
	-- 32-bit data bus:
	-- The low 16-bits of data will go to the right SRAM bank.
	-- The high 16-bits of data will go to the left SRAM bank.
	signal SRAMData : STD_LOGIC_VECTOR(31 downto 0);
	
	-- Other control signals for the data path:
	signal addrSelect : STD_LOGIC;
	signal readDataSelect : STD_LOGIC;
	
	-- Declarations required for the controller FSM.
	type STATE_TYPE is (stIdle, stWrite1);
	signal presState, nextState: STATE_TYPE;
	
begin
	-- ========================================
	-- Architecture body:
	-- ========================================

	-- ========================================
	-- Combinational signals
	-- ========================================

	-- Control signals:
	CELeftn <= CEn;
	CERightn <= CEn;
	OELeftn <= OEn;
	OERightn <= OEn;
	WELeftn <= WEn;
	WERightn <= WEn;
	
	-- SRAM address buses:
	SRAMLeftAddr <= SRAMAddr;
	SRAMRightAddr <= SRAMAddr;
	
	-- SRAM data buses:
	-- The low 16-bits of data will go to the right SRAM bank.
	-- The high 16-bits of data will go to the left SRAM bank.
	SRAMRightData <= SRAMData(15 downto 0);
	SRAMLeftData <= SRAMData(31 downto 16);
	
	-- ========================================
	-- Implementation of specific structures	
	-- ========================================

	-- Multiplex the address bus:
	with addrSelect select
		SRAMAddr <=	readAddr when CONST_USE_READ_ADDR,
					writeAddrReg when others;
	
	-- 3-state buffer placed after the writeDataReg register
	-- in the data path:
	process(writeDataReg, presState, CLK)
	begin
		-- We drive the SRAM data I/O bus with data to be written
		-- ONLY when:
		--		* presState = stWrite1 (i.e. we are in the write
		--							    cycle)
		-- and	* CLK = '0' (i.e. we are in the 2nd half of the
		-- 					 cycle).
		--
		-- The reason for the dependancy on CLK is as follows:
		-- At the start of the clock cycle in which we are
		-- performing a write, we raise OEn. This is to make the
		-- SRAM stop driving its bidirectional data lines and
		-- instead make its drivers high impedance. We wait half a
		-- clock cycle for the SRAM's data line drivers to go high
		-- impedance, and THEN we ourselves drive the SRAM's
		-- bidirectional data lines with the data that we wish to
		-- be written.
		if (presState = stWrite1 and CLK = '0') then
			SRAMData <= writeDataReg;
		else
			SRAMData <= (others => 'Z');
		end if;
	end process;
	-- Process for WEn signal:
	-- This process has been placed here simply because it is similar
	-- to the 3-state buffer on the write data output above. However
	-- we do NOT use a 3-state buffer for WEn.
	process(presState, CLK)
	begin
		if (presState = stWrite1 and CLK = '0') then
			WEn <= '0';
		else
			WEn <= '1';
		end if;
	end process;
	
	
	-- Multiplexor between the SRAM data I/O lines and the
	-- readData data bus to the host.
	-- When we are NOT writing to SRAM we directly pass the
	-- value on the SRAM data I/O lines out to the readData
	-- bus. When we are writing to SRAM we set readData to
	-- all zeros.
	-- Note that we are not registering the data read from SRAM.
	-- It is up to the host that we are connecting to to do this.
	process(SRAMData, readDataSelect)
	begin
		if readDataSelect = CONST_ENABLED then
			readData <= SRAMData;
		else
			readData <= (others => '0');
		end if;
	end process;
	
	-- ========================================
	-- Process for reset and clock-edge events
	-- ========================================
	process(CLK, Resetn)
	begin
		if Resetn = '0' then
			-- Default values of signals that are NOT
			-- controlled by the FSM controller:
			presState <= stIdle;
	
			CEn <= '1';

			writeAddrReg <= (others => '0'); 
			writeDataReg <= (others => '0');
					
		elsif CLK'EVENT and CLK = '1' then
			CEn <= '0';
			
			-- Handle the clock-enabling of each register:
			if regWriteAddr = '1' then
				writeAddrReg <= writeAddr;
			end if;
			if regWriteData = '1' then
				writeDataReg <= writeData;
			end if;
		
			-- Update current state for controller FSM:
			presState <= nextState;
		end if;
	end process;
	
	-- ========================================
	-- Process for FSM of controller
	-- ========================================
	process(presState, doRead, doWrite)
	begin
		-- Set the defaults for all the signals this FSM
		-- controls:
		OEn <= '0';
		readDataSelect <= CONST_ENABLED;
		-- We always pass the read address through to the SRAM
		-- unless we are doing a write.
		addrSelect <= CONST_USE_READ_ADDR;

		regWriteAddr <= '0';
		regWriteData <= '0';
		
		canRead <= '1';
		canWrite <= '1';

		case presState is
			when stIdle =>
				nextState <= stIdle;
				 
				if doWrite = '1' then
					nextState <= stWrite1;
		
					regWriteAddr <= '1';
					regWriteData <= '1';					
				end if;
			when stWrite1 =>
				nextState <= stIdle;

				if doWrite = '1' then
					nextState <= stWrite1;
		
					regWriteAddr <= '1';
					regWriteData <= '1';					
				end if;
				
				OEn <= '1';
								
				readDataSelect <= CONST_DISABLED;
				addrSelect <= CONST_USE_WRITE_ADDR;
				
				canRead <= '0';
				canWrite <= '0';
		end case;
	end process;

end sraminterface_arch;

-- ---------------------------------
-- Major features/changes:
-- ---------------------------------
-- (08/01/2001) The second clock cycle used in 
-- performing a write was redundant and has now been
-- removed. Therefore both a read and a write now
-- take only one clock cycle.

-- (08/01/2001) Write data and WEn are only asserted
-- for half a clock cycle (10ns at 50Mhz).

-- (08/01/2001) Write data only asserted while
-- WEn is asserted.

-- (08/01/2001) Timings from 05/01/2001 have now been
-- changed and improved upon.

-- (05/01/2001) THIS SET OF TIMINGS WORKS!
-- To see them clearly, its easiest to simulate.
-- A write currently takes two clock cycles. There
-- is a small chance that we could squeeze it down
-- to one clock cycle. (A read still takes one
-- clock cycle as always).

-- (05/01/2001) While we're writing, as well as
-- lowering WEn we also raise OEn.

-- (05/01/2001) Tried to make read and write cycles
-- as small as possible while still ensuring that
-- there are no read or write errors.
-- We've gone back to automatically doing
-- reads if we're not writing and performing
-- writes in a single clock cycle. (When writing
-- we only drive the SRAM's data lines on the 2nd
-- half of the clock cycle).

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性色黄大片| 亚洲午夜久久久久| 麻豆freexxxx性91精品| 欧美日韩在线播放三区| 亚洲男人的天堂网| 久久国产福利国产秒拍| 欧美mv日韩mv亚洲| 国产一区二区三区最好精华液| 911国产精品| 肉色丝袜一区二区| 91精品国产手机| 日本不卡123| 在线视频亚洲一区| 艳妇臀荡乳欲伦亚洲一区| 色哟哟国产精品免费观看| 亚洲色大成网站www久久九九| 99久久久无码国产精品| 亚洲欧美另类久久久精品 | 亚洲精品国久久99热| av亚洲产国偷v产偷v自拍| 最新国产精品久久精品| 91欧美激情一区二区三区成人| 一区二区久久久久久| 欧美夫妻性生活| 精品一区二区三区久久| 日本一二三四高清不卡| 91在线观看一区二区| 日欧美一区二区| 国产精品国产三级国产aⅴ无密码| 欧美综合在线视频| 国产一区二区成人久久免费影院| 亚洲人成伊人成综合网小说| 日韩一区二区三区四区五区六区 | 久久久国产综合精品女国产盗摄| 成人黄色小视频| 香蕉久久夜色精品国产使用方法| 久久久久亚洲蜜桃| 欧美日韩久久久久久| 成人一道本在线| 日本美女视频一区二区| 亚洲欧美日韩中文字幕一区二区三区| 日韩精品一区二区三区视频播放| 91浏览器入口在线观看| 经典三级在线一区| 天天爽夜夜爽夜夜爽精品视频| 欧美韩国日本综合| 欧美videos中文字幕| 欧美日韩一区二区三区在线| 不卡视频在线观看| 国产精品自拍三区| 蜜臀精品久久久久久蜜臀| 亚洲最大成人综合| 中文字幕亚洲一区二区av在线| 精品国内片67194| 91精品国产91久久综合桃花| 91蜜桃网址入口| 波多野洁衣一区| 国产精品小仙女| 久久精品国产免费| 日韩精彩视频在线观看| 一区二区三区精品在线观看| 国产欧美日韩激情| 久久精品视频一区| 精品国产91洋老外米糕| 91精品国产91久久综合桃花| 欧美日韩国产乱码电影| 在线精品视频小说1| 99久久精品费精品国产一区二区| 国产真实乱偷精品视频免| 看电视剧不卡顿的网站| 亚洲v中文字幕| 亚洲va欧美va天堂v国产综合| 一区二区三区四区乱视频| 中文字幕亚洲综合久久菠萝蜜| 国产亚洲欧美色| 日本一区二区免费在线| 久久综合久久鬼色| 26uuu国产在线精品一区二区| 欧美一级搡bbbb搡bbbb| 在线观看91av| 欧美久久久久久久久久| 7777精品伊人久久久大香线蕉| 欧美婷婷六月丁香综合色| 欧美色综合天天久久综合精品| 日本久久精品电影| 欧美午夜精品电影| 欧美日韩综合一区| 欧美一区二区在线看| 26uuu亚洲综合色| 久久久av毛片精品| 亚洲视频一二三区| 一区二区三区免费网站| 亚洲成a人片在线不卡一二三区 | 男人的j进女人的j一区| 午夜精品爽啪视频| 精油按摩中文字幕久久| 国产二区国产一区在线观看| av在线一区二区三区| 91性感美女视频| 91超碰这里只有精品国产| 精品第一国产综合精品aⅴ| 国产欧美一区二区精品秋霞影院| 中文字幕一区二区三区在线观看 | 国产精品女主播在线观看| 亚洲色图制服丝袜| 三级亚洲高清视频| 国产一区二区三区在线观看免费视频 | 日本高清免费不卡视频| 欧美日韩不卡在线| 久久亚洲精品国产精品紫薇| 欧美国产日韩一二三区| 一区二区三区小说| 麻豆国产91在线播放| 成人午夜视频在线观看| 色av成人天堂桃色av| 91精品国产综合久久久久久久久久| 精品国产一区二区三区久久影院| 国产亚洲精品免费| 亚洲欧美激情一区二区| 麻豆91在线播放免费| gogogo免费视频观看亚洲一| 3d动漫精品啪啪1区2区免费| 久久综合九色综合欧美亚洲| 亚洲色图.com| 国产一区二区三区在线观看免费 | 亚洲欧美偷拍三级| 美女mm1313爽爽久久久蜜臀| av一区二区不卡| 欧美tickling网站挠脚心| 亚洲女人****多毛耸耸8| 另类小说欧美激情| 日本丶国产丶欧美色综合| 精品福利一二区| 三级影片在线观看欧美日韩一区二区 | 成人精品免费看| 日韩一区二区视频| 亚洲午夜久久久| 99在线精品视频| 亚洲精品在线免费播放| 亚洲成人一区在线| 91麻豆6部合集magnet| 久久久久国产精品麻豆ai换脸| 亚洲成人动漫精品| 日本久久电影网| 国产精品毛片无遮挡高清| 蜜桃一区二区三区四区| 欧美日韩一级片在线观看| 国产精品不卡一区| 国产麻豆日韩欧美久久| 日韩欧美一级片| 亚洲高清视频的网址| 91在线免费视频观看| 欧美激情一区不卡| 国产一区视频导航| 精品国产免费人成电影在线观看四季 | 色综合久久中文综合久久97| 中文字幕精品三区| 国产成人在线观看| 久久久久久久电影| 美女www一区二区| 欧美一区二区三区成人| 亚洲不卡av一区二区三区| 色狠狠综合天天综合综合| 亚洲图片激情小说| 成人av先锋影音| 亚洲欧洲日韩女同| a4yy欧美一区二区三区| 国产精品午夜春色av| 豆国产96在线|亚洲| 中文字幕欧美国产| 成人av网在线| 亚洲九九爱视频| 欧美综合视频在线观看| 亚洲最新视频在线观看| 欧美在线观看你懂的| 香蕉久久夜色精品国产使用方法| 欧美人狂配大交3d怪物一区| 亚洲bt欧美bt精品777| 日韩一区二区三区免费看 | 国产在线视视频有精品| 久久久久综合网| 豆国产96在线|亚洲| 亚洲欧美在线另类| 在线视频欧美精品| 日韩国产欧美在线播放| 精品国产亚洲在线| 成人avav在线| 五月激情丁香一区二区三区| 日韩色视频在线观看| 国产99久久久久久免费看农村| 日韩一区在线播放| 欧美日韩一区二区三区高清| 美女www一区二区| 国产精品污污网站在线观看| 色激情天天射综合网| 蜜桃在线一区二区三区| 国产精品天天看| 欧美熟乱第一页| 国产乱淫av一区二区三区| 亚洲免费av观看|