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

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

?? sdramcntl.vhd

?? xst3_video.ZIP是基于XILINX的XST3開發板的視頻采集源碼
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
-- Company : XESS Corp.
-- Engineer : Dave Vanden Bout
-- Creation Date : 06/01/2005
-- Copyright : 2005, XESS Corp
-- Tool Versions : WebPACK 6.3.03i
--
-- Description:
-- Dual-port front-end for SDRAM controller. Supports two
-- independent I/O ports to the SDRAM.
--
-- Revision:
-- 1.1.0
--
-- Additional Comments:
-- 1.1.0:
-- Fixed a problem where dualport locked up ifa port had control
-- but had no pending operation to signal done so a switch could be
-- made to the other port.
-- 1.0.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 dualport is
  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 dualport;



architecture arch of dualport is
  -- The door signal controls whether the read/write signal from the active port
  -- is allowed through to the read/write inputs of the SDRAM controller.
  type doorState is (OPENED, CLOSED);
  signal door_r, door_x : doorState;

  -- The port signal indicates which port is connected to the SDRAM controller.
  type portState is (PORT0, PORT1);
  signal port_r, port_x : portState;

  signal switch                           : std_logic;  -- indicates that the active port should be switched
  signal inProgress                       : std_logic;  -- the active port has a read/write op in-progress
  signal rd_i                             : std_logic;  -- read signal to the SDRAM controller (internal copy)
  signal wr_i                             : std_logic;  -- write signal to the SDRAM controller (internal copy)
  signal earlyOpBegun0_i, earlyOpBegun1_i : std_logic;  -- (internal copies)
  signal slot_r, slot_x                   : std_logic_vector(PORT_TIME_SLOTS'range);  -- time-slot allocation shift-register
begin

  ----------------------------------------------------------------------------
  -- multiplex the SDRAM controller port signals to/from the dual host-side ports  
  ----------------------------------------------------------------------------

  -- send the SDRAM controller the address and data from the currently active port
  hAddr <= hAddr0 when port_r = PORT0 else hAddr1;
  hDIn  <= hDIn0  when port_r = PORT0 else hDIn1;

  -- both ports get the data from the SDRAM but only the active port will use it
  hDOut0 <= hDOut;
  hDOut1 <= hDOut;

  -- send the SDRAM controller status to the active port and give the inactive port an inactive status code
  status0 <= status when port_r = PORT0 else "1111";
  status1 <= status when port_r = PORT1 else "1111";

  -- either port can reset the SDRAM controller
  rst <= rst0 or rst1;

  -- apply the read signal from the active port to the SDRAM controller only if the door is open.
  rd_i <= rd0 when (port_r = PORT0) and (door_r = OPENED) else
          rd1 when (port_r = PORT1) and (door_r = OPENED) else
          NO;
  rd   <= rd_i;

  -- apply the write signal from the active port to the SDRAM controller only if the door is open.
  wr_i <= wr0 when (port_r = PORT0) and (door_r = OPENED) else
          wr1 when (port_r = PORT1) and (door_r = OPENED) else
          NO;
  wr   <= wr_i;

  -- send the status signals for various SDRAM controller operations back to the active port
  earlyOpBegun0_i <= earlyOpBegun when port_r = PORT0 else NO;
  earlyOpBegun0   <= earlyOpBegun0_i;
  earlyOpBegun1_i <= earlyOpBegun when port_r = PORT1 else NO;
  earlyOpBegun1   <= earlyOpBegun1_i;
  rdPending0      <= rdPending    when port_r = PORT0 else NO;
  rdPending1      <= rdPending    when port_r = PORT1 else NO;
  done0           <= done         when port_r = PORT0 else NO;
  done1           <= done         when port_r = PORT1 else NO;
  rdDone0         <= rdDone       when port_r = PORT0 else NO;
  rdDone1         <= rdDone       when port_r = PORT1 else NO;

  ----------------------------------------------------------------------------
  -- Indicate when the active port needs to be switched.  A switch occurs if
  -- a read or write operation is requested on the port that is not currently active and:
  -- 1) no R/W operation is being performed on the active port or 
  -- 2) a R/W operation is in progress on the active port, but the time-slot allocation 
  --    register is giving precedence to the inactive port.  (The R/W operation on the
  --    active port will be completed before the switch is made.)
  -- This rule keeps the active port from hogging all the bandwidth.
  ----------------------------------------------------------------------------
  switch <= (rd0 or wr0) when (port_r = PORT1) and (((rd1 = NO) and (wr1 = NO)) or (slot_r(0) = '0')) else
            (rd1 or wr1) when (port_r = PORT0) and (((rd0 = NO) and (wr0 = NO)) or (slot_r(0) = '1')) else
            NO;

  ----------------------------------------------------------------------------
  -- Indicate when an operation on the active port is in-progress and
  -- can't be interrupted by a switch to the other port.  (Only read operations
  -- are looked at since write operations always complete in one cycle once they
  -- are initiated.)
  ----------------------------------------------------------------------------
  inProgress <= rdPending or (rd_i and earlyOpBegun);

  ----------------------------------------------------------------------------
  -- Update the time-slot allocation shift-register.  The port with priority is indicated by the
  -- least-significant bit of the register.  The register is rotated right if:
  -- 1) the current R/W operation has started, and
  -- 2) both ports are requesting R/W operations (indicating contention), and
  -- 3) the currently active port matches the port that currently has priority.
  -- Under these conditions, the current time slot port allocation has been used so
  -- the shift register is rotated right to bring the next port time-slot allocation
  -- bit into play.
  ----------------------------------------------------------------------------
  slot_x <= slot_r(0) & slot_r(slot_r'high downto 1) when (earlyOpBegun = YES) and
            ( ((rd0 = YES) or (wr0 = YES)) and ((rd1 = YES) or (wr1 = YES)) ) and
            ( ((port_r = PORT0) and (slot_r(0) = '0')) or ((port_r = PORT1) and (slot_r(0) = '1')) )
            else slot_r;

  ----------------------------------------------------------------------------
  -- Determine which port will be active on the next cycle.  The active port is switched if:
  -- 1) there are no pending operations in progress, and
  -- 2) the port switch indicator is active.
  ----------------------------------------------------------------------------
  port_process : process(port_r, inProgress, switch, done)
  begin
    port_x       <= port_r;             -- by default, the active port is not changed
    case port_r is
      when PORT0  =>
        if (inProgress = NO) and (switch = YES) then
          port_x <= PORT1;
        end if;
      when PORT1  =>
        if (inProgress = NO) and (switch = YES) then
          port_x <= PORT0;
        end if;
      when others =>
        port_x   <= port_r;
    end case;
  end process port_process;

  -----------------------------------------------------------
  -- Determine if the door is open for the active port to initiate new R/W operations to
  -- the SDRAM controller.  If the door is open and R/W operations are in progress but
  -- a switch to the other port is indicated, then the door is closed to prevent any
  -- further R/W operations from the active port.  The door is re-opened once all
  -- in-progress operations are completed, at which time the switch to the other port
  -- is also completed so it can issue its own R/W commands.
  -----------------------------------------------------------
  door_process : process(door_r, inProgress, switch)
  begin
    door_x       <= door_r;             -- by default, the door remains as it is
    case door_r is
      when OPENED =>
        if (inProgress = YES) and (switch = YES) then
          door_x <= CLOSED;
        end if;
      when CLOSED =>
        if inProgress = NO then
          door_x <= OPENED;
        end if;
      when others =>
        door_x   <= door_r;
    end case;
  end process door_process;

  -----------------------------------------------------------
  -- update registers on the appropriate clock edge     
  -----------------------------------------------------------
  update : process(rst0, rst1, clk)
  begin
    if (rst0 = YES) or (rst1 = YES) then
      -- asynchronous reset
      door_r   <= CLOSED;
      port_r   <= PORT0;
      slot_r   <= PORT_TIME_SLOTS;
      opBegun0 <= NO;
      opBegun1 <= NO;
    elsif rising_edge(clk) then
      door_r   <= door_x;
      port_r   <= port_x;
      slot_r   <= slot_x;
      -- opBegun signals are cycle-delayed versions of earlyOpBegun signals.
      -- We can't use the actual opBegun signal from the SDRAM controller
      -- because it would be turned off if the active port was switched on the
      -- cycle immediately after earlyOpBegun went active.
      opBegun0 <= earlyOpBegun0_i;
      opBegun1 <= earlyOpBegun1_i;
    end if;
  end process update;

end arch;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清av一区二区| 蓝色福利精品导航| 国产一区二区三区免费| 5566中文字幕一区二区电影| 亚洲国产精品久久久久婷婷884| 国产91精品一区二区麻豆网站 | 亚洲精品高清在线| 9久草视频在线视频精品| 亚洲在线成人精品| 亚洲一区二区av在线| 91看片淫黄大片一级在线观看| 精品国产免费一区二区三区香蕉| 久久66热偷产精品| 久久品道一品道久久精品| 黑人精品欧美一区二区蜜桃| 精品国产伦一区二区三区观看方式 | 亚洲欧洲美洲综合色网| 国产精品18久久久久久久久久久久| 久久一留热品黄| 日韩综合一区二区| 欧美一区二区国产| 午夜伊人狠狠久久| 日韩精品在线网站| 国产高清成人在线| 亚洲欧美综合色| 91小视频在线| 1024国产精品| 欧美日韩一区二区三区四区五区 | 国产精品视频第一区| 91福利在线播放| 免费一级片91| 国产日韩欧美在线一区| 91欧美一区二区| 日韩国产欧美一区二区三区| 久久嫩草精品久久久精品一| 久久精品国产免费| 国产午夜精品一区二区| 91麻豆免费在线观看| 秋霞午夜鲁丝一区二区老狼| 久久久不卡网国产精品二区| 99视频有精品| 日韩 欧美一区二区三区| 国产欧美日韩另类视频免费观看| 欧美精品乱码久久久久久| 大美女一区二区三区| 视频在线观看一区| 洋洋成人永久网站入口| 国产精品久久久久天堂| 精品国产乱码久久久久久牛牛| 欧美亚洲尤物久久| 色偷偷久久人人79超碰人人澡| 国产美女精品在线| 美女一区二区视频| 日韩高清电影一区| 一级女性全黄久久生活片免费| 国产日韩欧美精品电影三级在线 | 久久久国际精品| 欧美一区二区国产| 911国产精品| 欧美日韩视频第一区| 色呦呦网站一区| 91丨porny丨在线| 粉嫩aⅴ一区二区三区四区| 激情综合网最新| 裸体歌舞表演一区二区| 日韩中文字幕不卡| 亚洲h动漫在线| 亚洲一区二区三区在线看| 亚洲欧美一区二区不卡| 1区2区3区国产精品| 国产精品毛片大码女人| 国产精品欧美一区喷水| 久久九九国产精品| 日本一区免费视频| 国产精品无遮挡| 国产精品理论片在线观看| 国产精品网站在线观看| 国产精品成人免费| 亚洲日本一区二区三区| 一区二区三区四区不卡在线| 亚洲精品成人少妇| 亚洲综合清纯丝袜自拍| 午夜精品福利一区二区三区av| 午夜视频一区二区三区| 日韩国产欧美在线观看| 久久国产麻豆精品| 国产99久久久精品| 91丝袜美腿高跟国产极品老师 | 精品一区二区久久久| 国产精品 欧美精品| 成人一道本在线| 91亚洲国产成人精品一区二区三| 色综合视频在线观看| 欧美日韩色一区| 欧美一二三区在线| 久久久久高清精品| 中文字幕综合网| 亚洲成精国产精品女| 日本午夜一本久久久综合| 国产精品一区二区三区乱码| 成人性生交大合| 日本韩国精品在线| 91精品国产综合久久小美女| 久久久噜噜噜久久人人看| 亚洲色图20p| 日本中文字幕一区二区视频| 国产精品一区二区视频| 91一区在线观看| 日韩一区二区三区电影| 国产精品日产欧美久久久久| 亚洲成av人片| 国产xxx精品视频大全| 在线观看亚洲a| 久久九九久久九九| 亚洲高清三级视频| 国产 欧美在线| 欧美亚洲综合网| 欧美极品美女视频| 日韩电影免费在线观看网站| 成人网页在线观看| 欧美一级欧美一级在线播放| 中文字幕一区在线观看视频| 婷婷综合在线观看| a美女胸又www黄视频久久| 欧美一级艳片视频免费观看| 亚洲色图在线播放| 国产在线精品视频| 欧美精品久久久久久久多人混战| 国产色产综合产在线视频| 亚洲18女电影在线观看| www.亚洲人| 精品国产91乱码一区二区三区| 亚洲另类在线一区| 国产精品综合视频| 日韩色在线观看| 亚洲一二三四久久| jlzzjlzz亚洲日本少妇| 精品国产第一区二区三区观看体验| 亚洲黄色免费网站| 成人国产免费视频| 国产日韩欧美电影| 狠狠色丁香婷婷综合久久片| 欧美视频中文一区二区三区在线观看| 国产偷国产偷亚洲高清人白洁| 日日摸夜夜添夜夜添精品视频| 91久久人澡人人添人人爽欧美 | 成人免费视频在线观看| 国产精品香蕉一区二区三区| 欧美一区二区精美| 五月婷婷另类国产| 欧美日韩一区三区| 一区二区三区精品久久久| 岛国一区二区三区| 国产清纯在线一区二区www| 麻豆91在线播放免费| 在线播放91灌醉迷j高跟美女 | 日韩国产在线观看一区| 欧美性感一区二区三区| 亚洲人成网站影音先锋播放| 成人高清免费观看| 国产日韩欧美激情| 国产v综合v亚洲欧| 国产精品私人影院| 成人性生交大片| 亚洲欧洲av在线| 色婷婷av一区二区三区大白胸| 中文字幕日韩av资源站| 91在线porny国产在线看| 国产精品高潮久久久久无| 国产99精品国产| 国产精品久久久久影视| 91最新地址在线播放| 1区2区3区欧美| 欧美专区亚洲专区| 丝袜美腿成人在线| 日韩欧美国产综合| 国产酒店精品激情| 国产精品毛片无遮挡高清| a在线欧美一区| 亚洲午夜在线电影| 在线观看日韩av先锋影音电影院| 亚洲第一狼人社区| 日韩三级电影网址| 成人影视亚洲图片在线| 亚洲天堂免费看| 欧美高清视频www夜色资源网| 青青草一区二区三区| 国产午夜精品一区二区三区嫩草| av一二三不卡影片| 亚洲国产cao| 欧美成人福利视频| gogo大胆日本视频一区| 亚洲最大成人综合| 欧美一区二区三区婷婷月色| 国产一区二区导航在线播放| 亚洲欧洲在线观看av| 91麻豆精品91久久久久久清纯 | 久久精品国产亚洲aⅴ| 国产喷白浆一区二区三区| 97se亚洲国产综合自在线不卡|