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

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

?? freefifo.vhd

?? 本文為verilog的源代碼
?? VHD
?? 第 1 頁 / 共 4 頁
字號:

  ----------------------------------------------
  ----------------------------------------------
  process (clk, reset)
  begin
    if reset='1' then
      empty_int <= '1';
    elsif clk'event and clk='1' then
      if empty_int='1' and wr_allow='1' then
        empty_int <= '0';
      elsif count_int=aempty_count and rd_allow='1' and wr_allow='0' then
        empty_int <= '1';
      elsif count_int=empty_count then
        empty_int <= '1';
      else
        empty_int <= '0';
      end if;
    end if;
  end process;


  ----------------------------------------------
  ----------------------------------------------
  process (clk, reset)
  begin
    if reset='1' then
      full_int <= '0';
    elsif clk'event and clk='1' then
      if full_int='1' and rd_allow='1' then
        full_int <= '0';
      elsif count_int=afull_count and rd_allow='0' and wr_allow='1' then
        full_int <= '1';
      elsif count_int=full_count then
        full_int <= '1';
      else
        full_int <= '0';
      end if;
    end if;
  end process;

end arch_fifo_sync;




----------------------------------------------------------------------------
--  This is basically a test model.  It shows that the wrcount and rdcount
--  FIFO's are really made up of two seperate FIFO's.  But since the *_orig
--  FIFO's are slightly different than the "normal" ones, they are not
--  "pin" compatible.   The *_orig FIFO's are included here as reference
--  and "prior art".
----------------------------------------------------------------------------
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_wrcount_orig is
    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 fifo_wrcount_orig;

architecture arch_fifo_wrcount_orig of fifo_wrcount_orig is
  signal i_rd_en	:std_logic;
  signal i_rd_en2	:std_logic;
  signal i_wr_en	:std_logic;
  signal i_data1	:std_logic_vector (data_bits-1 downto 0);
  signal i_data2	:std_logic_vector (data_bits-1 downto 0);
  signal i_data3	:std_logic_vector (data_bits-1 downto 0);
  signal i_count	:std_logic_vector (addr_bits-1 downto 0);
  signal i_full1	:std_logic;
  signal i_empty1	:std_logic;
  signal i_full2	:std_logic;
  signal i_empty2	:std_logic;
  signal temp_valid	:std_logic;
  signal count_max 	:std_logic_vector (addr_bits-1 downto 0);

begin
  count_max <= (others=>'1');
  
  -- Misc signals
  full <= i_full1;
  empty <= i_empty2;
  count <= count_max - i_count;

  -- The Input FIFO
  U1: fifo_sync
        generic map (data_bits, addr_bits, block_type)
        port map (reset, wr_clk, wr_en, wr_data,
                  i_rd_en, i_data1, i_count, i_full1, i_empty1);

  -- The output FIFO
  U2: fifo_async
        generic map (data_bits, addr_bits, block_type, fifo_arch)
        port map (reset,
                  wr_clk, i_wr_en, i_data3,
                  rd_clk, rd_en, rd_data, i_full2, i_empty2);
                  

  -- Generate the read enables
  i_rd_en <= '1' when i_empty1='0' and i_full2='0' else '0';

  process (reset, wr_clk)
  begin
    if reset='1' then
      i_rd_en2 <= '0';
    elsif wr_clk'event and wr_clk='1' then
      i_rd_en2 <= i_rd_en;
    end if;
  end process;

  -- Latch the data into a temp buffer if the read FIFO is full
  process (reset, wr_clk)
  begin
    if reset='1' then
      i_data2 <= (others=>'0');
    elsif wr_clk'event and wr_clk='1' then
      if i_full2='1' and i_rd_en2='1' then
        i_data2 <= i_data1;
      end if;
    end if;
  end process;

  -- Track if the temp buffer is being used
  process (reset, wr_clk)
  begin
    if reset='1' then
      temp_valid<='0';
    elsif wr_clk'event and wr_clk='1' then
      if i_full2='1' and i_rd_en2='1' then
        temp_valid <= '1';
      elsif i_full2='0' then
        temp_valid <= '0';
      end if;
    end if;
  end process;
  

  -- Generate the write enable signal
  i_wr_en <= '1' when temp_valid='1' else
             '1' when i_rd_en2='1'   else
             '0';
        
  -- Generate the input data to the read fifo
  i_data3 <= i_data1 when temp_valid='0' else i_data2;


end arch_fifo_wrcount_orig;


----------------------------------------------------------------------------
--  This is basically a test model.  It shows that the wrcount and rdcount
--  FIFO's are really made up of two seperate FIFO's.  But since the *_orig
--  FIFO's are slightly different than the "normal" ones, they are not
--  "pin" compatible.   The *_orig FIFO's are included here as reference
--  and "prior art".
----------------------------------------------------------------------------
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_rdcount_orig is
    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 fifo_rdcount_orig;

architecture arch_fifo_rdcount_orig of fifo_rdcount_orig is
  signal i_rd_en	:std_logic;
  signal i_rd_en2	:std_logic;
  signal i_wr_en	:std_logic;
  signal i_data1	:std_logic_vector (data_bits-1 downto 0);
  signal i_data2	:std_logic_vector (data_bits-1 downto 0);
  signal i_data3	:std_logic_vector (data_bits-1 downto 0);
  signal i_count	:std_logic_vector (addr_bits-1 downto 0);
  signal i_full1	:std_logic;
  signal i_empty1	:std_logic;
  signal i_full2	:std_logic;
  signal i_empty2	:std_logic;
  signal temp_valid	:std_logic;

begin
  -- Misc signals
  full <= i_full1;
  empty <= i_empty2;
  count <= i_count;

  -- The Input FIFO
  U1: fifo_async
        generic map (data_bits, addr_bits, block_type, fifo_arch)
        port map (reset,
                  wr_clk, wr_en, wr_data,
                  rd_clk, i_rd_en, i_data1, i_full1, i_empty1);
                  

  -- The output FIFO
  U2: fifo_sync
        generic map (data_bits, addr_bits, block_type)
        port map(reset, rd_clk, i_wr_en, i_data3,
                 rd_en, rd_data, i_count, i_full2, i_empty2);
                
  -- Generate the read enables
  i_rd_en <= '1' when i_empty1='0' and i_full2='0' else '0';

  process (reset, rd_clk)
  begin
    if reset='1' then
      i_rd_en2 <= '0';
    elsif rd_clk'event and rd_clk='1' then
      i_rd_en2 <= i_rd_en;
    end if;
  end process;

  -- Latch the data into a temp buffer if the read FIFO is full
  process (reset, rd_clk)
  begin
    if reset='1' then
      i_data2 <= (others=>'0');
    elsif rd_clk'event and rd_clk='1' then
      if i_full2='1' and i_rd_en2='1' then
        i_data2 <= i_data1;
      end if;
    end if;
  end process;

  -- Track if the temp buffer is being used
  process (reset, rd_clk)
  begin
    if reset='1' then
      temp_valid<='0';
    elsif rd_clk'event and rd_clk='1' then
      if i_full2='1' and i_rd_en2='1' then
        temp_valid <= '1';
      elsif i_full2='0' then
        temp_valid <= '0';
      end if;
    end if;
  end process;
  

  -- Generate the write enable signal
  i_wr_en <= '1' when temp_valid='1' else
             '1' when i_rd_en2='1'   else
             '0';
        
  -- Generate the input data to the read fifo
  i_data3 <= i_data1 when temp_valid='0' else i_data2;


end arch_fifo_rdcount_orig;

----------------------------------------------------------------------------
----------------------------------------------------------------------------
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_wrcount is
    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 fifo_wrcount;

architecture arch_fifo_wrcount of fifo_wrcount is
  signal wrptr_bin	:std_logic_vector (addr_bits-1 downto 0);
  signal wrptr		:std_logic_vector (addr_bits-1 downto 0);
  signal wrptr1		:std_logic_vector (addr_bits-1 downto 0);

  signal rdptr_bin	:std_logic_vector (addr_bits-1 downto 0);
  signal rdptr		:std_logic_vector (addr_bits-1 downto 0);
  signal rdptr_max	:std_logic_vector (addr_bits-1 downto 0);
  signal rdptr_max_bin	:std_logic_vector (addr_bits-1 downto 0);

  signal midptr_bin	:std_logic_vector (addr_bits-1 downto 0);
  signal midptr 	:std_logic_vector (addr_bits-1 downto 0);
  signal midptr1	:std_logic_vector (addr_bits-1 downto 0);

  signal wf_count	:std_logic_vector (addr_bits-1 downto 0);
  
  signal wf_full_match	:std_logic;
  signal wf_empty_match	:std_logic;
  signal wf_aempty_match:std_logic;
  signal rf_full_match	:std_logic;
  signal rf_empty_match	:std_logic;

  signal wf_full_int	:std_logic;
  signal wf_empty_int	:std_logic;
  signal rf_full_int	:std_logic;
  signal rf_empty_int	:std_logic;
  
  signal rd_allow	:std_logic;
  signal wr_allow	:std_logic;
  signal mid_allow	:std_logic;

begin
  empty <= rf_empty_int;
  full <= wf_full_int;
  count <= wf_count;

  ---------------------------------------------------------------
  -- Generate the read/write allow signals
  ---------------------------------------------------------------
  rd_allow <= '1' when rd_en='1' and rf_empty_int='0' else '0';
  wr_allow <= '1' when wr_en='1' and wf_full_int='0' else '0';
  mid_allow <= '1' when wf_empty_int='0' and rf_full_int='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, wrptr, wr_data,
                         rd_clk, rdptr, rd_data);

  ---------------------------------------------------------------
  --  Generate the write addresses
  ---------------------------------------------------------------
  process (wr_clk, reset)
    variable addr	:std_logic_vector (wrptr_bin'range);
  begin
    if reset='1' then
      addr := (others=>'0');
      wrptr <= bin_to_gray (addr);
      addr := addr + 1;
      wrptr1 <= bin_to_gray (addr);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美一区二区三区孕妇| 日韩亚洲欧美一区| 欧美体内she精高潮| 制服丝袜亚洲网站| 2014亚洲片线观看视频免费| 国产精品女主播av| 亚洲国产精品嫩草影院| 久久国产麻豆精品| 91丨九色porny丨蝌蚪| 亚洲精品日产精品乱码不卡| 三级在线观看一区二区| 国产成人免费视频一区| 在线视频国内自拍亚洲视频| 日韩欧美色综合网站| 中文字幕日韩一区| 青青草97国产精品免费观看| 成人网在线播放| 欧美电影一区二区三区| 中文字幕+乱码+中文字幕一区| 亚洲影视在线观看| 国产盗摄一区二区三区| 欧美色倩网站大全免费| 日本一区二区三区高清不卡| 三级欧美韩日大片在线看| 成人免费观看男女羞羞视频| 国产精品亚洲人在线观看| 国产精品少妇自拍| 亚洲一区二区免费视频| 国产精品一区不卡| 欧美日韩一区二区三区四区| 国产欧美一区二区精品秋霞影院| 亚洲成人免费观看| 欧美成人性福生活免费看| 国产精品成人网| 日本vs亚洲vs韩国一区三区二区 | 色综合天天性综合| 久久综合九色综合97婷婷| 亚洲午夜精品在线| 成人黄色免费短视频| 精品国产一区二区三区不卡| 亚洲高清不卡在线| 99久久精品国产导航| 久久天堂av综合合色蜜桃网| 日韩精品福利网| 欧美在线视频全部完| 亚洲免费观看高清完整版在线 | 精品成人a区在线观看| 亚洲无线码一区二区三区| 国产不卡视频在线观看| 精品国产乱子伦一区| 天天色综合成人网| 在线观看亚洲精品| 亚洲美女视频在线观看| 成人性生交大片免费看中文 | 国产黄人亚洲片| 精品日韩在线一区| 日本特黄久久久高潮| 欧美日韩一区在线观看| 亚洲主播在线播放| 91成人免费在线| 亚洲日本在线视频观看| www.色精品| 亚洲成人av电影在线| 一本大道av伊人久久综合| 国产精品不卡在线| 成人中文字幕电影| 亚洲国产经典视频| 粉嫩13p一区二区三区| 欧美韩国日本一区| 懂色av噜噜一区二区三区av| 国产视频911| 成人精品鲁一区一区二区| 国产精品丝袜一区| 99re8在线精品视频免费播放| 成人欧美一区二区三区小说| 91在线看国产| 亚洲一区在线视频| 欧美巨大另类极品videosbest | 日韩西西人体444www| 美女在线一区二区| 精品久久久三级丝袜| 国产在线不卡一卡二卡三卡四卡| 久久久一区二区三区捆绑**| 国产成人在线视频网址| 中文字幕中文乱码欧美一区二区| 91伊人久久大香线蕉| 亚洲已满18点击进入久久| 宅男在线国产精品| 国产一区二三区好的| 中文字幕精品一区| 欧洲国内综合视频| 青青青爽久久午夜综合久久午夜| 精品日韩成人av| 成人深夜福利app| 亚洲精品菠萝久久久久久久| 精品视频1区2区3区| 久草在线在线精品观看| 欧美极品xxx| 色婷婷综合在线| 日韩精品视频网| 久久亚洲影视婷婷| 91丝袜高跟美女视频| 亚洲国产视频一区| 26uuu另类欧美| 一道本成人在线| 日本不卡在线视频| 国产精品网站一区| 欧美日韩精品欧美日韩精品| 精品一区二区三区免费播放 | 在线日韩一区二区| 蜜桃精品在线观看| 日本一区二区三级电影在线观看| 日本韩国精品在线| 韩国毛片一区二区三区| 亚洲男同1069视频| 精品黑人一区二区三区久久| 成人av综合一区| 美女一区二区三区| 成人免费一区二区三区视频 | 国产乱码一区二区三区| 亚洲精品国产视频| 精品国产乱码久久久久久蜜臀| 99精品视频中文字幕| 青青青伊人色综合久久| 亚洲色图视频网站| 欧美精品一区二区三区四区| 91成人国产精品| 国产精品综合网| 日韩精品电影在线观看| 亚洲欧洲日产国产综合网| 日韩午夜av一区| 欧美艳星brazzers| 国产成人免费av在线| 日本成人在线网站| 有码一区二区三区| 国产欧美视频一区二区| 欧美一区二区三区视频免费 | 亚洲激情图片一区| 久久天堂av综合合色蜜桃网| 欧美日韩激情在线| 不卡视频免费播放| 国产一区二区三区久久久| 五月天婷婷综合| 亚洲欧美日韩一区| 中文字幕第一区二区| 欧美xxxxx牲另类人与| 欧美性受xxxx黑人xyx性爽| 成人91在线观看| 国产米奇在线777精品观看| 水野朝阳av一区二区三区| 亚洲日本护士毛茸茸| 欧美激情艳妇裸体舞| 亚洲精品在线电影| 日韩一本二本av| 欧美午夜精品久久久| 99re这里只有精品首页| 高清在线不卡av| 国产在线精品一区二区不卡了| 日韩专区欧美专区| 亚洲成人你懂的| 一区二区三区在线视频观看| 国产精品久久毛片| 国产日韩在线不卡| 久久综合999| 欧美va亚洲va国产综合| 制服丝袜日韩国产| 7777精品久久久大香线蕉| 欧洲另类一二三四区| 99riav一区二区三区| 99视频一区二区三区| 9人人澡人人爽人人精品| 国产成人精品一区二区三区四区| 久久国产精品99精品国产| 日韩国产高清影视| 天天操天天综合网| 亚洲国产综合色| 午夜视频一区二区| 午夜精品久久久久久久99水蜜桃| 一区二区三区日韩欧美| 一区二区三区在线视频播放| 亚洲免费在线观看| 亚洲男人的天堂一区二区| 一区二区三区不卡视频在线观看| 亚洲另类在线一区| 亚洲国产日韩一级| 天天综合网 天天综合色| 午夜精品久久一牛影视| 午夜a成v人精品| 免费观看成人鲁鲁鲁鲁鲁视频| 久久国产福利国产秒拍| 国产一区二区免费在线| 国产黄人亚洲片| av网站免费线看精品| 一本色道久久综合亚洲aⅴ蜜桃| 91免费看视频| 欧美写真视频网站| 欧美一区二区三区四区久久| 精品久久久久久无| 国产色产综合色产在线视频| 国产精品伦理在线|