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

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

?? atacntl.vhd

?? Access IDE harddisk by Xilinx FPGA Support PIO2
?? VHD
?? 第 1 頁 / 共 3 頁
字號:
            status_x    <= "0010";
          elsif(pioWr = YES) then
                                        -- a write operation is requested
            pioBusy_x   <= YES;         -- set busy bit
            da_x        <= pioAddr;     -- output disk register address
            ddOut_x     <= pioDIn;      -- output data to disk
            ddOutEnbl_x <= YES;         -- enable output bus
            timer_x     <= SETUP_CYCLES;  -- set timer for address/data setup
            state_x     <= WR_PULSE;    -- next state after address/data setup completes
            status_x    <= "0100";
          else
                                        -- no operation is requested
            pioBusy_x   <= NO;          -- clear busy bit
            state_x     <= RW_SETUP;    -- return to this state and wait for R/W request
            status_x    <= "0001";
          end if;

          -----------------------------------------------------------
          -- pulse disk read control signal 
          -----------------------------------------------------------
        when RD_PULSE =>
          dior_x  <= LO;                -- lower disk read control line
          timer_x <= PULSE_CYCLES;      -- load duration of read pulse
          state_x <= RD_HOLD;           -- next state after pulse completes

          -----------------------------------------------------------
          -- get data and hold address after read pulse ends 
          -----------------------------------------------------------
        when RD_HOLD =>
          ddIn_x  <= ddIn;              -- load the data from the disk
          dior_x  <= HI;                -- terminate the read pulse
          timer_x <= HOLD_CYCLES;       -- insert hold period after read operation
          state_x <= RW_SETUP;          -- look for another operation after the hold period

          -----------------------------------------------------------
          -- pulse disk write control signal 
          -----------------------------------------------------------
        when WR_PULSE =>
          diow_x  <= LO;                -- lower disk write control line
          timer_x <= PULSE_CYCLES;      -- load duration of write pulse
          state_x <= WR_HOLD;           -- next state after pulse completes

          -----------------------------------------------------------
          -- hold address and data after write pulse ends 
          -----------------------------------------------------------
        when WR_HOLD =>
          diow_x  <= HI;                -- terminate the write pulse
          timer_x <= HOLD_CYCLES;       -- insert hold period after write operation
          state_x <= RW_SETUP;          -- look for another operation after the hold period

          -----------------------------------------------------------
          -- unknown state
          -----------------------------------------------------------
        when others =>
          state_x  <= RW_SETUP;         -- reset state if in erroneous state
          status_x <= "1000";

      end case;
    end if;
  end process combinatorial;


  -----------------------------------------------------------
  -- update registers on the appropriate clock edge     
  -----------------------------------------------------------

  update : process(pioRst, clk)
  begin

    if pioRst = YES then
      -- asynchronous reset
      state_r     <= RW_SETUP;
      timer_r     <= 0;
      pioBusy_r   <= NO;
      pioIntrq_r  <= NO;
      intrq_r     <= NO;
      intrqCnt_r  <= (others => '0');
      dior_r      <= HI;
      diow_r      <= HI;
      da_r        <= (others => '0');
      ddOut_r     <= (others => '0');
      ddOutEnbl_r <= NO;
      ddIn_r      <= (others => '0');
      status_r    <= (others => '0');
    elsif rising_edge(clk) then
      state_r     <= state_x;
      timer_r     <= timer_x;
      pioBusy_r   <= pioBusy_x;
      pioIntrq_r  <= pioIntrq_x;
      intrq_r     <= intrq_x;
      intrqCnt_r  <= intrqCnt_x;
      dior_r      <= dior_x;
      diow_r      <= diow_x;
      da_r        <= da_x;
      ddOut_r     <= ddOut_x;
      ddOutEnbl_r <= ddOutEnbl_x;
      ddIn_r      <= ddIn_x;
      status_r    <= status_x;
    end if;

  end process update;

end arch;





library IEEE, UNISIM;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.numeric_std.all;
use WORK.common.all;
use WORK.ata.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 reads or write a one or more 256-word sectors of the disk.
--
-- For a read operation, the host supplies the head, cylinder and beginning
-- sector to be read and pulls the read control line high. The read operation
-- begins on the next rising clock edge. A word of data from the sector can
-- be read each time the done signal goes high. Lowering the read control line
-- will temporarily halt the flow of data. The data flow will resume once the
-- read control line is raised again. The sector read operation can be terminated
-- by raising the abort control line.
--
-- For a write operation, the host supplies the head, cylinder, beginning sector,
-- and initial data word to be written and pulls the write control line high.
-- The write operation begins on the next rising clock edge. A word of data is
-- written to the sector each time the done signal goes high, after which new data
-- must be supplied. Lowering the write control line will temporarily halt the
-- flow of data. The data flow will resume once the write control line is raised
-- again. The sector write operation can be terminated by raising the abort control line.
--
-- Revision:
-- 1.0.1
--
-- Additional Comments:
-- 1.0.1:
-- Added multisector R/W.
-- Added enhanced ATA status output.
-- 1.0.0:
-- Initial release.
--
-- License:
-- This code can be freely distributed and modified as long as
-- this header is not removed.
--------------------------------------------------------------------

entity ataCntl is
  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 ataCntl;



architecture arch of ataCntl is

  -- disk register addresses: (cs1,cs0,da2,da1,da0)
  constant CONTROL_REG    : std_logic_vector(4 downto 0) := "01110";
  constant DATA_REG       : std_logic_vector(4 downto 0) := "10000";
  constant SECTOR_CNT_REG : std_logic_vector(4 downto 0) := "10010";
  constant SECTOR_REG     : std_logic_vector(4 downto 0) := "10011";
  constant CYL_LOW_REG    : std_logic_vector(4 downto 0) := "10100";
  constant CYL_HIGH_REG   : std_logic_vector(4 downto 0) := "10101";
  constant DRIVE_HEAD_REG : std_logic_vector(4 downto 0) := "10110";
  constant CMD_REG        : std_logic_vector(4 downto 0) := "10111";
  constant STATUS_REG     : std_logic_vector(4 downto 0) := "10111";

  -- commands for disk
  constant DRIVE_RESET_CMD   : std_logic_vector(7 downto 0) := x"0C";
  constant DRIVE_RELEASE_CMD : std_logic_vector(7 downto 0) := x"08";
  constant NOP_CMD           : std_logic_vector(7 downto 0) := x"00";
  constant READ_SECTOR_CMD   : std_logic_vector(7 downto 0) := x"20";
  constant WRITE_SECTOR_CMD  : std_logic_vector(7 downto 0) := x"30";

  -- disk status register bits
  constant STATUS_REG_BSY : natural := 7;
  constant STATUS_REG_DRQ : natural := 3;
  constant STATUS_REG_ERR : natural := 0;

  -- number of 16-bit words per disk sector
  constant SECTOR_SIZE : natural := 256;

  -- states of the ATA drive interface state machine
  type cntlState is (
    WAIT_FOR_NOT_BUSY,
    WAIT_FOR_NOT_BUSY_1,
    RESET_DRIVE,
    RESET_DRIVE_1,
    ABORT_1,
    WAIT_FOR_CMD,
    SETUP_DRIVE,
    SETUP_DRIVE_1,
    SETUP_DRIVE_2,
    SETUP_DRIVE_3,
    SETUP_DRIVE_4,
    SETUP_DRIVE_5,
    WRITE_WORDS,
    WRITE_WORDS_1,
    WRITE_WORDS_2,
    WRITE_WORDS_3,
    WRITE_WORDS_4,
    WRITE_WORDS_5,
    READ_WORDS,
    READ_WORDS_1,
    READ_WORDS_2,
    READ_WORDS_3,
    error
    );
  signal state_r, state_x       : cntlState;  -- state register and next state
  signal rtnState_r, rtnState_x : cntlState;  -- state register and next state

  -- ATA drive interface registers
  signal cmd_r, cmd_x         : std_logic_vector(7 downto 0);  -- ATA drive command (e.g. READ_SECTOR)
  signal wordCnt_r, wordCnt_x : natural range SECTOR_SIZE-1 downto 0;  -- counts words read from sector
  signal status_r, status_x   : std_logic_vector(status'range);

  constant ERROR_FLAG : natural := 0;   -- position of error flag bit in status register

  -- PIO interface signals
  signal pioRd    : std_logic;          -- initiate read operation
  signal pioWr    : std_logic;          -- initiate write operation
  signal pioBusy  : std_logic;          -- read or write operation in-progress
  signal pioIntrq : std_logic;          -- debounced interrupt from disk
  signal pioAddr  : std_logic_vector(4 downto 0);  -- register address from host
  signal pioDIn   : std_logic_vector(15 downto 0);  -- data from host       to disk
  signal pioDOut  : std_logic_vector(15 downto 0);  -- data from disk to host

begin

  -------------------------------------------------------------------
  -- instantiate the low-level interface to the disk registers
  -------------------------------------------------------------------

  u0 : pioIntfc
    generic map(
      FREQ     => FREQ
      )
    port map(
      clk      => clk,
      pioRst   => rst,
      pioRd    => pioRd,
      pioWr    => pioWr,
      pioAddr  => pioAddr,
      pioDIn   => pioDIn,
      pioDOut  => pioDOut,
      pioBusy  => pioBusy,
      pioIntrq => pioIntrq,
      status   => open,

      dior_n    => dior_n,
      diow_n    => diow_n,
      cs0_n     => cs0_n,
      cs1_n     => cs1_n,
      da        => da,
      ddIn      => ddIn,
      ddOut     => ddOut,
      ddOutEnbl => ddOutEnbl,
      intrq     => intrq,
      dmack_n   => dmack_n
      );

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

  hdOut  <= pioDOut;
  status <= status_r;

  -----------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区精品在线| 日日摸夜夜添夜夜添精品视频| 亚洲精品乱码久久久久久久久| 欧美久久久久久蜜桃| 国产很黄免费观看久久| 国产精品白丝jk黑袜喷水| 亚洲三级电影网站| 欧美tickling网站挠脚心| 色综合久久久久综合99| 国产麻豆精品在线| 午夜精品视频一区| 亚洲免费在线视频一区 二区| 精品少妇一区二区三区日产乱码| 色婷婷久久久亚洲一区二区三区 | 一区二区三区成人| 精品少妇一区二区三区免费观看| 欧美丝袜第三区| av不卡免费在线观看| 国产综合久久久久久鬼色| 亚洲成av人片在线观看| 中文字幕亚洲电影| 国产欧美一区二区精品仙草咪| 3d动漫精品啪啪| 欧美图片一区二区三区| 91污片在线观看| 国产精品91xxx| 美腿丝袜亚洲综合| 秋霞影院一区二区| 亚洲国产一区二区三区青草影视| 国产精品久久久久国产精品日日| 久久这里只有精品6| 日韩视频中午一区| 日韩欧美国产午夜精品| 欧美日韩视频在线第一区 | 日韩一级免费观看| 制服.丝袜.亚洲.另类.中文| 欧美日韩不卡在线| 欧美色图在线观看| 在线观看不卡一区| 99精品国产99久久久久久白柏| 福利一区在线观看| 国产成人av资源| 国产精品一区二区不卡| 久久国产夜色精品鲁鲁99| 美腿丝袜亚洲一区| 久久狠狠亚洲综合| 国产精品亚洲视频| 成人午夜av在线| 97se亚洲国产综合自在线不卡| 99视频热这里只有精品免费| 99国产精品视频免费观看| 91免费版在线看| 欧美无乱码久久久免费午夜一区 | 日韩欧美国产小视频| 欧美大尺度电影在线| 精品成人佐山爱一区二区| 国产亚洲精品久| 中文字幕一区二区视频| 一区二区三区国产精品| 香蕉加勒比综合久久| 日本中文一区二区三区| 国产一区二区久久| 91在线观看免费视频| 欧美日韩一区二区不卡| 欧美www视频| 国产亚洲精品资源在线26u| 日韩高清国产一区在线| 久久99久久精品| 粉嫩蜜臀av国产精品网站| 99精品热视频| 日韩午夜电影在线观看| 国产精品美女一区二区| 午夜天堂影视香蕉久久| 国产一区二区三区四区五区美女| 福利电影一区二区| 92国产精品观看| 欧美剧情片在线观看| 在线播放一区二区三区| 国产欧美日韩综合精品一区二区| 国产精品第四页| 亚洲综合色网站| 蜜臀av一区二区| 成人听书哪个软件好| 色婷婷av一区二区三区大白胸| 日本道免费精品一区二区三区| 欧美撒尿777hd撒尿| 日韩视频不卡中文| 国产婷婷色一区二区三区在线| 国产精品国产三级国产aⅴ原创| 一区二区三区在线影院| 免费精品视频在线| 国产电影一区在线| 国产在线精品国自产拍免费| 欧美性一级生活| 欧美成人aa大片| 国产精品情趣视频| 午夜视频一区二区三区| 韩国女主播成人在线观看| 97se亚洲国产综合在线| 日韩片之四级片| 国产精品久久久久久户外露出| 天天亚洲美女在线视频| 激情小说欧美图片| 日本精品裸体写真集在线观看| 日韩色视频在线观看| 亚洲人成精品久久久久| 久久99九九99精品| 99久久免费精品| eeuss国产一区二区三区| 懂色av一区二区三区免费观看 | 成人综合日日夜夜| 欧美日精品一区视频| 国产欧美一区二区精品久导航| 亚洲成人激情综合网| 狠狠色狠狠色综合系列| 91精品国产麻豆国产自产在线 | 91理论电影在线观看| 日韩写真欧美这视频| 亚洲美女一区二区三区| 精品一区二区三区香蕉蜜桃| 国产69精品久久久久毛片| 欧美精品乱人伦久久久久久| 欧美一区二区性放荡片| 欧美大白屁股肥臀xxxxxx| 亚洲欧洲精品一区二区三区| 久久99久久99| 777久久久精品| 自拍av一区二区三区| 精品影视av免费| 欧美精品一级二级| 亚洲一区二区三区在线播放| 成人av一区二区三区| 欧美区视频在线观看| 国产精品污网站| 国产成人av福利| 久久综合色播五月| 美国十次综合导航| 91精品国产综合久久精品| 亚洲另类春色国产| 国产精品538一区二区在线| 制服丝袜激情欧洲亚洲| 亚洲国产aⅴ成人精品无吗| 99久久综合国产精品| 中文字幕在线不卡| 成人午夜私人影院| 国产免费观看久久| 懂色av一区二区夜夜嗨| 国产欧美一区二区三区在线看蜜臀 | 亚洲国产成人va在线观看天堂| 成人a免费在线看| 久久麻豆一区二区| 久久99热99| 欧美va在线播放| 蜜臀av在线播放一区二区三区| 欧美日韩亚洲另类| 天天色天天操综合| 日韩一区二区在线观看视频| 日日夜夜免费精品| 日韩一区二区三区精品视频| 免费美女久久99| 精品国产乱子伦一区| 精一区二区三区| 精品国产亚洲一区二区三区在线观看| 免费三级欧美电影| 日韩欧美一级片| 国产综合成人久久大片91| 国产亚洲人成网站| 成人aaaa免费全部观看| 国产校园另类小说区| 在线观看视频一区二区 | 免费成人结看片| 日韩欧美一区电影| 国产福利精品导航| 成人免费毛片aaaaa**| 国产尤物一区二区| 国产三级精品三级| 国产成人综合在线观看| 国产精品久久久久久久久久免费看 | 亚洲资源在线观看| 91麻豆精品91久久久久同性| 国产一区二区三区国产| 国产精品―色哟哟| 日韩一区二区在线观看视频 | 欧美高清视频www夜色资源网| 久久国产免费看| 亚洲精品国产无天堂网2021| 91精品国产综合久久精品性色| 成人h版在线观看| 香港成人在线视频| 国产精品网站在线观看| 91福利在线观看| 国产成人精品亚洲777人妖| 亚洲乱码一区二区三区在线观看| 91精品在线麻豆| 99re这里都是精品| 午夜精品久久久久久久久久| 中文字幕第一区| 3751色影院一区二区三区| 成人免费毛片嘿嘿连载视频| 男女性色大片免费观看一区二区|