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

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

?? atacntl.vhd

?? Access IDE harddisk by Xilinx FPGA Support PIO2
?? VHD
?? 第 1 頁 / 共 3 頁
字號:
library IEEE, UNISIM;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.numeric_std.all;
use WORK.common.all;


package ata is

  component pioIntfc
    generic(
      FREQ     :     natural := 50_000  -- operating frequency in KHz
      );
    port(
      -- host side
      clk      : in  std_logic;         -- master clock
      pioRst   : in  std_logic;         -- async. reset
      pioRd    : in  std_logic;         -- initiate read operation
      pioWr    : in  std_logic;         -- initiate write operation
      pioAddr  : in  std_logic_vector(4 downto 0);  -- disk register address from host
      pioDIn   : in  std_logic_vector(15 downto 0);  -- data from host to disk
      pioDOut  : out std_logic_vector(15 downto 0);  -- data from disk to host
      pioBusy  : out std_logic;         -- read or write operation is in progress
      pioIntrq : out std_logic;         -- debounced interrupt from disk
      status   : out std_logic_vector(3 downto 0);  -- diagnostic status for the R/W

      -- disk side
      dior_n    : out std_logic;        -- disk register read-enable
      diow_n    : out std_logic;        -- disk register write-enable
      cs0_n     : out std_logic;        -- disk command block register select
      cs1_n     : out std_logic;        -- disk control block register select
      da        : out std_logic_vector(2 downto 0);  -- disk register address
      ddIn      : in  std_logic_vector(15 downto 0);  -- data from disk
      ddOut     : out std_logic_vector(15 downto 0);  -- data to disk
      ddOutEnbl : out std_logic;        -- enable data outputs to disk
      intrq     : in  std_logic;        -- interrupt from disk
      dmack_n   : out std_logic         -- DMA acknowledge
      );
  end component;

  component ataCntl
    generic(
      FREQ           :     natural := 50_000;  -- operating frequency in KHz
      SECTORS_PER_RW :     natural := 1  -- number of sectors to read/write
      );
    port(
      -- host side
      clk            : in  std_logic;   -- master clock
      rst            : in  std_logic;   -- reset
      rd             : in  std_logic;   -- initiate read operation
      wr             : in  std_logic;   -- initiate write operation
      abort          : in  std_logic;   -- aborts read/write sector operation
      head           : in  std_logic_vector(3 downto 0);  -- disk head for data access
      cylinder       : in  std_logic_vector(15 downto 0);  -- cylinder for data access
      sector         : in  std_logic_vector(7 downto 0);  -- sector for data access
      hDIn           : in  std_logic_vector(15 downto 0);  -- data from host       to disk
      hDOut          : out std_logic_vector(15 downto 0);  -- data from disk to host
      done           : out std_logic;   -- read or write operation is done
      status         : out std_logic_vector(6 downto 0);  -- diagnostic status            

      -- disk side
      dior_n    : out std_logic;        -- disk register read-enable
      diow_n    : out std_logic;        -- disk register write-enable
      cs0_n     : out std_logic;        -- disk command block register select
      cs1_n     : out std_logic;        -- disk control block register select
      da        : out std_logic_vector(2 downto 0);  -- register address
      ddIn      : in  std_logic_vector(15 downto 0);  -- data from disk
      ddOut     : out std_logic_vector(15 downto 0);  -- data to disk
      ddOutEnbl : out std_logic;        -- enable data outputs to disk
      intrq     : in  std_logic;        -- interrupt from disk
      dmack_n   : out std_logic         -- DMA acknowledge
      );
  end component;

end package ata;




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

--------------------------------------------------------------------
-- Company : XESS Corp.
-- Engineer : Dave Vanden Bout
-- Creation Date : 04/14/2004
-- Copyright : 2004-2006, XESS Corp
-- Tool Versions : WebPACK 6.3.03i
--
-- Description:
-- This module executes a timed read/write operation to one of the disk registers.
--
-- For a read operation, the host supplies a register address and pulls the read
-- control line high. The read operation begins on the next rising clock edge
-- and the busy signal goes high. The host gets the data from the disk register
-- once the busy signal goes low again.
--
-- For a write operation, the host supplies a register address and the data to
-- be stored there and pulls the write control line high. The write operation
-- begins on the nxt rising clock edge an the busy signal goes high. The register
-- contains the new data once the busy signal goes low again.
--
-- The 5-bit register address from the host contains the 3-bit disk register address
-- along with the control and command block register select bits in the most
-- significant bit positions.
--
-- Revision:
-- 1.0.1
--
-- Additional Comments:
-- 1.0.1:
-- Added PIO Mode 2 timing parameters.
-- 1.0.0:
-- Initial release.
--
-- License:
-- This code can be freely distributed and modified as long as
-- this header is not removed.
--------------------------------------------------------------------

entity pioIntfc is
  generic(
    FREQ     :     natural := 50_000    -- operating frequency in KHz
    );
  port(
    -- host side
    clk      : in  std_logic;           -- master clock
    pioRst   : in  std_logic;           -- async. reset
    pioRd    : in  std_logic;           -- initiate read operation
    pioWr    : in  std_logic;           -- initiate write operation
    pioAddr  : in  std_logic_vector(4 downto 0);  -- disk register address from host
    pioDIn   : in  std_logic_vector(15 downto 0);  -- data from host       to disk
    pioDOut  : out std_logic_vector(15 downto 0);  -- data from disk to host
    pioBusy  : out std_logic;           -- read or write operation is in progress
    pioIntrq : out std_logic;           -- debounced interrupt from disk
    status   : out std_logic_vector(3 downto 0);  -- diagnostic status for the R/W

    -- disk side
    dior_n    : out std_logic;          -- disk register read-enable
    diow_n    : out std_logic;          -- disk register write-enable
    cs0_n     : out std_logic;          -- disk command block register select
    cs1_n     : out std_logic;          -- disk control block register select
    da        : out std_logic_vector(2 downto 0);  -- disk register address
    ddIn      : in  std_logic_vector(15 downto 0);  -- data from disk
    ddOut     : out std_logic_vector(15 downto 0);  -- data to disk
    ddOutEnbl : out std_logic;          -- enable data outputs to disk
    intrq     : in  std_logic;          -- interrupt from disk
    dmack_n   : out std_logic           -- DMA acknowledge
    );
end pioIntfc;


architecture arch of pioIntfc is
  -- PIO mode 0 timing parameters in ns
  constant Top    : natural := 600;     -- minimum cycle time between R/W operations
  constant Tsetup : natural := 70;      -- address/data setup before R/W pulse
  constant Tpulse : natural := 290;     -- R/W pulse width
  -- PIO mode 2 timing parameters in ns
--  constant Top    : natural := 240;   -- minimum cycle time between R/W operations
--  constant Tsetup : natural := 30;    -- address/data setup before R/W pulse
--  constant Tpulse : natural := 100;   -- R/W pulse width

  constant Thold : natural := Top-Tsetup-Tpulse;  -- address/data hold after R/W pulse

  -- PIO mode timing parameters converted into clock cycles (based on FREQ)
  constant NORM         : natural := 1_000_000;  -- normalize ns * KHz
  constant OP_CYCLES    : natural := 1+((Top*FREQ)/NORM);
  constant SETUP_CYCLES : natural := 1+((Tsetup*FREQ)/NORM);
  constant PULSE_CYCLES : natural := 1+((Tpulse*FREQ)/NORM);
  constant HOLD_CYCLES  : natural := 1+((Thold*FREQ)/NORM);

  -- timer register that counts down times for the phases of the disk R/W operation
  signal timer_r, timer_x : natural range OP_CYCLES downto 0;

  -- PIO mode timing parameters converted into unsigned clock cycles for clarity
--  constant OP_CYCLES    : unsigned := TO_UNSIGNED(OP_CYCLES_N, timer_r'length);
--  constant SETUP_CYCLES : unsigned := TO_UNSIGNED(SETUP_CYCLES_N, timer_r'length);
--  constant PULSE_CYCLES : unsigned := TO_UNSIGNED(PULSE_CYCLES_N, timer_r'length);
--  constant HOLD_CYCLES  : unsigned := TO_UNSIGNED(HOLD_CYCLES_N, timer_r'length);

  -- states of the PIO interface state machine
  type cntlState is (
    RW_SETUP,                           -- setup address/data before read pulse
    RD_PULSE,                           -- read pulse active
    RD_HOLD,                            -- hold address/data after read pulse
    WR_PULSE,                           -- write pulse active
    WR_HOLD                             -- hold address/data after write pulse
    );
  signal state_r, state_x : cntlState;  -- state register and next state

  -- PIO interface registers
  signal pioBusy_r, pioBusy_x     : std_logic;  -- R/W in-progress register
  signal dior_r, dior_x           : std_logic;  -- disk read signal register
  signal diow_r, diow_x           : std_logic;  -- disk write signal register
  signal da_r, da_x               : std_logic_vector(pioAddr'range);  -- disk register address register
  signal ddOut_r, ddOut_x         : std_logic_vector(ddOut'range);  -- data output to disk register
  signal ddOutEnbl_r, ddOutEnbl_x : std_logic;  -- enable data output to disk register
  signal ddIn_r, ddIn_x           : std_logic_vector(ddIn'range);  -- data input from disk register

  -- reports the status of the PIO interface
  signal status_r, status_x : std_logic_vector(3 downto 0);

  -- debounce counter for the interrupt request input
  signal   intrqCnt_r, intrqCnt_x : unsigned(3 downto 0);
  constant DEBOUNCE_CNT           : natural := 10;
  signal   pioIntrq_r, pioIntrq_x : std_logic;
  signal   intrq_r, intrq_x       : std_logic;

begin

  -----------------------------------------------------------
  -- attach some internal signals to the host and disk ports 
  -----------------------------------------------------------

  dior_n    <= dior_r;
  diow_n    <= diow_r;
  da        <= da_r(da'range);
  cs0_n     <= da_r(3);
  cs1_n     <= da_r(4);
  ddOut     <= ddOut_r;
  ddOutEnbl <= ddOutEnbl_r;
  pioDOut   <= ddIn_r;                  -- output data to host is the input data from the disk
  pioBusy   <= pioBusy_r;
  pioIntrq  <= pioIntrq_r;
  status    <= status_r;
  dmack_n   <= HI;                      -- never acknowledge DMA requests from disk

  -----------------------------------------------------------
  -- debounce the interrupt signal from the disk 
  -----------------------------------------------------------
  debounce : process(intrq, intrqCnt_r, intrq_r, pioIntrq_r)
  begin

    intrq_x    <= intrq;
    pioIntrq_x <= pioIntrq_r;

    if(intrq = intrq_r) then
      if(intrqCnt_r = DEBOUNCE_CNT) then
        intrqCnt_x <= (others => '0');
        pioIntrq_x <= intrq_r;
      else
        intrqCnt_x <= intrqCnt_r + 1;
      end if;
    else
      intrqCnt_x   <= (others => '0');
    end if;

  end process debounce;

  -----------------------------------------------------------
  -- compute the next state and outputs 
  -----------------------------------------------------------

  combinatorial : process(pioRd, pioWr, pioAddr, pioDIn, state_r, timer_r, dior_r, pioBusy_r,
                          diow_r, da_r, ddOut_r, ddOutEnbl_r, ddIn_r, ddIn, status_r)
  begin

    -----------------------------------------------------------
    -- setup default values for signals 
    -----------------------------------------------------------

    state_x     <= state_r;
    dior_x      <= dior_r;
    diow_x      <= diow_r;
    da_x        <= da_r;
    ddOut_x     <= ddOut_r;
    ddOutEnbl_x <= ddOutEnbl_r;
    ddIn_x      <= ddIn_r;
    pioBusy_x   <= pioBusy_r;
    status_x    <= status_r;

    -----------------------------------------------------------
    -- update the timers 
    -----------------------------------------------------------

    -- main timer for sequencing the phases of the R/W waveforms                
    if timer_r /= 0 then
      -- decrement the timer and do nothing else since the previous 
      -- phase has not completed yet.
      timer_x <= timer_r - 1;
    else
      -- the previous phase has completed once the timer hits zero.
      -- By default, leave the timer at zero.  A R/W op will set it
      -- to non-zero below.
      timer_x <= timer_r;

      -----------------------------------------------------------
      -- compute the next state and outputs 
      -----------------------------------------------------------
      case state_r is

        -----------------------------------------------------------
        -- wait for a disk read or write operation 
        -----------------------------------------------------------
        when RW_SETUP =>
          dior_x        <= HI;          -- don't read or write the disk until requested
          diow_x        <= HI;
          ddOutEnbl_x   <= NO;          -- don't drive disk data bus until requested
          if(pioRd = YES) then
                                        -- a read operation is requested
            pioBusy_x   <= YES;         -- set busy bit
            da_x        <= pioAddr;     -- output disk register address
            timer_x     <= SETUP_CYCLES;  -- set timer for address setup
            state_x     <= RD_PULSE;    -- next state after address setup completes

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区久久| 欧美一区二区三区在线视频| 色婷婷久久久久swag精品| 777亚洲妇女| 亚洲婷婷综合久久一本伊一区| 午夜在线成人av| 不卡的av中国片| 欧美一级淫片007| 怡红院av一区二区三区| 国产露脸91国语对白| 欧美日韩不卡一区二区| 综合久久给合久久狠狠狠97色| 久久99国产精品久久99果冻传媒| 欧洲精品视频在线观看| 国产精品丝袜黑色高跟| 国产毛片精品视频| 精品久久久影院| 香蕉久久夜色精品国产使用方法| 91免费小视频| 国产欧美视频一区二区| 国产一区二区成人久久免费影院| 日韩午夜激情视频| 午夜影院久久久| 欧美色视频在线| 亚洲一区二区三区美女| 欧洲av在线精品| 一区二区三区欧美| 91麻豆精品秘密| 亚洲女与黑人做爰| 99久久久久久| 亚洲日本护士毛茸茸| 91色乱码一区二区三区| 亚洲黄色小视频| 91精品福利在线| 亚洲在线视频网站| 欧美日韩mp4| 蜜臀av亚洲一区中文字幕| 欧美一级夜夜爽| 久久丁香综合五月国产三级网站| 日韩欧美电影一二三| 精品一区二区三区免费| 国产日韩欧美不卡在线| 国产不卡在线播放| 中文字幕中文在线不卡住| 91色综合久久久久婷婷| 五月婷婷综合网| 欧美一卡二卡在线观看| 国产精品99久久久久久有的能看| 国产精品久久久久国产精品日日| kk眼镜猥琐国模调教系列一区二区 | 99久久精品99国产精品| 亚洲免费在线视频| 欧美日韩国产电影| 免费在线观看不卡| 国产日韩欧美不卡在线| 色婷婷亚洲精品| 青青草成人在线观看| 久久久久久日产精品| 99在线精品视频| 亚洲成人久久影院| 久久看人人爽人人| 欧美视频一区二区三区在线观看| 午夜精品成人在线视频| 久久综合精品国产一区二区三区| 99久久777色| 日本伊人精品一区二区三区观看方式 | 久久蜜臀精品av| 91网站视频在线观看| 日韩不卡一二三区| 欧美国产精品v| 欧美电影在哪看比较好| 国产精品18久久久久久vr| 亚洲永久免费视频| 2020国产精品| 欧美日产国产精品| 国产91精品一区二区麻豆亚洲| 亚洲自拍与偷拍| 国产三级久久久| 欧美另类久久久品| 不卡视频一二三| 国产中文一区二区三区| 亚洲国产人成综合网站| 国产欧美日产一区| 精品免费日韩av| 欧美日韩久久久久久| 99久久久无码国产精品| 国产麻豆成人精品| 奇米影视一区二区三区| 一区二区欧美国产| 国产精品久久久久一区二区三区共| 日韩欧美国产高清| 欧美精品九九99久久| 在线观看三级视频欧美| jizz一区二区| 国产精品亚洲一区二区三区妖精| 日韩福利电影在线| 视频一区二区国产| 亚洲综合激情小说| 一区二区三区精品在线| 日韩伦理av电影| 国产精品三级久久久久三级| 精品国产91洋老外米糕| 678五月天丁香亚洲综合网| 在线亚洲欧美专区二区| 色菇凉天天综合网| 91猫先生在线| 99国产精品久久久久久久久久| 国产a区久久久| 国产另类ts人妖一区二区| 国产一区二区视频在线播放| 久久精品免费观看| 老司机免费视频一区二区| 日韩电影在线看| 视频一区视频二区在线观看| 亚洲午夜电影网| 亚洲一二三级电影| 亚洲一区视频在线观看视频| 一区二区在线观看免费视频播放| 亚洲精品成人少妇| 亚洲一区二区三区四区五区中文| 一片黄亚洲嫩模| 亚洲国产精品视频| 日韩综合一区二区| 蜜桃一区二区三区在线| 久久99国内精品| 国产99精品视频| av中文字幕不卡| 色av综合在线| 欧美裸体一区二区三区| 日韩欧美国产一二三区| 久久综合丝袜日本网| 国产女主播一区| 亚洲精品亚洲人成人网 | 色综合视频一区二区三区高清| 99re这里只有精品6| 狠狠色丁香婷婷综合| 成人午夜av电影| 欧洲一区二区三区免费视频| 欧美一区二区三区四区久久| 精品国内二区三区| 国产精品国产三级国产aⅴ原创| 一区二区三区在线视频观看58| 亚洲va天堂va国产va久| 韩国三级中文字幕hd久久精品| 成人h动漫精品一区二区| 在线观看精品一区| 2欧美一区二区三区在线观看视频| 18成人在线观看| 日本欧美一区二区在线观看| 国产在线看一区| 在线看国产日韩| 欧美白人最猛性xxxxx69交| 国产精品美女久久久久久 | 日韩午夜小视频| 中文字幕一区二区三中文字幕| 天天色 色综合| www.日韩大片| 欧美一区二区三区在线看| 国产精品电影一区二区| 毛片一区二区三区| 99精品久久只有精品| 日韩精品中午字幕| 亚洲国产精品麻豆| 丁香一区二区三区| 日韩欧美激情一区| 亚洲国产另类av| jlzzjlzz亚洲日本少妇| 精品久久一区二区| 日韩av电影免费观看高清完整版 | 国产午夜精品久久久久久久 | 亚洲综合一二三区| 国产一区二区三区在线观看免费视频| 91网页版在线| 久久久久久久免费视频了| 视频一区欧美精品| 在线亚洲免费视频| 国产精品精品国产色婷婷| 国内精品不卡在线| 日韩写真欧美这视频| 亚洲丰满少妇videoshd| 91麻豆国产福利在线观看| 欧美激情在线一区二区三区| 捆绑紧缚一区二区三区视频| 69久久夜色精品国产69蝌蚪网| 亚洲精品欧美激情| 99re成人精品视频| 日本一区二区三区国色天香| 精品在线观看免费| 日韩女优av电影| 久久精品国产网站| 欧美一区国产二区| 美女诱惑一区二区| 欧美一区二区视频在线观看2020| 亚洲一区二区三区四区在线免费观看| 91在线观看一区二区| 国产网站一区二区三区| 国产成人鲁色资源国产91色综| 久久蜜桃一区二区| 国产白丝网站精品污在线入口| 精品国产123|