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

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

?? sd_sig.vhd

?? lattice sdram 控制器VHDL源代碼
?? VHD
字號:
-- --------------------------------------------------------------------
-- >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
-- --------------------------------------------------------------------
-- Copyright (c) 2001 by Lattice Semiconductor Corporation
-- --------------------------------------------------------------------
--
-- Permission:
--
--   Lattice Semiconductor grants permission to use this code for use
--   in synthesis for any Lattice programmable logic product.  Other
--   use of this code, including the selling or duplication of any
--   portion is strictly prohibited.
--
-- Disclaimer:
--
--   This VHDL or Verilog source code is intended as a design reference
--   which illustrates how these types of functions can be implemented.
--   It is the user's responsibility to verify their design for
--   consistency and functionality through the use of formal
--   verification methods.  Lattice Semiconductor provides no warranty
--   regarding the use or functionality of this code.
--
-- --------------------------------------------------------------------
--           
--                     Lattice Semiconductor Corporation
--                     5555 NE Moore Court
--                     Hillsboro, OR 97214
--                     U.S.A
--
--                     TEL: 1-800-Lattice (USA and Canada)
--                          408-826-6000 (other locations)
--
--                     web: http://www.latticesemi.com/
--                     email: techsupport@latticesemi.com
--
-- --------------------------------------------------------------------
-- Revision History :
-----------------------------------------------------------------------
-- Ver  | Author    | Mod. Date | Changes Made:
-----------------------------------------------------------------------
-- 0.1  | kam       | 9/3/99    | birth
-- 1.0  | kam       | ------    | Release
-----------------------------------------------------------------------

-- This is the signal module for the synchronous DRAM controller.  It 
-- monitors the output of the state machine vectors and outputs the 
-- appropriate signals at the right time.

library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity sd_sig is
     port (add:            in   std_logic_vector(24 downto 0);
           wr_l:           in   std_logic;
           byte_en:        in   std_logic_vector(3 downto 0);
           term_l:         in   std_logic;
           sdram_cycle:    in   std_logic_vector(3 downto 0);
           state_cntr:     in   std_logic_vector(3 downto 0);
           sdram_mode_reg: in   std_logic_vector(11 downto 0);
           sdram_cmnd:     in   std_logic_vector(1 downto 0);
           rst_l:          in   std_logic;
           clk:            in   std_logic;
           sd_add:         out  std_logic_vector(11 downto 0);
           sd_ba:          out  std_logic_vector(1 downto 0);
           sd_cs0_l:       out  std_logic;
           sd_cs1_l:       out  std_logic;
           sd_ras_l:       out  std_logic;
           sd_cas_l:       out  std_logic;
           sd_we_l:        out  std_logic;
           sd_cke:         out  std_logic;
           sd_dqm:         out  std_logic_vector(3 downto 0);
           ack_l:          out  std_logic);
end sd_sig;


architecture RTL of sd_sig is

  signal term_lcatch: std_logic;
  signal term_ldly:   std_logic;
		
  begin		
  ---------------------------------------------------------------------
  -- equations
  -- this is for 32 bit wide array
  -- address bits 0-1 are not used


  sd_add_set: process(clk, rst_l,sdram_cycle, state_cntr, add, sdram_mode_reg, sdram_cmnd)
    begin
      if(rst_l = '0') then
        sd_add <= "010000000000" after 1 ns;                            -- precharge
	 elsif rising_edge(clk) then 
	   if ((sdram_cycle(1) = '1') and (state_cntr = "0000") and (sdram_cmnd = "11")) then
           sd_add <=  sdram_mode_reg after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0000")) then   -- ras time
           sd_add <= add(21 downto 10) after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0010")) then   -- cas time
           sd_add <=  "1111" & add(9 downto 2) after 1 ns;
        else
           sd_add <= "010000000000" after 1 ns;                         -- precharge
        end if;
      end if;
  end process sd_add_set;


  -- bank addresses

  bank: process(clk, rst_l,sdram_cycle, state_cntr, add, sdram_mode_reg, sdram_cmnd)
    begin
      if(rst_l = '0') then
        sd_ba <= "00" after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(2) = '1') and (state_cntr = "0000")) then     -- ras time
           sd_ba <=  add(23 downto 22) after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0010")) then  -- cas time
           sd_ba <= add(23 downto 22) after 1 ns;
        else
           sd_ba <= "00" after 1 ns;
        end if;
      end if;
  end process bank;


  -- chip select 0

  chip_select_0: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        sd_cs0_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(1) = '1') and (state_cntr = "0000")) then     -- cmd cycle
           sd_cs0_l <=  '0' after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0000")) then  -- ras time
           sd_cs0_l <= add(24) after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0010")) then  -- cas time
           sd_cs0_l <= add(24) after 1 ns;
        elsif ((sdram_cycle(3) = '1' and state_cntr = "0000")) then    -- refresh time
           sd_cs0_l <= '0' after 1 ns;
        elsif ((term_lcatch = '1' and sdram_cycle(2) = '1' and add(24) = '0')) then  -- term cycle 
           sd_cs0_l <= '0' after 1 ns;
        else
           sd_cs0_l <= '1' after 1 ns;
        end if;
      end if;
  end process chip_select_0;


  -- chip select 1

  chip_select_1: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        sd_cs1_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(1) = '1') and (state_cntr = "0000")) then     -- cmd cycle
          sd_cs1_l <=  '0' after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0000")) then  -- ras time
          sd_cs1_l <= not add(24) after 1 ns;
        elsif ((sdram_cycle(2) = '1') and (state_cntr = "0010")) then  -- cas time
          sd_cs1_l <= not add(24) after 1 ns;
        elsif ((sdram_cycle(3) = '1' and state_cntr = "0000")) then    -- refresh time
          sd_cs1_l <= '0' after 1 ns;
        elsif ((term_lcatch = '1' and sdram_cycle(2) = '1' and add(24) = '1')) then  -- term cycle
          sd_cs1_l <= '0' after 1 ns;
        else
          sd_cs1_l <= '1' after 1 ns;
        end if;
      end if;
  end process chip_select_1;


  -- ras

  ras: process(clk, rst_l, sdram_cycle, state_cntr)
    begin
      if(rst_l = '0') then
        sd_ras_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(1) = '1' and (state_cntr = "0000")) or     -- cmd cycle
            (sdram_cycle(2) = '1' and (state_cntr = "0000")) or     -- ras time 
            (sdram_cycle(3) = '1' and (state_cntr = "0000"))) then  -- refresh time
           sd_ras_l <= '0' after 1 ns; 
        else
           sd_ras_l <= '1' after 1 ns;
        end if;
      end if;
  end process ras;

  
  -- cas

  cas: process(clk, rst_l, sdram_cycle, state_cntr)
    begin
      if(rst_l = '0') then
        sd_cas_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(1) = '1' and (state_cntr = "0000" and sdram_cmnd(1) = '1')) or 
            (sdram_cycle(2) = '1' and (state_cntr = "0010")) or      -- cas time 
            (sdram_cycle(3) = '1' and (state_cntr = "0000"))) then   -- refresh time
           sd_cas_l <= '0' after 1 ns; 
        else
           sd_cas_l <= '1' after 1 ns;
        end if;
      end if;
  end process cas;


  -- we

  we: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        sd_we_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if ((sdram_cycle(1) = '1' and state_cntr = "0000" and sdram_cmnd(0) = '1') or  -- cmd cycle 
            (sdram_cycle(2) = '1' and state_cntr = "0010" and wr_l = '0') or           -- cas cycle 
            (sdram_cycle(2) = '1' and term_lcatch = '1')) then                         -- terminate
          sd_we_l <= '0' after 1 ns; 
        else
          sd_we_l <= '1' after 1 ns;
        end if;
      end if;
  end process we;


  -- clock enable

  clock_enable: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        sd_cke <= '0' after 1 ns;  
      elsif rising_edge(clk) then 
        sd_cke <= '1' after 1 ns;
      end if;
  end process clock_enable;


  -- data mask

  data_mask: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        sd_dqm <= "0000" after 1 ns;  
      elsif rising_edge(clk) then 
        if (sdram_cycle(2) = '1' and state_cntr = "0010") then 
           sd_dqm <= byte_en after 1 ns; 
        elsif (state_cntr = "1010") then
           sd_dqm <= "0000" after 1 ns;
        end if;
      end if;
  end process data_mask;


  -- acknowledge  

  acknowledge: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        ack_l <= '1' after 1 ns;  
      elsif rising_edge(clk) then 
        if (sdram_cycle(2) = '1' and state_cntr = "0010" and wr_l = '0') then 
          ack_l <= '0' after 1 ns; 
          -- for cas latency 2 use state_cntr = "0011"
          -- for cas latency 3 use state_cntr = "0100"
        elsif (sdram_cycle(2) = '1' and state_cntr = "0011" and wr_l = '1') then
          ack_l <= '0' after 1 ns;
        elsif (state_cntr = "1010" and wr_l = '0') then
          ack_l <= '1' after 1 ns;
          -- change for burst size other than 8
          -- for cas latency 2 use state_cntr = "1011"
          -- for cas latency 3 use state_cntr = "1100"
        elsif (state_cntr = "1011" and wr_l = '1') then
          ack_l <= '1' after 1 ns;
          -- if the cycle terminates
        elsif (sdram_cycle(2) = '0') then
          ack_l <= '1' after 1 ns;
        end if;
      end if;
  end process acknowledge;
 

  -- terminate ldly 

  terminate_ldly: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        term_ldly <= '0' after 1 ns;  
      elsif rising_edge(clk) then 
        term_ldly <= not term_l after 1 ns;
      end if;
  end process terminate_ldly;


  -- terminate catch

  terminate_catch: process(clk, rst_l)
    begin
      if(rst_l = '0') then
        term_lcatch <= '0' after 1 ns;  
      elsif rising_edge(clk) then
        if (term_l = '0' and term_ldly = '0') then
          term_lcatch <= '1' after 1 ns;
        else
          term_lcatch <= '0' after 1 ns;
	   end if;
	 end if;
  end process terminate_catch;

end architecture RTL;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频免费在线观看| 国产精品理伦片| 色av成人天堂桃色av| 国产成人av自拍| 国产自产v一区二区三区c| 日本欧美大码aⅴ在线播放| 日韩经典中文字幕一区| 天堂av在线一区| 天堂av在线一区| 免费看欧美女人艹b| 奇米在线7777在线精品| 日韩综合在线视频| 久久99国产精品免费| 国产精品一卡二卡在线观看| 激情五月激情综合网| 国产91高潮流白浆在线麻豆| 成人伦理片在线| 色婷婷综合久久久中文字幕| 欧美日韩你懂得| 欧美v国产在线一区二区三区| 26uuu亚洲| 亚洲欧美一区二区在线观看| 一区二区三区四区激情| 奇米在线7777在线精品 | 国产精品456露脸| 成人污污视频在线观看| 在线观看日韩精品| 精品久久久久99| 亚洲精品中文在线影院| 日本不卡一区二区| 成人久久18免费网站麻豆| 欧美系列亚洲系列| 久久久91精品国产一区二区三区| 日韩一区日韩二区| 免费一级片91| 99久久99久久精品免费看蜜桃| 欧美精品xxxxbbbb| 国产精品理伦片| 免费av成人在线| 91久久精品一区二区三区| 欧美一级片在线| 亚洲色大成网站www久久九九| 日本午夜一本久久久综合| 成人黄色国产精品网站大全在线免费观看| 91麻豆精品国产自产在线| 国产精品色在线观看| 日本亚洲免费观看| 欧美视频自拍偷拍| 国产精品入口麻豆九色| 精品一区二区三区在线观看| 色呦呦国产精品| 久久精品这里都是精品| 免费成人你懂的| 欧美色窝79yyyycom| 中文字幕在线视频一区| 精品中文字幕一区二区| 91麻豆精品国产91久久久久久久久 | 99久久精品免费看| 久久久久久久一区| 日韩精品午夜视频| 欧美日韩综合不卡| 亚洲国产乱码最新视频 | 色综合久久99| 久久久久久一级片| 国产乱码精品一区二区三区av| 欧美日韩国产大片| 一区二区三区国产精品| 日本久久一区二区| 亚洲欧美二区三区| 91高清视频在线| 一区二区视频在线| 91黄色免费版| 亚洲成人精品在线观看| 欧美天堂亚洲电影院在线播放| 亚洲九九爱视频| 欧美影视一区在线| 婷婷开心久久网| 在线电影欧美成精品| 日韩国产精品久久| 日韩精品专区在线影院重磅| 美女尤物国产一区| 国产日韩av一区| 成人黄色网址在线观看| 中文字幕欧美一区| 在线亚洲高清视频| 全部av―极品视觉盛宴亚洲| 日韩午夜电影av| 国产福利91精品一区二区三区| 国产精品网友自拍| 色综合久久久久久久久久久| 一区二区三区国产精品| 欧美日韩电影在线| 精品一区二区三区免费播放 | 国产精品亲子伦对白| 成人白浆超碰人人人人| 亚洲精品成人天堂一二三| 成人深夜在线观看| 成人污污视频在线观看| 日韩欧美一区在线| 狠狠色丁香久久婷婷综合丁香| 精品成a人在线观看| 粉嫩av亚洲一区二区图片| 日韩高清不卡一区二区三区| 日韩视频在线一区二区| 国产成人亚洲综合a∨婷婷图片| 中文字幕一区二区视频| 欧美日韩国产bt| 国产成人福利片| 五月天欧美精品| 国产精品人妖ts系列视频| 欧美日韩免费观看一区二区三区| 美女久久久精品| 悠悠色在线精品| 久久天堂av综合合色蜜桃网| 色综合久久综合中文综合网| 久久精品国产**网站演员| 亚洲欧美欧美一区二区三区| 精品免费国产二区三区| 日本道精品一区二区三区| 国产一区二区三区视频在线播放| 色女孩综合影院| 国产日韩欧美不卡| 在线观看成人小视频| 国产精品久久久久久久久快鸭| 欧美视频在线一区二区三区| 国产一区91精品张津瑜| 亚洲成人自拍偷拍| 国产精品久久久久影院| 日韩三级视频在线看| 欧美日韩一区在线| bt欧美亚洲午夜电影天堂| 蜜臀国产一区二区三区在线播放 | 免费视频最近日韩| 中文字幕日本不卡| 欧美国产欧美综合| 91精品国产综合久久婷婷香蕉| 一本色道**综合亚洲精品蜜桃冫| 国产二区国产一区在线观看 | 欧美精品一区男女天堂| 欧美精品丝袜中出| 欧美午夜不卡视频| 91在线一区二区| 成人久久18免费网站麻豆| 国产激情精品久久久第一区二区 | 99视频在线观看一区三区| 国产黄人亚洲片| 国产精品亚洲第一区在线暖暖韩国| 日本不卡123| 青青草伊人久久| 日韩高清国产一区在线| 全国精品久久少妇| 激情五月婷婷综合| 国产成人亚洲综合a∨猫咪| 国产高清久久久久| 成人99免费视频| 91丝袜美腿高跟国产极品老师| 97精品超碰一区二区三区| 成人美女视频在线看| 91免费看`日韩一区二区| 色吧成人激情小说| 欧美精品99久久久**| 日韩视频免费观看高清完整版在线观看| 欧美综合视频在线观看| 欧美综合色免费| 欧美人妇做爰xxxⅹ性高电影| 欧美日韩在线观看一区二区| 欧美日韩在线电影| 精品日韩欧美在线| 国产精品丝袜91| 亚洲综合免费观看高清完整版在线 | 99久久婷婷国产综合精品| 一本色道久久综合亚洲91 | 日韩午夜在线观看视频| 欧美刺激午夜性久久久久久久| 欧美xfplay| 亚洲色图制服丝袜| 日韩高清不卡在线| 丁香一区二区三区| 欧美色网站导航| 国产亚洲污的网站| 亚洲午夜激情av| 国产一区二区网址| 色狠狠一区二区| 精品久久久久久久人人人人传媒| 中文字幕精品在线不卡| 五月天激情小说综合| 风间由美一区二区av101| 欧美日韩激情在线| 国产亚洲午夜高清国产拍精品| 亚洲午夜一二三区视频| 国产乱对白刺激视频不卡| 色拍拍在线精品视频8848| 精品国产凹凸成av人网站| 一区二区三区电影在线播| 精品一区二区三区日韩| 欧美色精品天天在线观看视频| 国产日韩欧美a| 青青草国产精品亚洲专区无| 99精品欧美一区二区三区小说 | 成人激情小说网站|