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

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

?? sdr_sdram_tb.vhd

?? ref sdr sdram vhdl代碼
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
--###############################################################################
--
--  LOGIC CORE:          SDR SDRAM Controller test bench							
--  MODULE NAME:         sdr_sdram_tb()
--  COMPANY:             Altera Corporation
--                       www.altera.com	
--
--  REVISION HISTORY:  
--
--    Revision 1.0  06/06/2000	Description: Initial Release.
--    Revision 1.1  07/12/2000  Modified to support burst terminate and precharge
--                              during full page accesses.
--
--  FUNCTIONAL DESCRIPTION:
--
--  This module is the test bench for the SDR SDRAM controller.
--
--  Copyright (C) 1991-2000 Altera Corporation
--
--##############################################################################
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

--library arithmetic;
--use arithmetic.std_logic_arith.all;


entity sdr_sdram_tb is
    generic (
         ASIZE          : integer := 23;
         DSIZE          : integer := 32;
         ROWSIZE        : integer := 12;
         COLSIZE        : integer := 9;
         BANKSIZE       : integer := 2;
         ROWSTART       : integer := 9;
         COLSTART       : integer := 0;
         BANKSTART      : integer := 20
    );
end sdr_sdram_tb;

architecture rtl of sdr_sdram_tb is

component sdr_sdram
	port (
         CLK            : in      std_logic;                                   --System Clock
         RESET_N        : in      std_logic;                                   --System Reset
         ADDR           : in      std_logic_vector(ASIZE-1 downto 0);          --Address for controller requests
         CMD            : in      std_logic_vector(2 downto 0);                --Controller command 
         CMDACK         : out     std_logic;                                   --Controller command acknowledgement
         DATAIN         : in      std_logic_vector(DSIZE-1 downto 0);          --Data input
         DATAOUT        : out     std_logic_vector(DSIZE-1 downto 0);          --Data output
         DM             : in      std_logic_vector(DSIZE/8-1 downto 0);        --Data mask input
         SA             : out     std_logic_vector(11 downto 0);               --SDRAM address output
         BA             : out     std_logic_vector(1 downto 0);                --SDRAM bank address
         CS_N           : out     std_logic_vector(1 downto 0);                --SDRAM Chip Selects
         CKE            : out     std_logic;                                   --SDRAM clock enable
         RAS_N          : out     std_logic;                                   --SDRAM Row address Strobe
         CAS_N          : out     std_logic;                                   --SDRAM Column address Strobe
         WE_N           : out     std_logic;                                   --SDRAM write enable
         DQ             : inout   std_logic_vector(DSIZE-1 downto 0);          --SDRAM data bus
         DQM            : out     std_logic_vector(DSIZE/8-1 downto 0)         --SDRAM data mask lines
  	);
end component;

component mt48lc8m16a2
   PORT (
        Dq    : INOUT STD_LOGIC_VECTOR (15 DOWNTO 0) := (OTHERS => 'Z');
        Addr  : IN    STD_LOGIC_VECTOR (11 DOWNTO 0) := (OTHERS => '0');
        Ba    : IN    STD_LOGIC_VECTOR := "00";
        Clk   : IN    STD_LOGIC := '0';
        Cke   : IN    STD_LOGIC := '0';
        Cs_n  : IN    STD_LOGIC := '1';
        Ras_n : IN    STD_LOGIC := '0';
        Cas_n : IN    STD_LOGIC := '0';
        We_n  : IN    STD_LOGIC := '0';
        Dqm   : IN    STD_LOGIC_VECTOR (1 DOWNTO 0) := (OTHERS => '0')
    );
END component;


signal   clk            : std_logic := '0';
signal   clk2           : std_logic := '0';
signal   reset_n        : std_logic;
signal   sa             : std_logic_vector(11 downto 0);
signal   ba             : std_logic_vector(1 downto 0);
signal   cs_n           : std_logic_vector(1 downto 0);
signal   cke            : std_logic;
signal   ras_n          : std_logic;
signal   cas_n          : std_logic;
signal   we_n           : std_logic;
signal   cmd            : std_logic_vector(2 downto 0);
signal   cmdack         : std_logic;
signal   addr           : std_logic_vector(ASIZE-1 downto 0);
signal   datain         : std_logic_vector(DSIZE-1 downto 0);
signal   dataout        : std_logic_vector(DSIZE-1 downto 0);
signal   dm             : std_logic_vector(DSIZE/8-1 downto 0);
signal   dq             : std_logic_vector(DSIZE-1 downto 0);
signal   dqm            : std_logic_vector(DSIZE/8-1 downto 0);

signal   test_addr      : std_logic_vector(ASIZE-1 downto 0);
signal   test_data      : std_logic_vector(DSIZE-1 downto 0);
signal   y              : std_logic_vector(2 downto 0);
signal   z              : std_logic_vector(1 downto 0);




--       write_burst(start_data, start_addr, bl, rcd, mask, addr, dataout, dqm, cmdack, cmd)
--
--       This task performs a write access of size BL 
--       at SDRAM address to the SDRAM controller
--
--       start_data     :    Starting value for the burst write sequence.  The write burst procedure
--                           simply increments the data values from the start_data value.   
--       start_addr     : 	Address in SDRAM to start the burst access
--       bl             :    bl is the burst length the sdram devices have been configured for.
--       rcd            :    rcd value that was set during configuration
--       mask           :    Byte data mask for all cycles in the burst.
--       addr           :    Address output
--       dataout        :    Data output
--       dqm            :    data mask output
--       cmdack         :    Command ack input
--       cmd            :    Command output

  procedure burst_write (
                         start_data: std_logic_vector(DSIZE-1 downto 0);
                         start_addr: std_logic_vector(ASIZE-1 downto 0);
                         bl : integer;
                         rcd : integer;
                         mask : std_logic_vector(DSIZE/8-1 downto 0);
                         signal addr: out std_logic_vector(ASIZE-1 downto 0);
                         signal dataout: out std_logic_vector(DSIZE-1 downto 0);
                         signal dqm: out std_logic_vector(DSIZE/8-1 downto 0);
                         signal cmdack: std_logic;
                         signal cmd: out std_logic_vector(2 downto 0)) is
                         
    variable i : integer;
    
    begin
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "010";                                                    -- issued a WRITEA command
              addr <= start_addr; 
              dataout <= start_data;                                           -- issue the first data value                    
              dqm <= mask;
              wait until (cmdack = '1');                                       -- wait for a ack from the controller
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "000";                                                    -- NOP the commmand input
             
              for i in 1 to rcd-2 loop                                         -- wait for RAS to CAS to expire
			     wait until (CLK'event and CLK = '1');
                   wait for 1 ns;
              end loop;
              
              for  i in 1 to bl loop                                            -- loop from 1 to bl
                   dataout <= start_data + i;                                   -- clock the data into the controller
			     wait until (CLK'event and CLK = '1');
                   wait for 1 ns;
              end loop;
                            
              dqm <= "0000";
  end burst_write;




--       burst_read(address, start_value, CL, RCD, BL)
--
--       This task performs a read access of size BL 
--       at SDRAM address to the SDRAM controller
--
--       start_data     :    Starting value for the burst read sequence.  The read burst task
--                           simply increments and compares the data values from the start_value.    
--       start_addr     :    Address in SDRAM to start the burst access.
--       bl             :    bl is the burst length the sdram devices have been configured for.
--       cl             :    CAS latency the sdram devices have been configured for.
--       rcd            :    rcd value the controller has been configured for.
--       addr           :    Address output
--       datain         :    Data input
--       cmdack         :    Command ack input
--       cmd            :    Command output
                             

   procedure burst_read (
                         start_data: std_logic_vector(DSIZE-1 downto 0);
                         start_addr: std_logic_vector(ASIZE-1 downto 0);
                         bl : integer;
                         cl : integer;
                         rcd : integer;
                         signal addr: out std_logic_vector(ASIZE-1 downto 0);
                         signal datain: std_logic_vector(DSIZE-1 downto 0);
                         signal cmdack: std_logic;
                         signal cmd: out std_logic_vector(2 downto 0)) is
    
    variable i: std_logic_vector(3 downto 0) := "0000";
    
    begin
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "001";                                                    -- issue a READA command
              addr <= start_addr;                     
              wait until (cmdack = '1');                                       -- wait for command ack
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "000";                                                    -- NOP the command input
 
              for i in 1 to (cl+rcd+1) loop                                    -- wait for RAS to CAS and cl to expire
			     wait until (CLK'event and CLK = '1');
              end loop;
              
              for i in 1 to bl loop                                            -- loop from 1 to burst length(BL), 
                wait until (CLK'event and CLK = '1');                          -- collecting and comparing the data
 --               wait for 3 ns;
                        if (datain /= start_data + i - 1 ) then
                            assert false
                            REPORT "read data mis-match"
                            SEVERITY FAILURE;
                        end if;
              end loop;	
         
    
  end burst_read;



--       page_write_burst(address, start_value, data_mask, RCD, len, dataout, addr, dqm, cmd, cmdack)
--       
--       This task performs a page write burst access of size length 
--       at SDRAM address to the SDRAM controller
--
--       address        : 	Address in SDRAM to start the burst access
--       start_value    :    Starting value for the burst write sequence.  The write burst task
--                             simply increments the data values from the start_value.
--       data_mask      :    Byte data mask for all cycles in the burst.
--       rcd            :    RCD value that was set during configuration
--       len            :    burst length of the access.
--       dataout        :    data output
--       addr           :    address output
--       dqm            :    data mask output
--       cmd            :    command output
--       cmdack         :    comand ack input   


  procedure   page_write_burst(
	               address             : std_logic_vector(ASIZE-1 downto 0);
                   start_value         : std_logic_vector(DSIZE-1  downto 0);
                   data_mask           : std_logic_vector(DSIZE/8-1 downto 0);
                   rcd                 : integer;
                   len                 : integer;
                   signal dataout      : out std_logic_vector(DSIZE-1 downto 0);
                   signal addr         : out std_logic_vector(ASIZE-1 downto 0);
                   signal dqm          : out std_logic_vector(DSIZE/8-1 downto 0);
                   signal cmd          : out std_logic_vector(2 downto 0);
                   signal cmdack       : std_logic
              ) is

         variable i : integer;

         begin
              wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              addr <= address;
              cmd  <= "010";
              dataout <= start_value;
              dqm     <= data_mask;
              wait until (cmdack = '1');                                       -- wait for command ack
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd  <= "000";
                
              for i in 1 to rcd-2 loop                                         -- wait for rcd to pass 
			     wait until (CLK'event and CLK = '1');
              end loop;
              wait for 1 ns;

              for i in 1 to len-3 loop                                         -- burst out len data cycles 
                   dataout <= start_value + i;
			     wait until (CLK'event and CLK = '1');
                   wait for 1 ns;
              end loop;
              dataout <= start_value + len-2;                                  --keep incrementing the data value
              cmd <= "100";                                                    -- issue a terminate command to terminate the page burst                         
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;

              dataout <= start_value + len-1;                                  --increment the data one more
                   
              wait until (cmdack = '1');                                       -- Wait for the controller to ack the command   
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "000";                                                    -- Clear the command by issuing a NOP
                
              dqm <= "0000";	
              
              wait for 200 ns;
              cmd <= "100";                                     -- close the bank with a precharge
              wait until (cmdack = '1');
              wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "000"; 
                                     
              
              
  end page_write_burst;





--       page_read_burst(address, start_value, cl, rcd, len, addr, datain, cmd, cmdack)
--
--       This task performs a page read access of size length 
--       at SDRAM address to the SDRAM controller
--
--       address        :         Address in SDRAM to start the burst access
--       start_value    :         Starting value for the burst read sequence.  The read burst task
--                                     simply increments and compares the data values from the start_value.
--       cl             :         CAS latency the sdram devices have been configured for.
--       rcd            :         rcd value the controller has been configured for.
--       len            :         burst length of the access.
--       addr           :         address output.
--       datain         :         data input;
--       cmd            :         command output;
--       cmdack         :         command ack;



procedure    page_read_burst(
	                         address   : std_logic_vector(ASIZE-1 downto 0);
                             start_value : std_logic_vector(DSIZE-1 downto 0);
                             cl   : integer;
                             rcd : integer;
                             len : integer;
                             signal addr : out std_logic_vector(ASIZE-1 downto 0);
                             signal datain : std_logic_vector(DSIZE-1 downto 0);
                             signal cmd    : out std_logic_vector(2 downto 0);
                             signal cmdack : std_logic
                             ) is
                           
        variable i : integer;
        
        begin
              wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              addr  <= address;
              cmd   <= "001";                                   -- issue a read command to the controller
              wait until (cmdack = '1');                        -- wait for the controller to ack
			wait until (CLK'event and CLK = '1');
              wait for 1 ns;
              cmd <= "000";                                     -- NOP on the command input
              
              for i in 1 to (CL+RCD) loop                     -- Wait for activate and cas latency delays
			     wait until (CLK'event and CLK = '1');
              end loop;
              
              for i in 1 to len loop                            -- loop and collect the data
                   wait until (CLK'event and CLK = '1');
                   wait for 3 ns;
                   
                        if (i = (len-cl-5)) then
                              cmd <= "100";                     -- Terminate the page burst
                        end if;
                         
                        if (cmdack = '1') then
                             cmd<="000";                        -- end the precharge command once the controller has ack'd
                        end if;
                        

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲123区在线观看| 国产成人av电影在线| 精品一区在线看| av动漫一区二区| 精品乱人伦一区二区三区| 樱桃视频在线观看一区| 国产高清亚洲一区| 欧美一区二区视频免费观看| 亚洲欧美欧美一区二区三区| 国产麻豆精品95视频| 欧美日韩精品高清| 亚洲综合免费观看高清完整版在线 | 全国精品久久少妇| 欧美在线视频日韩| 亚洲激情自拍偷拍| 91在线视频官网| 中文字幕一区二区视频| 国产成人亚洲综合a∨婷婷图片| 欧美一级爆毛片| 亚洲第一av色| 精品视频1区2区| 亚洲大尺度视频在线观看| 一道本成人在线| 亚洲欧美一区二区久久| 99久久99精品久久久久久 | 一区二区三区在线观看欧美| 成人综合激情网| 国产欧美日韩激情| 国产超碰在线一区| 中文字幕一区二区在线观看| 成人精品视频.| 日韩理论电影院| 欧洲中文字幕精品| 丝袜美腿亚洲色图| 日韩欧美在线一区二区三区| 三级在线观看一区二区| 日韩视频免费观看高清完整版| 日本亚洲最大的色成网站www| 欧美三级三级三级爽爽爽| 天堂蜜桃一区二区三区| 制服丝袜日韩国产| 久草中文综合在线| 中文字幕欧美日韩一区| 色成年激情久久综合| 亚洲一区在线播放| 日韩欧美一级二级三级久久久| 麻豆精品视频在线观看视频| 久久久www免费人成精品| 成人国产精品免费观看动漫| 亚洲精品高清在线观看| 在线电影一区二区三区| 激情五月婷婷综合| 日韩美女精品在线| 日韩一区二区电影在线| 国产成人精品免费一区二区| 亚洲欧美一区二区久久| 日韩欧美一区在线观看| 成人深夜在线观看| 午夜欧美电影在线观看| 久久婷婷一区二区三区| 色婷婷久久久久swag精品| 美女免费视频一区| 国产精品美女www爽爽爽| 在线免费不卡视频| 国内精品久久久久影院色| 国产精品天干天干在线综合| 欧美亚洲禁片免费| 狠狠色丁香久久婷婷综| 中文字幕日韩av资源站| 日韩欧美精品在线| 91在线无精精品入口| 久久精品国产秦先生| 亚洲欧美一区二区三区久本道91 | 欧美精品久久一区| 国产一区欧美一区| 一区二区免费视频| 国产日韩三级在线| 欧美性生活大片视频| 国产成人h网站| 午夜影院久久久| 国产精品免费网站在线观看| 精品视频全国免费看| 成人一区二区视频| 麻豆一区二区99久久久久| 亚洲美女在线国产| 国产拍欧美日韩视频二区| 欧美日韩大陆在线| 色综合网色综合| 国产成人免费视频网站高清观看视频| 亚洲综合另类小说| 国产精品私人自拍| 精品久久久久久久久久久久久久久久久| 91色在线porny| 波多野结衣亚洲| 久久国产精品一区二区| 天天综合网 天天综合色| 国产精品国产三级国产aⅴ入口| 欧美mv日韩mv| 欧美一区二区精美| 9191久久久久久久久久久| 91福利在线导航| 色欧美片视频在线观看在线视频| 成人在线一区二区三区| 国产精品羞羞答答xxdd| 国产一区二区三区香蕉| 麻豆精品在线观看| 捆绑变态av一区二区三区| 日本美女一区二区三区| 日本麻豆一区二区三区视频| 日韩黄色免费电影| 日韩电影一区二区三区| 日韩av中文字幕一区二区三区| 亚洲国产色一区| 午夜激情久久久| 免费在线看成人av| 久久国产欧美日韩精品| 激情都市一区二区| 国产精品综合在线视频| 国产成人av电影在线观看| 粉嫩一区二区三区在线看| 不卡的av网站| 色综合久久中文字幕| 欧美日韩一区二区在线观看视频| 欧美图区在线视频| 欧美亚洲日本国产| 制服丝袜激情欧洲亚洲| wwwwxxxxx欧美| 1024精品合集| 日韩综合小视频| 国产在线日韩欧美| www.亚洲免费av| 欧美色区777第一页| 日韩西西人体444www| 精品国产免费一区二区三区四区| 久久久久国产精品免费免费搜索| 国产精品污www在线观看| 亚洲精品日日夜夜| 久久国产免费看| 91视频一区二区| 欧美一级久久久| 欧美经典一区二区| 亚洲精品国产一区二区精华液 | 天使萌一区二区三区免费观看| 天堂成人国产精品一区| 国产乱子轮精品视频| gogo大胆日本视频一区| 欧美图片一区二区三区| 久久视频一区二区| 一区二区三区成人| 国内久久精品视频| 欧美视频在线一区| 国产日韩v精品一区二区| 亚州成人在线电影| 成人美女视频在线观看| 69久久夜色精品国产69蝌蚪网| 亚洲国产精品黑人久久久| 亚洲成av人片在www色猫咪| 国产99久久久国产精品免费看| 欧美在线一区二区三区| 国产欧美一区二区精品仙草咪| 一区二区激情小说| 国产不卡视频一区| 精品捆绑美女sm三区| 亚洲国产精品一区二区久久恐怖片 | 欧洲一区二区三区在线| 国产无人区一区二区三区| 香蕉久久一区二区不卡无毒影院 | 99精品欧美一区二区蜜桃免费| 91精品国产综合久久福利| 亚洲欧洲av另类| 国内精品写真在线观看| 欧美一区二区日韩一区二区| 亚洲精品欧美专区| www.久久久久久久久| 久久免费视频一区| 久久99精品国产.久久久久久| 欧洲亚洲精品在线| 中文字幕一区二区三区av| 极品美女销魂一区二区三区| 69av一区二区三区| 亚洲成人精品一区二区| 91丨porny丨首页| 中文字幕一区av| 国产99久久久精品| 国产午夜精品福利| 激情欧美日韩一区二区| 日韩午夜中文字幕| 美女久久久精品| 精品国产一区二区在线观看| 日韩中文字幕91| 日韩视频一区二区三区| 日本视频一区二区三区| 欧美电影一区二区三区| 日韩精品成人一区二区在线| 欧美日本免费一区二区三区| 午夜免费久久看| 欧美日韩一区在线| 免费成人在线观看视频| 欧美一级高清大全免费观看| 日本午夜精品视频在线观看|