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

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

?? freefifo.vhd

?? 常見的輸入輸出及存儲器件(ram及fifo)vhdl實現
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--  The Free IP Project
--  VHDL Free-FIFO Core
--  (c) 2000, The Free IP Project and David Kessner
--
--
--  FREE IP GENERAL PUBLIC LICENSE
--  TERMS AND CONDITIONS FOR USE, COPYING, DISTRIBUTION, AND MODIFICATION
--
--  1.  You may copy and distribute verbatim copies of this core, as long
--      as this file, and the other associated files, remain intact and
--      unmodified.  Modifications are outlined below.  
--  2.  You may use this core in any way, be it academic, commercial, or
--      military.  Modified or not.  
--  3.  Distribution of this core must be free of charge.  Charging is
--      allowed only for value added services.  Value added services
--      would include copying fees, modifications, customizations, and
--      inclusion in other products.
--  4.  If a modified source code is distributed, the original unmodified
--      source code must also be included (or a link to the Free IP web
--      site).  In the modified source code there must be clear
--      identification of the modified version.
--  5.  Visit the Free IP web site for additional information.
--      http://www.free-ip.com
--
----------------------------------------------------------------------------
----------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

package free_fifo is
  component fifo_sync
    generic (data_bits  :integer;
             addr_bits  :integer;
             block_type :integer := 0);
    port (reset		:in std_logic;
          clk		:in std_logic;
          wr_en		:in std_logic;
          wr_data	:in std_logic_vector (data_bits-1 downto 0);
          rd_en		:in std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          count		:out std_logic_vector (addr_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;
          
             
  component fifo_async
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             fifo_arch  :integer := 0); -- 0=Generic architecture, 1=Xilinx, 2=Xilinx w/carry
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;


  component fifo_wrcount
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             async_size :integer := 16); 
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          count		:out std_logic_vector (addr_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;


  component fifo_wrcount_orig
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             fifo_arch  :integer := 0); -- 0=Generic architecture, 1=Xilinx, 2=Xilinx w/carry
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          count		:out std_logic_vector (addr_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;
  

  component fifo_rdcount
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             async_size :integer := 16); 
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          count		:out std_logic_vector (addr_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;

  component fifo_rdcount_orig
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             fifo_arch  :integer := 0); -- 0=Generic architecture, 1=Xilinx, 2=Xilinx w/carry
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          count		:out std_logic_vector (addr_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;


  component fifo_async_xilinx
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             fpga_type  :integer := 0);  -- 0=generic VHDL, 1=Xilinx Spartan2/Virtex
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          full_out	:out std_logic;
          empty_out	:out std_logic
         );
  end component;

  component fifo_async_generic
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0);
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          full		:out std_logic;
          empty		:out std_logic
         );
  end component;

  function bin_to_gray(din :std_logic_vector)
      return std_logic_vector;
      
end package;

----------------------------------------------------------------------------
----------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
library work;
use work.free_fifo.all;

package body free_fifo is

  function bin_to_gray(din :std_logic_vector)
      return std_logic_vector is
    variable dout :std_logic_vector(din'range);
  begin
    dout := din xor ("0" & din(din'high downto 1));
    return dout;
  end bin_to_gray;
  
end free_fifo;


----------------------------------------------------------------------------
----------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
library work;
use work.free_fifo.all;
use work.ram_lib.all;


entity fifo_async_xilinx is
    generic (data_bits	:integer;
             addr_bits  :integer;
             block_type	:integer := 0;
             fpga_type  :integer := 0);
    port (reset		:in  std_logic;
          wr_clk	:in  std_logic;
          wr_en		:in  std_logic;
          wr_data	:in  std_logic_vector (data_bits-1 downto 0);
          rd_clk	:in  std_logic;
          rd_en		:in  std_logic;
          rd_data	:out std_logic_vector (data_bits-1 downto 0);
          full_out	:out std_logic;
          empty_out	:out std_logic
         );
end fifo_async_xilinx;

architecture arch_fifo_async_xilinx of fifo_async_xilinx is
  signal full		:std_logic;
  signal empty		:std_logic;
  signal rd_allow	:std_logic;
  signal wr_allow	:std_logic;
  signal rd_addr	:std_logic_vector (addr_bits-1 downto 0);
  signal rd_addr_gray1	:std_logic_vector (addr_bits-1 downto 0);
  signal rd_addr_gray2	:std_logic_vector (addr_bits-1 downto 0);
  signal rd_addr_gray3	:std_logic_vector (addr_bits-1 downto 0);
  signal wr_addr	:std_logic_vector (addr_bits-1 downto 0);
  signal wr_addr_gray1	:std_logic_vector (addr_bits-1 downto 0);
  signal wr_addr_gray2	:std_logic_vector (addr_bits-1 downto 0);
  signal emptyg		:std_logic;
  signal almostemptyg	:std_logic;
  signal fullg		:std_logic;
  signal almostfullg	:std_logic;

  signal always_one   :std_logic;
  signal always_zero  :std_logic;
  
  -- MUXCY_L -- 2-to-1 Multiplexer for Carry Logic with Local Output
  -- Applies only to the Xilinx Virtex and Spartan-II FPGA's
  -- http://toolbox.xilinx.com/docsan/2_1i/data/common/lib/lib7_35.htm
  -- VHDL Equivalent:   LO <= DI when S='0' else CI;
  component MUXCY_L
     port (
        DI:  IN std_logic;
        CI:  IN std_logic;
        S:   IN std_logic;
        LO: OUT std_logic);
  END component;

  -- Note:  These signals are only used for the Xilinx version (fpga_type=1)
  signal ecomp		:std_logic_vector (addr_bits-1 downto 0);
  signal aecomp		:std_logic_vector (addr_bits-1 downto 0);
  signal fcomp		:std_logic_vector (addr_bits-1 downto 0);
  signal afcomp		:std_logic_vector (addr_bits-1 downto 0);
  signal emuxcyo	:std_logic_vector (addr_bits-1 downto 0);
  signal aemuxcyo	:std_logic_vector (addr_bits-1 downto 0);
  signal fmuxcyo	:std_logic_vector (addr_bits-1 downto 0);
  signal afmuxcyo	:std_logic_vector (addr_bits-1 downto 0);
  signal ecin		:std_logic;
  signal aecin		:std_logic;
  signal fcin		:std_logic;
  signal afcin		:std_logic;

begin
  always_one <= '1';
  always_zero <= '0';

  ---------------------------------------------------------------
  -- Generate the read/write allow signals
  ---------------------------------------------------------------
  rd_allow <= '1' when rd_en='1' and empty='0' else '0';
  wr_allow <= '1' when wr_en='1' and full='0' else '0';

  ---------------------------------------------------------------
  -- Instantiate the RAM
  ---------------------------------------------------------------
  fifo_ram: ram_dp
               generic map (addr_bits => addr_bits,
                            data_bits => data_bits,
                            register_out_flag => 1,
                            block_type => block_type)
               port map (reset,
                         wr_clk, wr_allow, wr_addr_gray2, wr_data,
                         rd_clk, rd_addr_gray2, rd_data);

  ---------------------------------------------------------------
  -- Generate the read addresses & pipelined gray-code versions  
  -- If you're reading along in the Xilinx XAPP174, here's the conversion chart:
  --   rd_addr_gray1 == read_nextgray
  --   rd_addr_gray2 == read_addrgray
  --   rd_addr_gray3 == read_lastgray
  --
  --  The addr and gray-code reset procedure has been designed
  --  to be more "dumb-proof" when parameterized.  The initial
  --  values are different than the Xilinx version.
  ---------------------------------------------------------------
  process (rd_clk, reset)
    variable addr	:std_logic_vector (rd_addr'range);
  begin
    if reset='1' then
      addr := (others=>'0');
      rd_addr_gray3 <= bin_to_gray (addr);
      addr := addr + 1;
      rd_addr_gray2 <= bin_to_gray (addr);
      addr := addr + 1;
      rd_addr_gray1 <= bin_to_gray (addr);
      addr := addr + 1;
      rd_addr <= addr;
    elsif rd_clk'event and rd_clk='1' then
      if rd_allow='1' then
        rd_addr_gray3 <= rd_addr_gray2;
        rd_addr_gray2 <= rd_addr_gray1;
        rd_addr_gray1 <= bin_to_gray(rd_addr);
        rd_addr <= rd_addr + 1;
      end if;
    end if;
  end process;

  ---------------------------------------------------------------
  --  Generate the write addresses & pipelined gray-code versions
  --    wr_addr_gray1 == write_nextgray
  --    wr_addr_gray2 == write_addrgray
  ---------------------------------------------------------------
  process (wr_clk, reset)
    variable addr	:std_logic_vector (rd_addr'range);
  begin
    if reset='1' then
      addr := (others=>'0');
      --wr_addr_gray3 <= bin_to_gray (addr);  -- There isn't a wr_addr_gray3
      addr := addr + 1;
      wr_addr_gray2 <= bin_to_gray (addr);
      addr := addr + 1;
      wr_addr_gray1 <= bin_to_gray (addr);
      addr := addr + 1;
      wr_addr <= addr;
    elsif wr_clk'event and wr_clk='1' then
      if wr_allow='1' then
        wr_addr_gray2 <= wr_addr_gray1;
        wr_addr_gray1 <= bin_to_gray(wr_addr);
        wr_addr <= wr_addr + 1;
      end if;
    end if;
  end process;
  

  ---------------------------------------------------------------
  --  Generate Empty
  ---------------------------------------------------------------
  process (rd_clk, reset)
  begin
    if reset='1' then
      empty <= '1';
    elsif rd_clk'event and rd_clk='1' then
      if emptyg='1' or (almostemptyg='1' and rd_allow='1') then
        empty <= '1';
      else
        empty <= '0';
      end if;
    end if;
  end process;

  empty_out <= empty;

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线免费观看 | 看国产成人h片视频| 精品日本一线二线三线不卡| a级高清视频欧美日韩| 麻豆一区二区三| 一区二区三区蜜桃网| 国产亚洲成aⅴ人片在线观看| 精品视频免费看| 丁香亚洲综合激情啪啪综合| 日本成人在线一区| 亚洲男同性视频| 亚洲国产高清不卡| 欧美va在线播放| 欧美日韩国产bt| 91麻豆国产福利精品| 国产宾馆实践打屁股91| 麻豆91精品91久久久的内涵| 亚洲一区二区成人在线观看| 国产精品情趣视频| 久久蜜臀中文字幕| 日韩免费电影一区| 欧美日韩成人综合天天影院| 色欲综合视频天天天| 不卡av电影在线播放| 国产乱国产乱300精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲综合无码一区二区| 国产精品美女久久久久av爽李琼| 亚洲精品在线免费播放| 日韩一区二区精品在线观看| 欧美三级三级三级| 在线视频你懂得一区二区三区| bt欧美亚洲午夜电影天堂| 国产九色sp调教91| 国产美女在线精品| 精彩视频一区二区三区| 老司机一区二区| 免费av成人在线| 久久66热re国产| 精品一区二区三区av| 久久91精品久久久久久秒播| 久久er99精品| 国产美女精品在线| 国产乱子伦视频一区二区三区| 久久精品国产在热久久| 久久国产免费看| 国产精品一二二区| 国产成人免费xxxxxxxx| 懂色av中文一区二区三区| 成人激情黄色小说| 色综合久久88色综合天天6| 色综合色狠狠综合色| 在线观看www91| 欧美二区在线观看| 日韩免费看的电影| 中文字幕精品—区二区四季| 中文成人综合网| 亚洲免费观看高清完整版在线| 亚洲一区二区三区四区五区黄| 午夜国产精品一区| 国产一区免费电影| 99久久99久久综合| 91黄视频在线观看| 欧美一区二区三区免费观看视频| 精品免费国产二区三区| 国产精品欧美精品| 亚洲午夜精品在线| 久久狠狠亚洲综合| 丰满白嫩尤物一区二区| 91首页免费视频| 欧美一区二区视频在线观看| 久久九九99视频| 亚洲人午夜精品天堂一二香蕉| 亚洲图片欧美色图| 极品少妇xxxx精品少妇| 成人黄色片在线观看| 精品视频全国免费看| 久久久国产精品不卡| 亚洲精品日韩综合观看成人91| 日韩高清在线电影| 国产91在线看| 911精品国产一区二区在线| 久久久蜜臀国产一区二区| 亚洲精品写真福利| 国产一区啦啦啦在线观看| 91视频国产资源| 日韩亚洲电影在线| 国产精品素人视频| 男女性色大片免费观看一区二区| 成人一区二区三区中文字幕| 欧美日韩国产天堂| 国产精品国产三级国产普通话三级 | 欧美伊人久久久久久午夜久久久久| 在线成人午夜影院| 国产精品乱码一区二三区小蝌蚪| 性欧美疯狂xxxxbbbb| 成人开心网精品视频| 6080yy午夜一二三区久久| 国产精品乱码妇女bbbb| 美腿丝袜亚洲综合| 欧美影院一区二区三区| 国产欧美日韩另类视频免费观看| 五月天视频一区| 97国产精品videossex| 久久亚洲一级片| 亚洲.国产.中文慕字在线| 成人av免费网站| 精品国产乱码久久久久久闺蜜| 一区二区三区在线观看视频| 成人性色生活片| 欧美成人猛片aaaaaaa| 亚洲国产欧美在线| 91欧美一区二区| 国产日韩三级在线| 激情综合色综合久久| 欧美久久久一区| 亚洲主播在线播放| 色综合久久综合| 国产精品私房写真福利视频| 国产精品一区二区在线看| 欧美一区二区三区视频免费播放| 亚洲精品videosex极品| fc2成人免费人成在线观看播放| 精品国产精品一区二区夜夜嗨| 午夜国产不卡在线观看视频| 亚洲综合视频在线观看| 99精品久久99久久久久| 国产精品美女一区二区在线观看| 国产麻豆9l精品三级站| 亚洲精品一区二区三区蜜桃下载| 日韩av电影天堂| 欧美高清激情brazzers| 亚洲自拍偷拍网站| 欧美系列一区二区| 亚洲一区二区欧美激情| 91成人免费在线视频| 一区二区三区四区五区视频在线观看| 99热国产精品| 亚洲欧美福利一区二区| 色噜噜狠狠一区二区三区果冻| 亚洲精品自拍动漫在线| 在线观看国产日韩| 天天爽夜夜爽夜夜爽精品视频| 欧美日韩不卡在线| 免费高清在线视频一区·| 精品国内片67194| 国产精品12区| 国产精品福利在线播放| 91影院在线免费观看| 亚洲一二三四区不卡| 91精品国产91久久久久久一区二区 | 4hu四虎永久在线影院成人| 丝袜亚洲精品中文字幕一区| 337p亚洲精品色噜噜狠狠| 美女脱光内衣内裤视频久久网站| 欧美mv日韩mv亚洲| 成人丝袜18视频在线观看| 日韩毛片视频在线看| 欧美系列亚洲系列| 美女一区二区三区| 中文字幕av一区二区三区| 在线免费观看日本一区| 日韩高清不卡在线| 国产色一区二区| 日本久久电影网| 青青草视频一区| 欧美国产一区视频在线观看| 91九色02白丝porn| 自拍偷拍欧美精品| 911精品国产一区二区在线| 国产精品一二三区在线| 亚洲精品免费一二三区| 欧美一二三区在线| 成人毛片在线观看| 日韩av电影免费观看高清完整版在线观看| 精品国免费一区二区三区| 色哟哟一区二区| 久久国产三级精品| 怡红院av一区二区三区| 日韩美女在线视频| 日本精品免费观看高清观看| 久久9热精品视频| 亚洲精品一二三区| 久久综合久色欧美综合狠狠| 色乱码一区二区三区88| 黄色成人免费在线| 亚洲制服欧美中文字幕中文字幕| 久久久噜噜噜久久人人看 | 青青草国产成人av片免费| 久久精品欧美一区二区三区麻豆| 欧美在线色视频| 国产精品白丝av| 婷婷丁香激情综合| 国产精品美女久久久久久久| 日韩免费视频线观看| 欧美性猛交xxxx黑人交 | 欧美一区二区三区白人| 波多野结衣中文一区| 麻豆精品视频在线观看视频| 亚洲人亚洲人成电影网站色|