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

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

?? test_synth_dp2.vhd

?? 常見的輸入輸出及存儲器件(ram及fifo)vhdl實現(xiàn)
?? VHD
字號:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--  The Free IP Project
--  VHDL Free-RAM Core
--  (c) 1999, 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;
library work;
use work.ram_lib.all;


entity ram_test is
  port (reset		:in std_logic;
        clk1		:in std_logic;
        clk2		:in std_logic;
        failure1	:buffer std_logic;
        failure2	:buffer std_logic);
end ram_test;


architecture arch_ram_test of ram_test is
--  signal reset		:std_logic := '1';
  signal mask		:std_logic_vector (31 downto 0);
  type STATES is (WRITE, READ);

--  signal clk1		:std_logic := '1';
  signal state1		:states;
  signal state_reg1	:states;
  signal addr1		:std_logic_vector (8 downto 0);
  signal addr_in1	:std_logic_vector (addr1'high+1 downto 0);
  signal din1		:std_logic_vector (7 downto 0);
  signal dout1		:std_logic_vector (din1'range);
  signal write_enable1	:std_logic;
  signal rand1_1	:std_logic_vector (mask'range);
  signal rand2_1	:std_logic_vector (mask'range);
  signal rand2_reg_1 	:std_logic_vector (mask'range);
  signal addr_top1	:std_logic;
--  signal failure1 	:std_logic;

--  signal clk2		:std_logic := '1';
  signal state2		:states;
  signal state_reg2	:states;
  signal addr2		:std_logic_vector (addr1'range);
  signal addr_in2	:std_logic_vector (addr1'high+1 downto 0);
  signal din2		:std_logic_vector (din1'range);
  signal dout2		:std_logic_vector (din1'range);
  signal write_enable2	:std_logic;
  signal rand1_2	:std_logic_vector (mask'range);
  signal rand2_2	:std_logic_vector (mask'range);
  signal rand2_reg_2 	:std_logic_vector (mask'range);
  signal addr_top2	:std_logic;
--  signal failure2	:std_logic;

  signal addr_max	:std_logic_vector (addr1'range);

begin
--  reset <= '1' after 0 ns, '0' after 125 ns;
  mask <= "10100011000000000000000000000000";  -- 0xA3000000
  addr_max <= (others=>'1');


--  process (clk1)
--  begin
--    if clk1='1' then
--      clk1 <= '0' after 20 ns, '1' after 40 ns;
--    end if;
--  end process;
--
--  process (clk2)
--  begin
--    if clk2='1' then
--      clk2 <= '0' after 21 ns, '1' after 42 ns;
--    end if;
--  end process;



  -- The address counter
  process (reset, clk1)
  begin
    if reset='1' then
      addr1 <= (others=>'0');
    elsif clk1'event and clk1='1' then
      addr1 <= addr1 + 1;
    end if;
  end process;

  process (reset, clk2)
  begin
    if reset='1' then
      addr2 <= (others=>'0');
    elsif clk2'event and clk2='1' then
      addr2 <= addr2 + 1;
    end if;
  end process;


  -- The addr_top signal
  addr_top1 <= '1' when addr1=addr_max else '0';
  addr_top2 <= '1' when addr2=addr_max else '0';
  

  -- The state machine
  process (reset, clk1)
  begin
    if reset='1' then
      state1 <= WRITE;
    elsif clk1'event and clk1='1' then
      case state1 is
        when WRITE =>
            if addr_top1='1' then
              state1 <= READ;
            end if;
            
        when READ =>
            if addr_top1='1' then
              state1 <= WRITE;
            end if;
            
        when others =>
            state1 <= WRITE;
      end case;
    end if;
  end process;


  process (reset, clk2)
  begin
    if reset='1' then
      state2 <= WRITE;
    elsif clk2'event and clk2='1' then
      case state2 is
        when WRITE =>
            if addr_top2='1' then
              state2 <= READ;
            end if;
            
        when READ =>
            if addr_top2='1' then
              state2 <= WRITE;
            end if;
            
        when others =>
            state2 <= WRITE;
      end case;
    end if;
  end process;


  -- Generate a delayed version of state
  process (reset, clk1)
  begin
    if reset='1' then
      state_reg1 <= WRITE;
    elsif clk1'event and clk1='1' then
      state_reg1 <= state1;
    end if;
  end process;

  process (reset, clk2)
  begin
    if reset='1' then
      state_reg2 <= WRITE;
    elsif clk2'event and clk2='1' then
      state_reg2 <= state2;
    end if;
  end process;


  -- The write data generator
  process (reset, clk1)
  begin
    if reset='1' then
      rand1_1 <= (others => '1');
    elsif clk1'event and clk1='1' then
      if state1=WRITE then
        if rand1_1(0)='1' then
          rand1_1 <= ("0" & rand1_1(rand1_1'high downto 1)) xor mask;
        else
          rand1_1 <= ("0" & rand1_1(rand1_1'high downto 1));
        end if;
      end if;
    end if;
  end process;

  addr_in1 <= "0" & addr1;
  din1 <= rand1_1(din1'range);


  process (reset, clk2)
  begin
    if reset='1' then
      rand1_2 <= (others => '1');
    elsif clk2'event and clk2='1' then
      if state2=WRITE then
        if rand1_2(0)='1' then
          rand1_2 <= ("0" & rand1_2(rand1_2'high downto 1)) xor mask;
        else
          rand1_2 <= ("0" & rand1_2(rand1_2'high downto 1));
        end if;
      end if;
    end if;
  end process;

  addr_in2 <= "1" & addr2;
  din2 <= rand1_2(din2'range);


  -- The READ data generator
  process (reset, clk1)
  begin
    if reset='1' then
      rand2_1 <= (others => '1');
      rand2_reg_1 <= (others => '1');
    elsif clk1'event and clk1='1' then
      rand2_reg_1 <= rand2_1;
      
      if state1=READ then
        if rand2_1(0)='1' then
          rand2_1 <= ("0" & rand2_1(rand2_1'high downto 1)) xor mask;
        else
          rand2_1 <= ("0" & rand2_1(rand2_1'high downto 1));
        end if;
      end if;
    end if;
  end process;

  process (reset, clk2)
  begin
    if reset='1' then
      rand2_2 <= (others => '1');
      rand2_reg_2 <= (others => '1');
    elsif clk2'event and clk2='1' then
      rand2_reg_2 <= rand2_2;
      
      if state2=READ then
        if rand2_2(0)='1' then
          rand2_2 <= ("0" & rand2_2(rand2_2'high downto 1)) xor mask;
        else
          rand2_2 <= ("0" & rand2_2(rand2_2'high downto 1));
        end if;
      end if;
    end if;
  end process;


  -- Write Enable
  process (reset, clk1)
  begin
    if reset='1' then
      write_enable1 <= '1';
    elsif clk1'event and clk1='1' then
      if addr_top1='1' then
        if state1=READ then
          write_enable1 <= '1';
        else
          write_enable1 <= '0';
        end if;
      elsif state1=WRITE then
        write_enable1 <= '1';
      else
        write_enable1 <= '0';
      end if;
    end if;
  end process;

  process (reset, clk2)
  begin
    if reset='1' then
      write_enable2 <= '1';
    elsif clk2'event and clk2='1' then
      if addr_top2='1' then
        if state2=READ then
          write_enable2 <= '1';
        else
          write_enable2 <= '0';
        end if;
      elsif state2=WRITE then
        write_enable2 <= '1';
      else
        write_enable2 <= '0';
      end if;
    end if;
  end process;


  -- The RAM under test
  U1: ram_dp2
  	generic map (addr_bits => addr_in1'high+1,
  	             data_bits => din1'high+1,
  	             block_type => 0)
  	port map (reset,
                  clk1, write_enable1, addr_in1, din1, dout1,
                  clk2, write_enable2, addr_in2, din2, dout2);

  -- Generate the failure signal
  process (reset, clk1)
  begin
    if reset='1' then
      failure1 <= '0';
    elsif clk1'event and clk1='1' then
      if failure1='0' then
        if state_reg1=READ then
          if dout1/=rand2_reg_1(dout2'range) then
            failure1 <= '1';
--            assert 1=0
--            report "Error in port 1."
--                    severity failure;           
          end if;
        end if;
      end if;
    end if;
  end process;

  process (reset, clk2)
  begin
    if reset='1' then
      failure2 <= '0';
    elsif clk2'event and clk2='1' then
      if failure2='0' then
        if state_reg2=READ then
          if dout2/=rand2_reg_2(dout2'range) then
            failure2 <= '1';
--            assert 1=0
--            report "Error in port 2."
--                    severity failure;
          end if;
        end if;
      end if;
    end if;
  end process;

end arch_ram_test;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜a成v人精品| 国产清纯白嫩初高生在线观看91 | 欧美性猛交xxxx乱大交退制版| 国产精品久久久一本精品| 成人不卡免费av| 亚洲欧美影音先锋| 在线观看亚洲成人| 天天影视涩香欲综合网| 欧美电视剧在线观看完整版| 国产乱码精品一区二区三| 中文字幕精品在线不卡| 色综合天天天天做夜夜夜夜做| 蜜桃精品视频在线观看| 欧美一区二区在线看| 国产精品一区二区久久精品爱涩| 中文字幕不卡在线观看| 欧美视频一区二区三区在线观看| 日韩成人免费在线| 中文字幕不卡在线观看| 欧美这里有精品| 精品一二三四区| 亚洲人123区| 欧美成人综合网站| av成人老司机| 日本成人超碰在线观看| 国产精品久久久久久久久久免费看 | 中文字幕在线观看一区二区| 色婷婷av一区二区三区软件| 青青草原综合久久大伊人精品 | 日韩一区二区三区观看| 成人av在线影院| 天天射综合影视| 蜜桃av一区二区三区电影| 中文字幕一区三区| 欧美一区二区二区| www.欧美色图| 久久99国产精品久久99| 亚洲裸体在线观看| 久久久久久一二三区| 欧美在线高清视频| 成人手机电影网| 美腿丝袜亚洲三区| 亚洲成人自拍偷拍| 国产精品久久久久毛片软件| 欧美日韩激情在线| 91在线免费播放| 国产精品91xxx| 麻豆91精品91久久久的内涵| 一区二区三区蜜桃网| 日本一二三四高清不卡| 欧美一区二区三区思思人| 一本大道av伊人久久综合| 国产精品一区在线观看乱码| 奇米影视一区二区三区小说| 亚洲一区二区三区精品在线| 中文字幕日韩一区二区| 久久日韩粉嫩一区二区三区 | 欧美不卡一区二区三区四区| 欧美综合视频在线观看| 一本一道久久a久久精品| 国产91精品一区二区麻豆网站| 秋霞午夜av一区二区三区| 亚洲小说欧美激情另类| 亚洲色图20p| 中文字幕高清一区| 久久久99精品免费观看| 欧美电影免费观看高清完整版在 | 亚洲精品一卡二卡| 国产精品久久久久国产精品日日| 久久久精品2019中文字幕之3| 日韩欧美精品在线视频| 日韩视频免费直播| 日韩视频免费观看高清在线视频| 欧美一区二区三区免费在线看| 欧美伦理视频网站| 91麻豆精品国产91久久久久久 | 青青草国产精品亚洲专区无| 日韩综合小视频| 爽爽淫人综合网网站| 天堂在线亚洲视频| 日韩黄色免费网站| 日韩av一区二| 国内成人免费视频| 懂色av一区二区在线播放| 成人激情校园春色| av电影一区二区| 欧美影院精品一区| 69成人精品免费视频| 日韩一区二区三区免费看 | 亚洲国产精品自拍| 婷婷开心激情综合| 麻豆免费看一区二区三区| 久久99国产精品久久99果冻传媒| 激情五月婷婷综合网| 豆国产96在线|亚洲| 91麻豆福利精品推荐| 欧美亚洲日本国产| 91麻豆精品91久久久久同性| 精品久久久久久久久久久久久久久 | 色综合久久久久久久久| 欧日韩精品视频| 91精品在线观看入口| 精品国产伦一区二区三区观看方式 | 国产精品欧美精品| 亚洲一区免费视频| 蜜乳av一区二区| 成人av影院在线| 欧美日韩不卡视频| 久久亚洲一区二区三区四区| 国产精品毛片无遮挡高清| 亚洲一区二区美女| 久久国产视频网| 一本大道av伊人久久综合| 日韩一区国产二区欧美三区| 中文字幕日本不卡| 免费看日韩a级影片| av电影在线不卡| 日韩视频中午一区| 亚洲精品免费视频| 久久99精品久久久久久久久久久久| 盗摄精品av一区二区三区| 欧美日韩免费一区二区三区| 久久久久久久综合| 亚洲国产视频一区| 成人精品国产一区二区4080| 在线综合+亚洲+欧美中文字幕| 国产精品视频麻豆| 秋霞午夜av一区二区三区| 91麻豆免费观看| 久久久99精品久久| 蜜桃传媒麻豆第一区在线观看| 91日韩一区二区三区| 久久久777精品电影网影网 | 久久奇米777| 日韩精品乱码av一区二区| 不卡的电影网站| 精品裸体舞一区二区三区| 一区二区久久久| 丰满亚洲少妇av| 精品99999| 青草av.久久免费一区| 欧美色图天堂网| 中文字幕一区二区三区在线不卡 | 五月天中文字幕一区二区| www.视频一区| 久久精品免费在线观看| 久久精品国产亚洲一区二区三区| 日本乱人伦aⅴ精品| 麻豆国产欧美一区二区三区| 欧美性一级生活| 亚洲乱码中文字幕| 成人免费视频视频在线观看免费| 欧美tickle裸体挠脚心vk| 日韩不卡一区二区| 7777精品久久久大香线蕉| 亚洲妇女屁股眼交7| 色噜噜久久综合| 亚洲免费在线看| 99视频有精品| 国产精品国产三级国产aⅴ入口| 国产成人免费在线观看不卡| 欧美精品一区二区三区四区| 麻豆成人av在线| 精品欧美乱码久久久久久1区2区| 日韩主播视频在线| 日韩一区二区在线看片| 免费人成在线不卡| 日韩一区二区在线观看视频 | 亚洲午夜久久久久中文字幕久| 91久久一区二区| 一区二区三区四区蜜桃| 色美美综合视频| 亚洲va欧美va人人爽| 欧美精品丝袜中出| 久久国产三级精品| 久久一区二区三区国产精品| 国产精品69久久久久水密桃| 国产欧美日本一区二区三区| av亚洲精华国产精华精| 亚洲男女毛片无遮挡| 欧美天天综合网| 日本欧美一区二区| 精品国产制服丝袜高跟| 国产成人av一区二区三区在线观看| 国产婷婷精品av在线| 91麻豆国产福利精品| 五月天亚洲精品| 欧美精品一区二区久久久| av激情亚洲男人天堂| 亚洲国产中文字幕| 精品久久久久久无| 91污片在线观看| 日韩综合小视频| 国产色产综合产在线视频| 91蜜桃网址入口| 日韩二区在线观看| 欧美激情中文不卡| 精品视频资源站| 国产一区二区三区免费| ...中文天堂在线一区|