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

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

?? sram512kleft16bit50mhzreadreq-sv05c.vhd

?? interface on virtex test ram
?? VHD
字號:
-------------------------------------------------------------------------------
-- sram512kleft16bit50mhzreadreq-sv05c.vhd
--
-- Author(s):     James Brennan
-- Created:       19 Feb 2001
-- Last Modified: 19 Feb 2001
-- 
-- 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).
-- * 16 bit data (each location holds 16 bits). 
-- * Only uses left-bank of SRAM. (Technically you could connect this entity
--   to either bank of SRAM in your top-level file. The data and address
--   lines have simply been named assuming that the entity will be connected
--   to the left bank of SRAM).
--
-- * Writes are performed in 2 clock cycles. Reads are performed in 1 clock
--   cycle.
--
-- * Read data is NOT registered internally. It must be registered externally.
-------------------------------------------------------------------------------

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

-- The two signals canRead and canWrite are are high when new requests
-- for reads and writes respectively can be made. 

-- 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').
--		You can assert doWrite on the same clock cycle that canWrite
--		is high. Asserting doWrite is also called making a
--		"write request".
-- *	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 2 cycles commencing with this first edge and will be
--		completed at the third rising clock edge after doWrite is
--		asserted.
-- To perform a read:
-- *	Place the read address on readAddr.
-- *	Wait until canRead is '1'. Then assert doRead (set to '1').
--		You can assert doRead on the same clock cycle that canRead
--		is high. Asserting doRead is also called making a
--		"read request".
-- *	The sraminterface will see doRead is '1' on the next rising
--		clock edge and on the same edge will register (i.e. place in
--		registers) the value on readAddr. The read will take place
--		over the next single clock cycle. The signal canRead
--		(as well as canWrite) will remain high in the cycle in
--		which the read takes place.	This indicates both that the 
--		readData will be valid at the end of this cycle and that the
--		sraminterface can at this point handle another read or write
--		request.
-- *	At the end of the clock cycle in which the read occurs,
--		the user of the sraminterface must register the value
--		on readData. This value must be registered, as on the next
--		clock cycle it is not guaranteed to be the same and may
--		instead change.

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;							-- Set this to make a read request.							
        doWrite: in STD_LOGIC;							-- Set this to make a write request.
        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 (15 downto 0);	-- Data read (user-side).
        writeData: in STD_LOGIC_VECTOR (15 downto 0);	-- Data to write (user-side).
        canRead: out STD_LOGIC;							-- Is '1' when a read request can be handled.							
        canWrite: out STD_LOGIC;						-- Is '1' when a write request can be handled.
        CELeftn: out STD_LOGIC;							-- CEn signal to left SRAM bank.
        OELeftn: out STD_LOGIC;							-- OEn signal to left SRAM bank.
        WELeftn: out STD_LOGIC;							-- WEn signal to left SRAM bank.
        SRAMLeftAddr: out STD_LOGIC_VECTOR (18 downto 0);	-- Address bus to left SRAM bank.
        SRAMLeftData: inout STD_LOGIC_VECTOR (15 downto 0)	-- Data bus to left SRAM bank.
    );
end sraminterface;

architecture sraminterface_arch of sraminterface is

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

	-- Constants:

	-- General enabled/disabled constants:
	constant CONST_ENABLED : STD_LOGIC := '1';
	constant CONST_DISABLED : STD_LOGIC := '0';
	
	-- Signals for registers:
	signal addrReg : STD_LOGIC_VECTOR(18 downto 0);
	signal writeDataReg : STD_LOGIC_VECTOR(15 downto 0);
	
	-- Clock-enable controls for the registers:
	signal regWriteAddr : STD_LOGIC;
	signal regReadAddr : STD_LOGIC;
	signal regWriteData : STD_LOGIC;
	
	-- Internal values of SRAM control signals:
	signal CEn : STD_LOGIC;
	signal OEn : STD_LOGIC;
	signal WEn : STD_LOGIC;

	-- Flip-flop signals for signalling when we are
	-- in the "write" states (these are effectively
	-- duplicating some of the presState signal to
	-- try and improve the timing of the circuit):
	signal doingWrite1 : STD_LOGIC;
	signal doingWrite2 : STD_LOGIC;

	-- Other control signals for the data path:
	signal enableWriteData : STD_LOGIC;

	-- 16-bit data bus:
	-- We are only using the left-hand side SRAM bank.
	signal SRAMData : STD_LOGIC_VECTOR(15 downto 0);
		
	-- Signals for latched-mealy outputs:
	signal nextOEn: STD_LOGIC;
	signal nextWEn: STD_LOGIC;
	signal nextDoingWrite1 : STD_LOGIC;
	signal nextDoingWrite2 : STD_LOGIC;
	
	-- Declarations required for the controller FSM.
	type STATE_TYPE is (stIdle, stWrite1, stWrite2,
			stRead1);
	signal presState, nextState: STATE_TYPE;
	
begin
	-- ========================================
	-- Architecture body:
	-- ========================================

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

	-- Control signals:
	CELeftn <= CEn;
	OELeftn <= OEn;
	WELeftn <= WEn;

	-- SRAM address bus:
	SRAMLeftAddr <= addrReg;
	
	-- SRAM data bus:
	SRAMLeftData <= SRAMData;

	readData <= SRAMData;
	
	-- ========================================
	-- Implementation of specific structures	
	-- ========================================
	
	-- 3-state buffer placed after the writeDataReg register
	-- in the data path:
	process(writeDataReg, doingWrite1, doingWrite2, CLK)
	begin
		-- We drive the SRAM data I/O bus with data to be written
		-- ONLY at the following times:
		--		* For the 2nd half of write cycle 1
		--	and * For the entirety of write cycle 2
		--
		-- To do this we rely on the fact that CLK = '1' for the
		-- first half of a clock cycle and CLK = '0' for the
		-- second half of a 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	(doingWrite1 = '1' and CLK = '0') or
			(doingWrite2 = '1') 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(doingWrite1, doingWrite2, CLK)
	begin
		if	(doingWrite1 = '1' and CLK = '0') or
			(doingWrite2 = '1' and CLK = '1') then
			WEn <= '0';
		else
			WEn <= '1';
		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';
			OEn <= '0';

			doingWrite1 <= '0';
			doingWrite2 <= '0';

			addrReg <= (others => '0');
			writeDataReg <= (others => '0');
					
		elsif CLK'EVENT and CLK = '1' then
			CEn <= '0';
			
			-- Handle the clock-enabling of each register:
			if regReadAddr = '1' then
				addrReg <= readAddr;
			elsif regWriteAddr = '1' then
				addrReg <= writeAddr;
			end if;

			if regWriteData = '1' then
				writeDataReg <= writeData;
			end if;

			-- Update latched-mealy outputs:
			OEn <= nextOEn;
			doingWrite1 <= nextDoingWrite1;
			doingWrite2 <= nextDoingWrite2;
					
			-- 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:
		nextOEn <= '0';
		nextDoingWrite1 <= '0';
		nextDoingWrite2 <= '0';

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

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

					nextOEn <= '1';
					nextDoingWrite1 <= '1';
					nextDoingWrite2 <= '0';
				elsif doRead = '1' then
					nextState <= stRead1;
					
					regReadAddr <= '1';
				end if;

			when stWrite1 =>
				nextState <= stWrite2;
				
				nextOEn <= '1';
				nextDoingWrite1 <= '0';
				nextDoingWrite2 <= '1';
				
				canRead <= '0';
				canWrite <= '0';
			when stWrite2 =>
				nextState <= stIdle;

				nextOEn <= '0';
				nextDoingWrite1 <= '0';
				nextDoingWrite2 <= '0';
				
				canRead <= '1';
				canWrite <= '1';	

				if doWrite = '1' then
					nextState <= stWrite1;
		
					regWriteAddr <= '1';
					regWriteData <= '1';					

					nextOEn <= '1';
					nextDoingWrite1 <= '1';
					nextDoingWrite2 <= '0';
				elsif doRead = '1' then
					nextState <= stRead1;
					
					regReadAddr <= '1';
				end if;

			when stRead1 =>
				nextState <= stIdle;				

				canWrite <= '1';
				canRead <= '1';

				if doWrite = '1' then
					nextState <= stWrite1;
		
					regWriteAddr <= '1';
					regWriteData <= '1';					

					nextOEn <= '1';
					nextDoingWrite1 <= '1';
					nextDoingWrite2 <= '0';
				elsif doRead = '1' then
					nextState <= stRead1;
					
					regReadAddr <= '1';
				end if;
			
				-- readAddrReg already contains the read address and
				-- is the default connection for the SRAM address bus.
				-- Therefore all the user needs to do is register the SRAM
				-- data bus at the end of this clock cycle.
				
		end case;
	end process;

end sraminterface_arch;

-- ---------------------------------
-- Major features/changes:
-- ---------------------------------
-- (19/02/2001) sram512kleft16bit50mhzreadreq-sv05c created
-- from sv05. This version is identical to sv05, except that
-- it uses only 1 clock cycle for a read instead of 2. (Writes
-- still take 2 clock cyles). In theory, 2 cycles should be
-- required for a read, but under some circumstances it may
-- be possible to get away with only using one cycle for a read.
-- In such a situation, the sram interface in this file could
-- be used.
-- (15/02/2001) sram512kleft16bit50mhzreadreq-sv05 created
-- from sv04. This version works successfully again.
-- It uses a 2 clock cycle write and a 2 clock cycle read.
-- Note we also have tried to improve the logic that
-- handles generating the value for WEn. We have created
-- two signals (doingWrite1 and doingWrite2) as part of
-- this effort to improve timing. They are basically
-- duplicates of some of the bits of presState. The path
-- from presState to the WEn pad was very long, so this
-- duplication of logic is aimed to shorten that path.
-- The .ucf file we are using is:
-- "Y pport, Y debug, Y timing, Y IOB outputs, N input delay, Y fast slew.ucf"
-- (09/02/2001) sram512kleft16bit50mhzreadreq-sv04 created
-- from sv03. An experimental version with *many* cycles
-- for reads and writes.
-- (06/02/2001) We removed the multiplexor on the readData
-- output port as well.
-- (06/02/1001) Address multiplexer placed before
-- address register, instead of having two address registers
-- and a multiplexor placed between them and the SRAM ports.
-- (05/02/2001) sram512kleft16bit50mhzreadreq-sv02 created
-- from sv02. An experimental version.
-- 3 cycle read introduced. Still using a 2 cycle write.
-- (29/01/2001) sram512kleft16bit50mhzreadreq-sv02 created
-- from sv01b. A read now takes two clock cycles.
-- Also, we have reverted to NOT registering the read data
-- internally. Therefore the read data must be registered
-- externally at the end of the 2nd clock cycle of the read
-- process.
-- (24/01/2001) sram512kleft16bit50mhzreadreq-sv01b created
-- from sram512kleft16bit50mhz-sv01b.
-- To perform a read, a read "request" must now be given using
-- the doRead signal, just as a write request is made using the
-- doWrite signal. In this version of the SRAM interface, the
-- read data is also registered internally. Thus the read data
-- no longer needs to be registered externally.
-- (17/01/2001) File created by copying
-- "sram512kleft16bit50mhz-sv01.vhd" and modifying it.
-- The write process was changed to take 2 clock cycles
-- instead of 1, while the read process still takes
-- only 1 clock cycle.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲三级理论片| 精品国产一区二区三区av性色| 久久久综合视频| 国产主播一区二区| 亚洲国产精品av| 成人精品国产福利| 亚洲少妇最新在线视频| 色94色欧美sute亚洲线路二| 艳妇臀荡乳欲伦亚洲一区| 欧美三片在线视频观看| 日韩**一区毛片| 精品99一区二区三区| 国产成人免费网站| 亚洲人成网站影音先锋播放| 欧美中文字幕一区二区三区亚洲| 亚洲图片欧美色图| 欧美成人精品福利| 成人永久aaa| 夜夜操天天操亚洲| 日韩一级完整毛片| 高潮精品一区videoshd| 日韩毛片高清在线播放| 在线不卡中文字幕播放| 国产一区久久久| 亚洲三级免费电影| 日韩精品一区二区三区swag| 不卡av免费在线观看| 亚洲v精品v日韩v欧美v专区| 精品国产免费一区二区三区四区| 成人h精品动漫一区二区三区| 亚洲一区二区视频在线观看| 欧美大肚乱孕交hd孕妇| av综合在线播放| 日产国产高清一区二区三区 | 99久久婷婷国产| 亚洲成av人片一区二区梦乃| 国产日本欧美一区二区| 欧美日韩一区二区在线观看视频| 国产最新精品精品你懂的| 亚洲精品免费在线| 精品国产亚洲一区二区三区在线观看| 99精品国产91久久久久久| 蜜臀av国产精品久久久久| 亚洲图片激情小说| 久久日韩精品一区二区五区| 欧美午夜电影在线播放| 国产不卡高清在线观看视频| 日本午夜精品视频在线观看| 亚洲女人的天堂| 国产视频一区在线播放| 日韩欧美在线1卡| 91国产丝袜在线播放| 国产精品一区在线| 日本不卡高清视频| 亚洲一区二区三区中文字幕在线 | 国产精品美女久久久久久久久 | 国产美女在线精品| 亚洲地区一二三色| 国产精品久久久久久久久快鸭 | 欧美精品自拍偷拍动漫精品| av日韩在线网站| 国产成人亚洲综合色影视| 日本不卡免费在线视频| 亚洲超丰满肉感bbw| 亚洲女女做受ⅹxx高潮| 欧美激情综合网| 久久久久久影视| 精品福利一区二区三区| 日韩你懂的在线播放| 7799精品视频| 欧美猛男男办公室激情| 欧美日韩成人一区| 欧美区在线观看| 欧美日韩mp4| 欧美在线不卡视频| 日本韩国视频一区二区| 一本到三区不卡视频| 99久久99久久精品国产片果冻| 国产91精品久久久久久久网曝门| 国产精品自在在线| 国产高清亚洲一区| 成人18视频日本| 成人国产精品免费观看视频| 成人综合在线观看| 91免费看视频| 欧美在线免费播放| 欧美日韩日日夜夜| 日韩一区二区三区观看| 日韩一级片在线观看| 久久精品一区二区三区不卡| 国产午夜精品一区二区| 日本一区二区在线不卡| 日韩一区在线看| 一区二区三区在线观看网站| 午夜电影久久久| 久久99精品久久久久久久久久久久| 久久国产婷婷国产香蕉| 国产激情偷乱视频一区二区三区| 成人午夜激情视频| 色婷婷激情一区二区三区| 欧美日韩在线观看一区二区| 青青草精品视频| 91在线观看高清| 国产精品1024久久| 亚洲一二三四在线观看| 日韩av高清在线观看| 美腿丝袜亚洲一区| 国产成人小视频| 欧美日韩日日摸| 欧美精品精品一区| 欧美亚洲国产bt| 日一区二区三区| 国产精品久久久久久久蜜臀 | 日日嗨av一区二区三区四区| 日本在线播放一区二区三区| 久久国内精品视频| 一本色道久久综合亚洲aⅴ蜜桃 | 一区二区三区美女| 视频在线观看91| 国产电影精品久久禁18| 欧洲视频一区二区| 2023国产精品自拍| 亚洲欧美日韩国产中文在线| 蜜臀va亚洲va欧美va天堂| 99国产精品视频免费观看| 91精品国产全国免费观看| 国产日产欧美一区二区视频| 亚洲成人第一页| 成人精品国产一区二区4080| 日韩你懂的在线播放| 一级日本不卡的影视| 精品一区二区三区香蕉蜜桃 | 日本午夜精品视频在线观看| 成人午夜伦理影院| 日韩视频国产视频| 亚洲天堂免费看| 国产成人综合网| 欧美一级一级性生活免费录像| 最好看的中文字幕久久| 韩国精品在线观看| 337p亚洲精品色噜噜| 亚洲精品日韩综合观看成人91| 国产最新精品精品你懂的| 欧美三区在线观看| 亚洲欧洲精品一区二区三区| 精品亚洲国产成人av制服丝袜| 欧美日韩亚洲综合在线| 国产精品久久精品日日| 国产在线看一区| 日韩欧美在线不卡| 日韩高清在线电影| 日本精品视频一区二区| 国产精品免费aⅴ片在线观看| 久久国产婷婷国产香蕉| 91精品国产综合久久国产大片| 亚洲伦理在线免费看| 92国产精品观看| 亚洲欧美怡红院| 91丨porny丨在线| 国产精品久久久久毛片软件| 国产成人精品一区二区三区四区 | 精品88久久久久88久久久| 天天综合日日夜夜精品| 欧美性高清videossexo| 亚洲精品高清在线观看| av男人天堂一区| 亚洲视频免费在线| 在线亚洲一区二区| 亚洲最新在线观看| 欧美吻胸吃奶大尺度电影| 一区二区三区欧美亚洲| 色综合久久88色综合天天免费| 17c精品麻豆一区二区免费| www.99精品| 亚洲另类色综合网站| 在线视频国内自拍亚洲视频| 亚洲国产一区视频| 欧美日韩一级二级三级| 日本欧美一区二区在线观看| 欧美一卡二卡在线| 国产一区视频在线看| 国产人成一区二区三区影院| 99国产欧美另类久久久精品| 亚洲精品乱码久久久久久| 欧美在线播放高清精品| 爽爽淫人综合网网站| 欧美变态口味重另类| 精久久久久久久久久久| 亚洲国产成人私人影院tom| 99在线精品观看| 亚洲无线码一区二区三区| 91精品国产综合久久婷婷香蕉| 免费欧美日韩国产三级电影| 久久午夜羞羞影院免费观看| 成人黄色777网| 亚洲一区二区三区四区五区中文| 5月丁香婷婷综合| 国产一区二区伦理片| 亚洲欧美一区二区不卡| 欧美一区二区福利视频|