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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? atacntl.vhd

?? xilinx fpga 下的IDE控制器原代碼,貢獻(xiàn)一起學(xué)習(xí)
?? VHD
?? 第 1 頁 / 共 3 頁
字號(hào):
            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;

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品aⅴ在线视频| 91免费国产视频网站| 91精品欧美综合在线观看最新| 亚洲人123区| 色94色欧美sute亚洲13| 一片黄亚洲嫩模| 欧美日韩电影在线| 久久国产视频网| 久久久精品蜜桃| 91免费在线看| 日本最新不卡在线| 精品久久久久久亚洲综合网| 粉嫩嫩av羞羞动漫久久久| 中文字幕一区在线观看| 精品视频1区2区3区| 美洲天堂一区二卡三卡四卡视频| 精品福利av导航| av电影一区二区| 亚洲福中文字幕伊人影院| 欧美va天堂va视频va在线| 成人sese在线| 亚洲va欧美va人人爽午夜| 欧美xxxxxxxx| 97久久精品人人做人人爽50路| 香蕉久久一区二区不卡无毒影院| 2020日本不卡一区二区视频| 色一情一乱一乱一91av| 奇米888四色在线精品| 国产精品嫩草影院av蜜臀| 欧美性欧美巨大黑白大战| 捆绑紧缚一区二区三区视频| 亚洲欧洲av一区二区三区久久| 欧美日韩国产中文| 成人毛片在线观看| 日韩国产欧美三级| 中文字幕一区二区三区四区| 日韩欧美123| 日本道精品一区二区三区| 国产一区二区三区在线看麻豆| 亚洲美女免费在线| 久久精品一区二区三区不卡牛牛| 欧美三级电影网站| 国产精品亚洲第一区在线暖暖韩国| 亚洲国产一区二区视频| 亚洲国产精品黑人久久久| 日韩一区二区麻豆国产| 91在线视频网址| 国产精品综合一区二区| 免费人成网站在线观看欧美高清| 中文字幕亚洲成人| 久久精品在这里| 日韩一区二区三免费高清| 欧美性一级生活| 色综合久久综合网| www.成人在线| 国产高清在线精品| 麻豆精品一区二区三区| 亚洲国产精品久久久久秋霞影院| 中文字幕一区二区三区精华液 | 婷婷久久综合九色综合绿巨人| 国产精品人妖ts系列视频| 日韩欧美中文字幕制服| 欧美调教femdomvk| 一本久久a久久精品亚洲| 9l国产精品久久久久麻豆| 国产精品中文字幕日韩精品| 韩国女主播一区| 国产午夜精品在线观看| 中文字幕视频一区二区三区久| 日韩欧美成人激情| 国产清纯在线一区二区www| 97久久精品人人澡人人爽| 成人一区二区三区| 91精彩视频在线观看| 在线不卡a资源高清| 国产欧美一区二区精品性色 | 亚洲日穴在线视频| 亚洲成国产人片在线观看| 久久草av在线| 91麻豆蜜桃一区二区三区| 制服丝袜成人动漫| 日本一区二区三区四区在线视频 | 欧美国产精品一区| 一区二区久久久久| 精品综合免费视频观看| 91日韩精品一区| 精品国产一区二区三区忘忧草 | 国内久久婷婷综合| 日本高清不卡视频| 久久综合五月天婷婷伊人| 亚洲麻豆国产自偷在线| 精油按摩中文字幕久久| 欧美性受极品xxxx喷水| 国产亚洲人成网站| 婷婷丁香久久五月婷婷| 成人av午夜影院| 日韩亚洲欧美高清| 亚洲一区二区精品久久av| 国产一区二区三区蝌蚪| 欧美精品久久天天躁| 中文字幕日韩欧美一区二区三区| 七七婷婷婷婷精品国产| 欧美综合一区二区| 国产精品久久久久久一区二区三区 | 日本韩国一区二区三区视频| 精品国产伦一区二区三区观看方式| 亚洲最色的网站| 成人av午夜电影| 久久久一区二区| 久久国产综合精品| 欧美男男青年gay1069videost| 一区在线观看视频| 国产精品一二一区| 精品久久一区二区三区| 午夜精品久久久久久久久久| 91在线看国产| 国产拍揄自揄精品视频麻豆| 秋霞午夜av一区二区三区| 欧美性猛交xxxx乱大交退制版| 1区2区3区欧美| 成人av电影在线网| 国产蜜臀av在线一区二区三区| 久久99精品久久久| 日韩欧美激情一区| 青青草伊人久久| 欧美福利视频一区| 亚洲第一狼人社区| 欧美日韩精品三区| 丝袜a∨在线一区二区三区不卡| 色偷偷一区二区三区| 亚洲人成人一区二区在线观看| 99国产精品久久久久久久久久 | 久久―日本道色综合久久| 久久激情综合网| 精品久久国产字幕高潮| 免费在线观看视频一区| 欧美一区日韩一区| 麻豆成人91精品二区三区| 欧美精品 日韩| 免费观看日韩av| 欧美成人精品二区三区99精品| 男女男精品网站| 久久影院电视剧免费观看| 久久99精品国产麻豆婷婷洗澡| 精品国产99国产精品| 国产老女人精品毛片久久| 日本一区二区三区电影| av爱爱亚洲一区| 亚洲影院理伦片| 91精品国产91久久久久久最新毛片| 日韩不卡免费视频| 久久亚洲精华国产精华液 | 三级在线观看一区二区| 欧美一区二区在线免费播放 | 国产麻豆成人传媒免费观看| 久久免费视频一区| 99久久综合国产精品| 亚洲尤物在线视频观看| 5858s免费视频成人| 精品亚洲国产成人av制服丝袜| 欧美变态口味重另类| 成人aa视频在线观看| 亚洲综合一区二区三区| 91精品一区二区三区在线观看| 精品制服美女丁香| 国产精品嫩草影院av蜜臀| 精品视频999| 国精产品一区一区三区mba视频 | 日韩视频免费观看高清完整版 | 日韩美女啊v在线免费观看| 91国偷自产一区二区开放时间| 亚洲无人区一区| 2020国产精品| 91免费看`日韩一区二区| 日韩av在线播放中文字幕| 国产三级精品在线| 欧美午夜一区二区| 精东粉嫩av免费一区二区三区| 国产精品久久久久久久久久免费看 | 亚洲天堂成人网| 欧美一级二级三级蜜桃| 99国产麻豆精品| 久久国产人妖系列| 一区二区三区四区视频精品免费| 欧美一区二区三区在线看 | 91精品国产综合久久久久久久久久 | 最新不卡av在线| 日韩亚洲欧美综合| 色偷偷一区二区三区| 久久精品国产亚洲a| 亚洲免费三区一区二区| 精品免费99久久| 欧美日韩三级一区二区| 成人av网在线| 国产在线一区观看| 日韩专区中文字幕一区二区| 中文欧美字幕免费| 日韩欧美高清dvd碟片| 91官网在线免费观看| 高清成人在线观看|