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

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

?? timer_top_struct.vhd

?? :兩人乒乓球賽 Requires: D2SB and DIO4 with VGA monitor and PS2 Keyboard
?? VHD
字號:
-------------------------------------------------------------------------------
--                                                                           --
--  CPU86 - VHDL CPU8088 IP core                                             --
--  Copyright (C) 2005 HT-LAB                                                --
--                                                                           --
--  Contact : mailto:cpu86@ht-lab.com                                        --
--  Web: http://www.ht-lab.com                                               --
--                                                                           --
-------------------------------------------------------------------------------
--                                                                           --
--  This library is free software; you can redistribute it and/or            --
--  modify it under the terms of the GNU Lesser General Public               --
--  License as published by the Free Software Foundation; either             --
--  version 2.1 of the License, or (at your option) any later version.       --
--                                                                           --
--  This library is distributed in the hope that it will be useful,          --
--  but WITHOUT ANY WARRANTY; without even the implied warranty of           --
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        --
--  Lesser General Public License for more details.                          --
--                                                                           --
--  Full details of the license can be found in the file "copying.txt".      --
--                                                                           --
--  You should have received a copy of the GNU Lesser General Public         --
--  License along with this library; if not, write to the Free Software      --
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  --
--                                                                           --
-------------------------------------------------------------------------------
--
-- VHDL Architecture Timer.timer_top.symbol
--
-- Created: by - Hans 22/08/2005
-------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;

ENTITY timer_top IS
   GENERIC( 
      DIVIDER_91HZ : integer := 359256
   );
   PORT( 
      abus     : IN     std_logic;
      clk      : IN     std_logic;
      csn      : IN     std_logic;
      dbus_in  : IN     std_logic_vector (7 DOWNTO 0);
      resetn   : IN     std_logic;
      wrn      : IN     std_logic;
      dbus_out : OUT    std_logic_vector (7 DOWNTO 0);
      pulse182 : OUT    std_logic
   );

-- Declarations

END timer_top ;

LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;

ARCHITECTURE struct OF timer_top IS

   -- Architecture declarations

   -- Internal signal declarations
   SIGNAL date         : std_logic_vector(5 DOWNTO 0);
   SIGNAL hours        : std_logic_vector(4 DOWNTO 0);
   SIGNAL leap_years_s : std_logic;
   SIGNAL minutes      : std_logic_vector(5 DOWNTO 0);
   SIGNAL months       : std_logic_vector(3 DOWNTO 0);
   SIGNAL pulse1sec_s  : std_logic;
   SIGNAL regsel_s     : std_logic_vector(3 DOWNTO 0);
   SIGNAL seconds      : std_logic_vector(5 DOWNTO 0);
   SIGNAL uip_flag_s   : std_logic;
   SIGNAL wr_s         : std_logic;
   SIGNAL years        : std_logic_vector(4 DOWNTO 0);


signal divcnt_s : std_logic_vector(19 downto 0);
signal divcnt18_s:std_logic_vector(2 downto 0); -- 18.2Hz divider
signal divcntsec_s:std_logic_vector(6 downto 0); -- 1 sec divider
signal pulse91_s : std_logic;

   -- Component Declarations
   COMPONENT Timer_fsm
   PORT (
      clk          : IN     std_logic ;
      dbus_in      : IN     std_logic_vector (7 DOWNTO 0);
      leap_years_s : IN     std_logic ;
      pulse1sec_s  : IN     std_logic ;
      regsel_s     : IN     std_logic_vector (3 DOWNTO 0);
      resetn       : IN     std_logic ;
      wr_s         : IN     std_logic ;
      date         : OUT    std_logic_vector (5 DOWNTO 0);
      hours        : OUT    std_logic_vector (4 DOWNTO 0);
      minutes      : OUT    std_logic_vector (5 DOWNTO 0);
      months       : OUT    std_logic_vector (3 DOWNTO 0);
      seconds      : OUT    std_logic_vector (5 DOWNTO 0);
      years        : OUT    std_logic_vector (4 DOWNTO 0)
   );
   END COMPONENT;


BEGIN
   -- Architecture concurrent statements
   -- HDL Embedded Text Block 1 eb1
   -- eb1 1            
   -- Some bits and pieces compatible with IBM XT Motorola MC146818 Real Time Clock
   
   -- 0x71 read/write result register csn=70/71  
   wr_s <= '1' when (abus='1' AND wrn='0' AND csn='0') else '0';
   
   -- 0x70 Write to register select register 
   process (clk,resetn)  
       begin
         if (resetn='0') then                     
            regsel_s <= (others=> '0');
         elsif (rising_edge(clk)) then    
            if (abus='0' AND wrn='0' AND csn='0') then
               regsel_s <= dbus_in(3 downto 0);
            end if;
         end if;   
   end process;    
   
   -- User need to set the DIVIDER_91HZ generic such that the clk/DIVIDER_91HZ=... yes 91Hz :-)
   -- 91Hz is further divided by 5 to generate the 18.2Hz timer tick and 91 to update the RTC.
   
   -- Divide system clock to create 91Hz pulse (clk wide), use 20 bits divider   (clk Fmax=95MHz)
   -- assume default clock of 32.692308MHz   DIVIDER_91HZ=359256 (0x57B58) 
   process (clk,resetn)  
       begin
         if (resetn='0') then                     
            divcnt_s <= (others=> '0');   
            pulse91_s <= '0';                                    
         elsif (rising_edge(clk)) then    
            if divcnt_s=CONV_STD_LOGIC_VECTOR(DIVIDER_91HZ,20) then
               divcnt_s  <= (others => '0');    
               pulse91_s <= '1';            
            else 
               divcnt_s  <= divcnt_s + '1';  
               pulse91_s <= '0';  
            end if;
         end if;   
   end process;    
   
   
   -- Divide pulse91_s/5 to create 18.2Hz pulse
   process (clk,resetn)  
       begin
         if (resetn='0') then                     
            divcnt18_s <= (others => '0');   
            pulse182 <= '0';                                    
         elsif (rising_edge(clk)) then   
              if pulse91_s='1' then  
               if divcnt18_s="100" then    -- 5-1
                  divcnt18_s <= (others => '0');    
                  pulse182 <= '1';            
               else 
                  divcnt18_s    <= divcnt18_s + '1';  
                  pulse182 <= '0';  
               end if;
           else
            pulse182 <= '0';
           end if;
         end if;   
   end process;    
   
   -- Divide pulse91_s/91 to create 1Hz pulse
   -- Create a Update_In_Progress flag which is asserted n cycles before the 1sec pulse
   -- software need to check this flag until negated.
   process (clk,resetn)  
       begin
         if (resetn='0') then                     
            divcntsec_s <= (others => '0');   
            pulse1sec_s <= '0';                                    
         elsif (rising_edge(clk)) then 
            if pulse91_s='1' then  
               if divcntsec_s="1011010" then -- 91-1
                  divcntsec_s <= (others => '0');    
                  pulse1sec_s <= '1';            
               else 
                  divcntsec_s <= divcntsec_s + '1';  
                  pulse1sec_s <= '0';  
               end if;
          else
            pulse1sec_s <= '0';
            end if;
         end if;   
   end process;
   
   -- 10.9msec before the update the uip_flag_s is set, this is far too much time but
   -- easy to implement in hardware and setting the clock doesn't have to be fast, right?
   uip_flag_s <= '1' when (divcntsec_s>="1011010") else '0';    --or pulse1sec_s='1'
       
   

   -- HDL Embedded Text Block 2 eb2
   -- eb2 2    
   --Addr    Function
   --====    =========================================
   -- 00     current second for real-time clock
   -- 01     *not yet implemented * alarm second
   -- 02     current minute
   -- 03     *not yet implemented * alarm minute
   -- 04     current hour
   -- 05     *not yet implemented * alarm hour
   -- 06     *not yet implemented * current day of week (1=Sunday)
   -- 07     current date of month
   -- 08     current month
   -- 09     current year  (final two digits; eg, 93)
   --
   -- 0A     Status Register A - Read/Write except UIP
   -- ==     =========================================
   
   process (regsel_s,seconds,minutes,hours,date,months,years,uip_flag_s) is
      begin
         case regsel_s is
            when "0000"  => dbus_out <= "00"& seconds; 
            when "0010"  => dbus_out <= "00"& minutes; 
            when "0100"  => dbus_out <= "000" & hours; 
            when "0111"  => dbus_out <= "00"& date; 
            when "1000"  => dbus_out <= "0000" & months;
            when "1001"  => dbus_out <= "000" & years; 
            when others  => dbus_out <= uip_flag_s&"0000000"; -- bit 7 update_in_progress flag
         end case;                                    
   end process;

   -- HDL Embedded Text Block 3 leap_lut
   -- leap_lut 3                                        
   -- 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, and 2048
   process(years)
      begin
         case years is
            when "00000" => leap_years_s<='1';    --2000
             when "00100" => leap_years_s<='1';    --2004
             when "01000" => leap_years_s<='1';    --2008
             when "01100" => leap_years_s<='1';    --2012
            when "10000" => leap_years_s<='1';    --2016 
            when "10100" => leap_years_s<='1';    --2020 
            when "11100" => leap_years_s<='1';    --2028 I will be amazed if this module is still used by then :-)
             when  others => leap_years_s<='0';
         end case;
   end process;

   -- Instance port mappings.
   I0 : Timer_fsm
      PORT MAP (
         clk          => clk,
         dbus_in      => dbus_in,
         leap_years_s => leap_years_s,
         pulse1sec_s  => pulse1sec_s,
         regsel_s     => regsel_s,
         resetn       => resetn,
         wr_s         => wr_s,
         date         => date,
         hours        => hours,
         minutes      => minutes,
         months       => months,
         seconds      => seconds,
         years        => years
      );

END struct;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91浏览器打开| 午夜精品一区二区三区三上悠亚| 色综合久久88色综合天天免费| 人人爽香蕉精品| 亚洲自拍偷拍av| 亚洲欧洲日韩综合一区二区| 国产校园另类小说区| 欧美成人一区二区三区| 4438x亚洲最大成人网| 在线观看欧美精品| 在线免费亚洲电影| 欧美午夜精品免费| 欧美在线免费视屏| 欧美日韩在线精品一区二区三区激情| 91在线观看免费视频| 不卡电影免费在线播放一区| 国产呦萝稀缺另类资源| 久久国产综合精品| 久88久久88久久久| 国产老女人精品毛片久久| 狠狠网亚洲精品| 极品少妇一区二区| 极品销魂美女一区二区三区| 国产经典欧美精品| 成人免费高清在线| 91黄视频在线| 欧美体内she精高潮| 欧美在线免费观看视频| 欧美日韩黄色一区二区| 4438x成人网最大色成网站| 欧美一区二区三区视频在线观看| 91精品国产综合久久福利| 久久麻豆一区二区| 久久久综合精品| 亚洲婷婷国产精品电影人久久| 中文字幕在线播放不卡一区| 亚洲欧美区自拍先锋| 日韩高清在线不卡| 久久99九九99精品| 9人人澡人人爽人人精品| 色婷婷国产精品综合在线观看| 在线看国产一区| 日韩网站在线看片你懂的| 国产欧美一区二区三区在线看蜜臀 | 爽好久久久欧美精品| 青椒成人免费视频| 国产99久久久国产精品潘金| 色综合天天综合色综合av| 制服丝袜亚洲色图| 国产精品青草综合久久久久99| 一区二区成人在线视频| 久久国产欧美日韩精品| 国产一区二区视频在线播放| 丁香婷婷深情五月亚洲| 国产精品一区二区三区99| 国产精品一二三四五| 成人精品视频一区二区三区 | 轻轻草成人在线| 调教+趴+乳夹+国产+精品| 秋霞电影一区二区| 91在线观看美女| 欧美日产国产精品| 国产精品电影一区二区| 亚洲综合成人在线| 美女视频一区在线观看| 成人网在线播放| 欧美日本高清视频在线观看| 欧美精品一区男女天堂| 日韩一区中文字幕| 美女脱光内衣内裤视频久久网站 | 亚洲欧洲综合另类在线| 免费黄网站欧美| 白白色亚洲国产精品| 欧美日韩免费视频| 中文一区在线播放| 免费精品视频最新在线| 色综合天天天天做夜夜夜夜做| 91精品国产免费| 中文字幕精品三区| 日本中文一区二区三区| 91女厕偷拍女厕偷拍高清| 精品国产乱码久久久久久影片| 一区二区三区欧美激情| 国产真实精品久久二三区| 91亚洲永久精品| 亚洲精品在线三区| 日韩高清欧美激情| 91丨porny丨国产入口| 欧美日韩免费一区二区三区视频| 国产欧美日韩精品在线| 婷婷综合五月天| 99热精品一区二区| 国产无一区二区| 青青草伊人久久| 欧美性大战久久久| 久久这里只有精品6| 亚洲国产成人av好男人在线观看| 国产成人精品亚洲777人妖| 不卡免费追剧大全电视剧网站| 日韩欧美中文字幕精品| 夜夜嗨av一区二区三区| 成+人+亚洲+综合天堂| 久久欧美一区二区| 国产麻豆成人精品| 欧美精品一区二区三区很污很色的| 亚洲一区免费在线观看| 色综合天天天天做夜夜夜夜做| 国产午夜精品福利| 国模娜娜一区二区三区| 久久久精品日韩欧美| 国产在线精品一区二区三区不卡| 日韩一级在线观看| 欧美aaaaa成人免费观看视频| 欧美日韩高清一区| 一区二区三区电影在线播| 成人黄色网址在线观看| 欧美国产一区在线| av综合在线播放| 中文字幕日韩一区| 99久久免费视频.com| 亚洲黄色免费网站| 欧美在线视频日韩| 亚洲成人777| 4438x成人网最大色成网站| 日韩中文字幕1| 91精品国产综合久久精品 | 日韩女优av电影| 久久疯狂做爰流白浆xx| 日韩免费观看高清完整版在线观看| 午夜欧美2019年伦理| 欧美一区二区三区婷婷月色| 老司机午夜精品| 国产精品免费视频一区| 色综合欧美在线视频区| 亚洲成人精品在线观看| 精品黑人一区二区三区久久| 久久99精品国产.久久久久久 | 国产成人精品免费一区二区| 中文字幕在线播放不卡一区| 欧美午夜电影网| 麻豆久久久久久久| 2020国产成人综合网| 波多野结衣的一区二区三区| 亚洲一区二区影院| 日韩欧美一区在线| 懂色av一区二区三区蜜臀 | 久久99在线观看| 国产精品日韩精品欧美在线| 在线观看亚洲精品| 久久精品久久久精品美女| 国产亚洲一二三区| 欧美性一区二区| 国产一区视频网站| 一区二区三区中文在线观看| 91精品国产综合久久久久久久| 国产99久久久久久免费看农村| 亚洲免费观看高清完整版在线观看 | 狠狠色狠狠色综合| 中文字幕五月欧美| 日韩视频永久免费| 91亚洲资源网| 国产麻豆成人传媒免费观看| 一区二区三区不卡在线观看| 精品国产1区2区3区| 91麻豆自制传媒国产之光| 久久99国产精品久久99| 一区二区三区久久| 中文字幕av一区二区三区高| 日韩午夜精品电影| 在线观看不卡一区| 成人午夜av电影| 九九精品视频在线看| 亚洲欧洲精品一区二区三区不卡| 欧美一区二区福利视频| 在线观看中文字幕不卡| 国产成人精品亚洲日本在线桃色| 天天影视网天天综合色在线播放 | 日本韩国欧美一区| 高清在线不卡av| 紧缚奴在线一区二区三区| 亚洲第一主播视频| 成人免费在线播放视频| 欧美国产激情一区二区三区蜜月| 欧美日韩中字一区| 99热这里都是精品| 国产精品一区二区黑丝| 日本美女视频一区二区| 亚洲理论在线观看| 久久先锋资源网| 日韩一级免费观看| 777色狠狠一区二区三区| 色哟哟一区二区三区| 成人涩涩免费视频| 成人激情图片网| 国产成人一区二区精品非洲| 精品一区二区三区免费视频| 日本不卡一区二区三区高清视频| 亚洲日本一区二区三区| 国产精品欧美综合在线| 中文字幕高清不卡|