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

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

?? sdramcntl.vhd

?? xst3_video.ZIP是基于XILINX的XST3開發板的視頻采集源碼
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
library IEEE, UNISIM;
use IEEE.std_logic_1164.all;

package sdram is

  -- SDRAM controller
  component sdramCntl
    generic(
      FREQ                 :     natural := 50_000;  -- operating frequency in KHz
      IN_PHASE             :     boolean := true;  -- SDRAM and controller work on same or opposite clock edge
      PIPE_EN              :     boolean := false;  -- if true, enable pipelined read operations
      MAX_NOP              :     natural := 10000;  -- number of NOPs before entering self-refresh
      ENABLE_REFRESH       :     boolean := true;   -- if true, row refreshes are automatically inserted
      MULTIPLE_ACTIVE_ROWS :     boolean := false;  -- if true, allow an active row in each bank
      DATA_WIDTH           :     natural := 16;  -- host & SDRAM data width
      NROWS                :     natural := 4096;  -- number of rows in SDRAM array
      NCOLS                :     natural := 512;  -- number of columns in SDRAM array
      HADDR_WIDTH          :     natural := 23;  -- host-side address width
      SADDR_WIDTH          :     natural := 12  -- SDRAM-side address width
      );
    port(
      -- host side
      clk                  : in  std_logic;  -- master clock
      lock                 : in  std_logic;  -- true if clock is stable
      rst                  : in  std_logic;  -- reset
      rd                   : in  std_logic;  -- initiate read operation
      wr                   : in  std_logic;  -- initiate write operation
      earlyOpBegun         : out std_logic;  -- read/write/self-refresh op has begun (async)
      opBegun              : out std_logic;  -- read/write/self-refresh op has begun (clocked)
      rdPending            : out std_logic;  -- true if read operation(s) are still in the pipeline
      done                 : out std_logic;  -- read or write operation is done
      rdDone               : out std_logic;  -- read operation is done and data is available
      hAddr                : in  std_logic_vector(HADDR_WIDTH-1 downto 0);  -- address from host to SDRAM
      hDIn                 : in  std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from host to SDRAM
      hDOut                : out std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from SDRAM to host
      status               : out std_logic_vector(3 downto 0);  -- diagnostic status of the FSM         
      -- SDRAM side
      cke                  : out std_logic;  -- clock-enable to SDRAM
      ce_n                 : out std_logic;  -- chip-select to SDRAM
      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
      ba                   : out std_logic_vector(1 downto 0);  -- SDRAM bank address
      sAddr                : out std_logic_vector(SADDR_WIDTH-1 downto 0);  -- SDRAM row/column address
      sDIn                 : in  std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from SDRAM
      sDOut                : out std_logic_vector(DATA_WIDTH-1 downto 0);  -- data to SDRAM
      sDOutEn              : out std_logic;  -- true if data is output to SDRAM on sDOut
      dqmh                 : out std_logic;  -- enable upper-byte of SDRAM databus if true
      dqml                 : out std_logic  -- enable lower-byte of SDRAM databus if true
      );
  end component;

  -- dual-port interface to the SDRAM controller
  component dualport
    generic(
      PIPE_EN         :    boolean                       := false;  -- enable pipelined read operations
      PORT_TIME_SLOTS :    std_logic_vector(15 downto 0) := "1111000011110000";
      DATA_WIDTH      :    natural                       := 16;  -- host & SDRAM data width
      HADDR_WIDTH     :    natural                       := 23  -- host-side address width
      );
    port(
      clk             : in std_logic;   -- master clock

      -- host-side port 0
      rst0          : in  std_logic;    -- reset
      rd0           : in  std_logic;    -- initiate read operation
      wr0           : in  std_logic;    -- initiate write operation
      earlyOpBegun0 : out std_logic;    -- read/write op has begun (async)
      opBegun0      : out std_logic;    -- read/write op has begun (clocked)
      rdPending0    : out std_logic;    -- true if read operation(s) are still in the pipeline
      done0         : out std_logic;    -- read or write operation is done
      rdDone0       : out std_logic;    -- read operation is done and data is available
      hAddr0        : in  std_logic_vector(HADDR_WIDTH-1 downto 0);  -- address from host to SDRAM
      hDIn0         : in  std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from host to SDRAM
      hDOut0        : out std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from SDRAM to host
      status0       : out std_logic_vector(3 downto 0);  -- diagnostic status of the SDRAM controller FSM         

      -- host-side port 1
      rst1          : in  std_logic;
      rd1           : in  std_logic;
      wr1           : in  std_logic;
      earlyOpBegun1 : out std_logic;
      opBegun1      : out std_logic;
      rdPending1    : out std_logic;
      done1         : out std_logic;
      rdDone1       : out std_logic;
      hAddr1        : in  std_logic_vector(HADDR_WIDTH-1 downto 0);
      hDIn1         : in  std_logic_vector(DATA_WIDTH-1 downto 0);
      hDOut1        : out std_logic_vector(DATA_WIDTH-1 downto 0);
      status1       : out std_logic_vector(3 downto 0);

      -- SDRAM controller port
      rst          : out std_logic;
      rd           : out std_logic;
      wr           : out std_logic;
      earlyOpBegun : in  std_logic;
      opBegun      : in  std_logic;
      rdPending    : in  std_logic;
      done         : in  std_logic;
      rdDone       : in  std_logic;
      hAddr        : out std_logic_vector(HADDR_WIDTH-1 downto 0);
      hDIn         : out std_logic_vector(DATA_WIDTH-1 downto 0);
      hDOut        : in  std_logic_vector(DATA_WIDTH-1 downto 0);
      status       : in  std_logic_vector(3 downto 0)
      );
  end component;

end package sdram;




--------------------------------------------------------------------
-- Company : XESS Corp.
-- Engineer : Dave Vanden Bout
-- Creation Date : 05/17/2005
-- Copyright : 2005, XESS Corp
-- Tool Versions : WebPACK 6.3.03i
--
-- Description:
-- SDRAM controller
--
-- Revision:
-- 1.6.0
--
-- Additional Comments:
-- 1.6.0:
-- Fixed warning caused by MODE length not matching sAddr length.
-- 1.5.0:
-- Added generic parameter to enable/disable row refresh operations.
-- 1.4.0:
-- Added generic parameter to enable/disable independent active rows in each bank.
-- 1.3.0:
-- Modified to allow independently active rows in each bank.
-- 1.2.0:
-- Modified to allow pipelining of read/write operations.
-- 1.1.0:
-- Initial release.
--
-- License:
-- This code can be freely distributed and modified as long as
-- this header is not removed.
--------------------------------------------------------------------

library IEEE, UNISIM;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use IEEE.numeric_std.all;
use WORK.common.all;

entity sdramCntl is
  generic(
    FREQ                 :     natural := 50_000;  -- operating frequency in KHz
    IN_PHASE             :     boolean := true;  -- SDRAM and controller work on same or opposite clock edge
    PIPE_EN              :     boolean := false;  -- if true, enable pipelined read operations
    MAX_NOP              :     natural := 10000;  -- number of NOPs before entering self-refresh
    ENABLE_REFRESH       :     boolean := true;   -- if true, row refreshes are automatically inserted
    MULTIPLE_ACTIVE_ROWS :     boolean := false;  -- if true, allow an active row in each bank
    DATA_WIDTH           :     natural := 16;  -- host & SDRAM data width
    NROWS                :     natural := 4096;  -- number of rows in SDRAM array
    NCOLS                :     natural := 512;  -- number of columns in SDRAM array
    HADDR_WIDTH          :     natural := 23;  -- host-side address width
    SADDR_WIDTH          :     natural := 12  -- SDRAM-side address width
    );
  port(
    -- host side
    clk                  : in  std_logic;  -- master clock
    lock                 : in  std_logic;  -- true if clock is stable
    rst                  : in  std_logic;  -- reset
    rd                   : in  std_logic;  -- initiate read operation
    wr                   : in  std_logic;  -- initiate write operation
    earlyOpBegun         : out std_logic;  -- read/write/self-refresh op has begun (async)
    opBegun              : out std_logic;  -- read/write/self-refresh op has begun (clocked)
    rdPending            : out std_logic;  -- true if read operation(s) are still in the pipeline
    done                 : out std_logic;  -- read or write operation is done
    rdDone               : out std_logic;  -- read operation is done and data is available
    hAddr                : in  std_logic_vector(HADDR_WIDTH-1 downto 0);  -- address from host to SDRAM
    hDIn                 : in  std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from host       to SDRAM
    hDOut                : out std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from SDRAM to host
    status               : out std_logic_vector(3 downto 0);  -- diagnostic status of the FSM         

    -- SDRAM side
    cke     : out std_logic;            -- clock-enable to SDRAM
    ce_n    : out std_logic;            -- chip-select to SDRAM
    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
    ba      : out std_logic_vector(1 downto 0);  -- SDRAM bank address
    sAddr   : out std_logic_vector(SADDR_WIDTH-1 downto 0);  -- SDRAM row/column address
    sDIn    : in  std_logic_vector(DATA_WIDTH-1 downto 0);  -- data from SDRAM
    sDOut   : out std_logic_vector(DATA_WIDTH-1 downto 0);  -- data to SDRAM
    sDOutEn : out std_logic;            -- true if data is output to SDRAM on sDOut
    dqmh    : out std_logic;            -- enable upper-byte of SDRAM databus if true
    dqml    : out std_logic             -- enable lower-byte of SDRAM databus if true
    );
end sdramCntl;



architecture arch of sdramCntl is

  constant OUTPUT : std_logic := '1';   -- direction of dataflow w.r.t. this controller
  constant INPUT  : std_logic := '0';
  constant NOP    : std_logic := '0';   -- no operation
  constant READ   : std_logic := '1';   -- read operation
  constant WRITE  : std_logic := '1';   -- write operation

  -- SDRAM timing parameters
  constant Tinit : natural := 200;      -- min initialization interval (us)
  constant Tras  : natural := 45;       -- min interval between active to precharge commands (ns)
  constant Trcd  : natural := 20;       -- min interval between active and R/W commands (ns)
  constant Tref  : natural := 64_000_000;  -- maximum refresh interval (ns)
  constant Trfc  : natural := 66;       -- duration of refresh operation (ns)
  constant Trp   : natural := 20;       -- min precharge command duration (ns)
  constant Twr   : natural := 15;       -- write recovery time (ns)
  constant Txsr  : natural := 75;       -- exit self-refresh time (ns)

  -- SDRAM timing parameters converted into clock cycles (based on FREQ)
  constant NORM        : natural := 1_000_000;  -- normalize ns * KHz
  constant INIT_CYCLES : natural := 1+((Tinit*FREQ)/1000);  -- SDRAM power-on initialization interval
  constant RAS_CYCLES  : natural := 1+((Tras*FREQ)/NORM);  -- active-to-precharge interval
  constant RCD_CYCLES  : natural := 1+((Trcd*FREQ)/NORM);  -- active-to-R/W interval
  constant REF_CYCLES  : natural := 1+(((Tref/NROWS)*FREQ)/NORM);  -- interval between row refreshes
  constant RFC_CYCLES  : natural := 1+((Trfc*FREQ)/NORM);  -- refresh operation interval
  constant RP_CYCLES   : natural := 1+((Trp*FREQ)/NORM);  -- precharge operation interval
  constant WR_CYCLES   : natural := 1+((Twr*FREQ)/NORM);  -- write recovery time
  constant XSR_CYCLES  : natural := 1+((Txsr*FREQ)/NORM);  -- exit self-refresh time
  constant MODE_CYCLES : natural := 2;  -- mode register setup time
  constant CAS_CYCLES  : natural := 3;  -- CAS latency
  constant RFSH_OPS    : natural := 8;  -- number of refresh operations needed to init SDRAM

  -- timer registers that count down times for various SDRAM operations
  signal timer_r, timer_x       : natural range 0 to INIT_CYCLES;  -- current SDRAM op time
  signal rasTimer_r, rasTimer_x : natural range 0 to RAS_CYCLES;  -- active-to-precharge time
  signal wrTimer_r, wrTimer_x   : natural range 0 to WR_CYCLES;  -- write-to-precharge time
  signal refTimer_r, refTimer_x : natural range 0 to REF_CYCLES;  -- time between row refreshes
  signal rfshCntr_r, rfshCntr_x : natural range 0 to NROWS;  -- counts refreshes that are neede
  signal nopCntr_r, nopCntr_x   : natural range 0 to MAX_NOP;  -- counts consecutive NOP operations

  signal doSelfRfsh : std_logic;        -- active when the NOP counter hits zero and self-refresh can start

  -- states of the SDRAM controller state machine
  type cntlState is (
    INITWAIT,                           -- initialization - waiting for power-on initialization to complete
    INITPCHG,                           -- initialization - initial precharge of SDRAM banks
    INITSETMODE,                        -- initialization - set SDRAM mode
    INITRFSH,                           -- initialization - do initial refreshes
    RW,                                 -- read/write/refresh the SDRAM
    ACTIVATE,                           -- open a row of the SDRAM for reading/writing
    REFRESHROW,                         -- refresh a row of the SDRAM
    SELFREFRESH                         -- keep SDRAM in self-refresh mode with CKE low
    );
  signal state_r, state_x : cntlState;  -- state register and next state

  -- commands that are sent to the SDRAM to make it perform certain operations
  -- commands use these SDRAM input pins (ce_n,ras_n,cas_n,we_n,dqmh,dqml)
  subtype sdramCmd is unsigned(5 downto 0);
  constant NOP_CMD    : sdramCmd := "011100";
  constant ACTIVE_CMD : sdramCmd := "001100";
  constant READ_CMD   : sdramCmd := "010100";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久岛一牛影视 | 精品成人一区二区| 国产欧美一区二区精品性色超碰| 亚洲精品成a人| 国产99久久久久久免费看农村| 欧美天堂一区二区三区| 国产色一区二区| 蜜桃av一区二区| 欧美日韩的一区二区| 国产成人精品aa毛片| 国产精品天干天干在线综合| 首页综合国产亚洲丝袜| 99re成人精品视频| 天堂在线一区二区| bt欧美亚洲午夜电影天堂| 亚洲曰韩产成在线| 国产成人精品免费在线| 精品国产凹凸成av人网站| 午夜视频久久久久久| 91麻豆福利精品推荐| 亚洲国产经典视频| 国产91丝袜在线播放九色| 亚洲精品一区二区三区精华液 | 欧美一区在线视频| 亚洲综合一二三区| 在线视频中文字幕一区二区| 中文字幕一区二区不卡| 99国产精品99久久久久久| 国产精品国产三级国产aⅴ中文| 国产mv日韩mv欧美| 国产精品三级av在线播放| 不卡在线视频中文字幕| 一区视频在线播放| eeuss鲁一区二区三区| 亚洲欧美电影院| 在线免费观看日韩欧美| 午夜视频在线观看一区二区 | 91视频国产资源| 亚洲柠檬福利资源导航| 日本道色综合久久| 亚洲成人免费在线| 欧美一区二区三区日韩视频| 久久99热99| 欧美激情在线一区二区| 91亚洲精品久久久蜜桃| 午夜精品久久久久久久久久久| 91精品国产丝袜白色高跟鞋| 蜜桃一区二区三区四区| 久久综合久久99| 99久久精品国产观看| 亚洲一区日韩精品中文字幕| 欧美高清性hdvideosex| 经典三级一区二区| 国产精品久久久久一区| 欧美日韩久久久| 九九视频精品免费| 中文字幕一区三区| 欧美卡1卡2卡| 高清不卡一二三区| 伊人婷婷欧美激情| 亚洲精品在线观看网站| jizzjizzjizz欧美| 日本不卡123| 亚洲欧美偷拍三级| 日韩欧美色电影| 99久久国产综合精品麻豆| 日韩中文字幕区一区有砖一区| 久久在线观看免费| 91福利视频久久久久| 精品一区精品二区高清| 亚洲免费在线播放| 久久亚洲一区二区三区明星换脸| 色婷婷一区二区三区四区| 久久电影网站中文字幕 | 欧美三级电影网站| 国产精品一区在线观看乱码| 亚洲成人精品影院| 国产精品乱人伦| 精品久久99ma| 欧美日韩亚洲不卡| 在线一区二区三区| 国产一区二区三区久久久| 亚洲资源在线观看| ...xxx性欧美| 久久精品一区蜜桃臀影院| 欧美另类高清zo欧美| 91免费视频网| 成人免费视频一区二区| 青草国产精品久久久久久| 艳妇臀荡乳欲伦亚洲一区| 久久久91精品国产一区二区三区| 欧美日精品一区视频| 91免费观看视频| 高清免费成人av| 国产精品一区专区| 韩国三级在线一区| 精品一区二区三区久久久| 日欧美一区二区| 午夜视频一区二区| 亚洲成精国产精品女| 亚洲精品成人少妇| 亚洲摸摸操操av| 亚洲人成在线播放网站岛国| 中文字幕亚洲区| 国产精品初高中害羞小美女文| 国产亚洲综合在线| 国产精品全国免费观看高清| 国产日韩欧美精品综合| 久久天堂av综合合色蜜桃网| 精品国产亚洲一区二区三区在线观看| 欧美一区二区性放荡片| 91精品国产91久久久久久一区二区 | 成人黄色软件下载| 成人免费观看av| 成人污视频在线观看| 成人午夜免费电影| 96av麻豆蜜桃一区二区| 91色乱码一区二区三区| 欧洲视频一区二区| 欧美精品免费视频| www.综合网.com| 色哟哟国产精品免费观看| 日本大香伊一区二区三区| 欧美性受极品xxxx喷水| 国产日韩高清在线| 国产精品嫩草影院com| 中文字幕人成不卡一区| 亚洲午夜久久久久中文字幕久| 亚洲高清免费视频| 精品在线观看视频| 成人黄色av网站在线| 在线这里只有精品| 在线成人免费视频| 国产视频亚洲色图| 亚洲永久免费视频| 蜜臀av性久久久久蜜臀aⅴ| 国产精品一二三在| 色综合久久中文综合久久97| 欧美日韩一卡二卡三卡| 精品福利av导航| 日韩一区在线看| 日韩高清不卡在线| 丁香婷婷综合五月| 欧洲一区二区av| 久久毛片高清国产| 一区二区在线电影| 九色综合国产一区二区三区| 99久久精品情趣| 欧美大片在线观看一区二区| 亚洲国产高清aⅴ视频| 午夜精品久久久久久久| 国产成人在线影院| 欧美男男青年gay1069videost| 国产亚洲精品福利| 午夜电影网一区| 成人天堂资源www在线| 91精品国产色综合久久不卡蜜臀| 欧美高清一级片在线观看| 亚洲成人免费视| 成人国产精品免费网站| 日韩一区二区免费在线观看| 国产精品视频九色porn| 免费人成精品欧美精品| 色88888久久久久久影院野外| 精品久久五月天| 香蕉久久夜色精品国产使用方法| 国产伦精品一区二区三区在线观看| 色综合视频一区二区三区高清| 精品福利一区二区三区免费视频| 亚洲午夜精品一区二区三区他趣| 成人综合激情网| 精品国产乱码久久| 午夜精品视频一区| 91影院在线免费观看| 久久久五月婷婷| 久久91精品国产91久久小草| 欧美午夜视频网站| 亚洲精品视频在线看| 不卡免费追剧大全电视剧网站| 欧美成人一区二区三区在线观看| 亚洲h在线观看| 一本大道久久a久久精二百| 国产精品视频在线看| 国产91清纯白嫩初高中在线观看 | 91精品在线一区二区| 亚洲人成小说网站色在线 | 亚洲视频网在线直播| 成人精品一区二区三区四区| 久久人人爽人人爽| 国产一区在线观看视频| 精品国产伦一区二区三区免费| 秋霞电影网一区二区| 欧美精品丝袜中出| 婷婷久久综合九色国产成人| 欧美日韩一级视频| 日韩和的一区二区| 欧美一区二区视频免费观看| 日韩激情一二三区| 欧美成人a视频| 国产精品自在欧美一区|