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

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

?? cpu.vhd

?? 8051 mega core porocesssor vhdl source code
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
--*******************************************************************--
-- Copyright (c) 1999-2001  Evatronix SA                             --
--*******************************************************************--
-- Please review the terms of the license agreement before using     --
-- this file. If you are not an authorized user, please destroy this --
-- source code file and notify Evatronix SA immediately that you     --
-- inadvertently received an unauthorized copy.                      --
--*******************************************************************--

-----------------------------------------------------------------------
-- Project name         : C8051
-- Project description  : C8051 Microcontroller Unit
--
-- File name            : CPU.VHD
-- File contents        : Entity CONTROL_UNIT
--                        Architecture RTL of CONTROL_UNIT
-- Purpose              : Control Processor Unit
--
-- Destination library  : C8051_LIB
-- Dependencies         : C8051_LIB.Utility
--                        IEEE.STD_LOGIC_1164
--
-- Design Engineer      : M.B. D.K.
-- Quality Engineer     : M.B.
-- Version              : 3.01.E00
-- Last modification    : 2001-10-01
-----------------------------------------------------------------------

--*******************************************************************--
-- Modifications with respect to Version 3.00.E00:
-- 3.01.E00   :
-- 2001-10-01 : added OCI ports: debugreq, debugprog, debugprogff,
--            : debugstep, debugstepff, debugmode
-- 2001-10-01 : added output ports: nrcycles, codefetcheff
-- 2001-10-01 : write of int_call signal modified in respect to OCI
-- 2001-10-01 : pcince_write_proc, instrreg_proc, rmwinstr_decoder_proc
--            : nr_decoder_proc modified in respect to OCI
--*******************************************************************--

library IEEE;
   use IEEE.STD_LOGIC_1164.all;
library C8051_LIB;
   use C8051_LIB.UTILITY.all;

--*******************************************************************--
   entity CONTROL_UNIT is
      port (
           -- Control signal inputs
           clk          : in  STD_LOGIC;  -- Global clock input
           rst          : in  STD_LOGIC;  -- Global reset input
           
           -- ISR input signals
           intreq       : in  STD_LOGIC;  -- Interrupt request
           
           -- OCI ports
           debugreq     : in  STD_LOGIC;
           debugprog    : in  STD_LOGIC;
           debugprogff  : in  STD_LOGIC;
           debugstep    : in  STD_LOGIC;
           debugstepff  : in  STD_LOGIC;
           debugmode    : in  STD_LOGIC;
                                
           -- Instruction register output
           instr        : out STD_LOGIC_VECTOR(7 downto 0);
           
           -- Cycle counter output
           cycle        : out INTEGER range 1 to 8;
           nrcycles     : out INTEGER range 1 to 8;
           phase        : out INTEGER range 1 to 6;
           parcycle     : out STD_LOGIC;  -- parity cycle indicator
           
           -- program counter increment enable
           pcince       : out STD_LOGIC;
           
           -- Instruction decoder output
           codefetche   : out STD_LOGIC;  -- Opcode fetch enable
           codefetcheff : out STD_LOGIC;  -- Opcode fetch enable flip-flop
           datafetche   : out STD_LOGIC;  -- Data fetch enable
           rmwinstr     : out STD_LOGIC;  -- Read-Modify-Write Instr.
           
           -- ISR control outputs
           intack       : out STD_LOGIC;  -- Interrupt acknowledge flag
           intret       : out STD_LOGIC;  -- Interrupt return flag
           intcall      : out STD_LOGIC;  -- Interrupt call routine
           
           -- Program bus input
           memdatai     : in  STD_LOGIC_VECTOR(7 downto 0)
           );
   end CONTROL_UNIT;

--*******************************************************************--

   architecture RTL of CONTROL_UNIT is   

      -----------------------------------------------------------------
      -- Instruction register
      -----------------------------------------------------------------   
      signal instrreg        : STD_LOGIC_VECTOR(7 downto 0);
   
      -----------------------------------------------------------------
      -- Fetch enable signals
      -----------------------------------------------------------------
      signal code_fetch_e    : STD_LOGIC;              -- combinational
      signal data_fetch_e    : STD_LOGIC;              -- combinational
      signal codefetche_ff   : STD_LOGIC;              -- registered
   
      -----------------------------------------------------------------
      -- Current machine cycle register
      -----------------------------------------------------------------
      signal curcycle        : INTEGER range 1 to 8;
      signal curphase        : INTEGER range 1 to 6;
      
      -----------------------------------------------------------------
      -- Parity cycle indicator
      -----------------------------------------------------------------
      signal par_cycle       : STD_LOGIC;
   
      -----------------------------------------------------------------
      -- Number of bytes and cycles
      -----------------------------------------------------------------
      signal nr_cycles_a     : INTEGER range 1 to 8;   -- combinational
      signal nr_bytes_a      : INTEGER range 1 to 6;   -- combinational
      signal nr_cycles       : INTEGER range 1 to 8;   -- registered
      signal nr_bytes        : INTEGER range 1 to 6;   -- registered
   
      -----------------------------------------------------------------
      -- Read-Modify-Write Instruction signal
      -----------------------------------------------------------------
      signal rmwinstr_a      : STD_LOGIC;              -- combinational
   
      -----------------------------------------------------------------
      -- Interrupt call routine
      -----------------------------------------------------------------
      signal int_call        : STD_LOGIC;
      
      -----------------------------------------------------------------
      -- increment pc register
      -----------------------------------------------------------------
      signal pc_inc_e        : STD_LOGIC; 
      
   
   begin
      
   --------------------------------------------------------------------
   -- Code fetch enable flip-flop
   --------------------------------------------------------------------
   codefetcheff_drv:
   --------------------------------------------------------------------
      codefetcheff <= codefetche_ff;
      
   --------------------------------------------------------------------
   -- Instruction register
   --------------------------------------------------------------------
   instr_drv:
   --------------------------------------------------------------------
      instr <= instrreg;
   
   --------------------------------------------------------------------
   -- Current machine cycle register
   --------------------------------------------------------------------
   cycle_drv:
   --------------------------------------------------------------------
      cycle <= curcycle;
   
   --------------------------------------------------------------------
   -- Number of current instruction cycles register
   --------------------------------------------------------------------
   nrcycles_drv:
   --------------------------------------------------------------------
      nrcycles <= nr_cycles;
   
   --------------------------------------------------------------------
   -- Current phase of cycle register
   --------------------------------------------------------------------
   phase_drv:
   --------------------------------------------------------------------
      phase <= curphase;
   
   --------------------------------------------------------------------
   -- Parity cycle indicator register
   --------------------------------------------------------------------
   parcycle_drv:
   --------------------------------------------------------------------
      parcycle <= par_cycle;
   
   --------------------------------------------------------------------
   -- Opcode fetch enable
   --------------------------------------------------------------------
   codefetche_drv:
   --------------------------------------------------------------------
      codefetche <= code_fetch_e;
   
   --------------------------------------------------------------------
   -- Data fetch enable
   --------------------------------------------------------------------
   datafetche_drv:
   --------------------------------------------------------------------
      datafetche <= data_fetch_e;
      
   
   --------------------------------------------------------------------
   -- Interrupt call routine register
   --------------------------------------------------------------------
   intcall_drv:
   --------------------------------------------------------------------
      intcall <= int_call;
   
   
   --------------------------------------------------------------------
   -- interrupt handling registers
   --------------------------------------------------------------------
   interrupt_proc:
   --------------------------------------------------------------------
      process (clk)
      begin
         if clk'event and clk='1' then
            -------------------------------------
            -- Synchronous reset
            -------------------------------------
            if rst='1' then
               intack   <= '0';
               intret   <= '0';
               int_call <= '0';
            else
            -------------------------------------
            -- Synchronous write
            -------------------------------------
               -- Interrupt acknowledge flag
               ----------------------------------
               if (int_call='1' and
                   curcycle=3  and
                   curphase=4)
               then             
                  intack <= '1'; -- Interrupt acknowledge
               else
                  intack <= '0';
               end if;
            
               ----------------------------------
               -- Interrupt return flag
               ----------------------------------
               if (instrreg=RETI and
                   curcycle=4 and
                   curphase=5
                  ) then
                  intret <= '1'; -- Interrupt return
               else
                  intret <= '0';
               end if;
            
               ----------------------------------
               -- Interrupt call routine
               ----------------------------------
               if codefetche_ff='1' and intreq='1' and debugmode='0' -- Interrupt request
               then 
                  int_call <= '1';
               elsif int_call='1' and
                     curcycle=4 and
                     curphase=3
               then
                  int_call <= '0'; -- Interrupt call subroutine
               end if;
            
            end if;
         end if;
      end process;
      
   
   --------------------------------------------------------------------
   -- Opcode fetch enable
   --------------------------------------------------------------------
   code_fetch_e_hand:
   --------------------------------------------------------------------
      code_fetch_e <=
         '1' when (curcycle=nr_cycles and
                   curphase=5
                  ) else
         '0'; 

         
   --------------------------------------------------------------------
   codefetche_ff_write_proc:
   --------------------------------------------------------------------
      process (clk)
      begin
         if clk'event and clk='1' then
            -------------------------------------
            -- Synchronous reset
            -------------------------------------
            if rst='1' then
               codefetche_ff <= '0';
            else
            -------------------------------------
            -- Synchronous write
            -------------------------------------
               codefetche_ff  <= code_fetch_e;
            end if;
         end if;
      end process;

      
   --------------------------------------------------------------------
   -- Data fetch enable
   --------------------------------------------------------------------
   data_fetch_e_hand:
   -------------------------------------------------------------------- 
      data_fetch_e <=
         '1' when (curcycle<nr_bytes and
                   curphase=5
                  ) else
         '0';

   
   --------------------------------------------------------------------
   -- Program Counter increment enable - combinationar section
   --------------------------------------------------------------------
   pc_inc_e_proc:
   --------------------------------------------------------------------
      process(nr_bytes, nr_cycles, instrreg, curcycle, curphase)
      begin
         if curphase=4 then
            case nr_bytes is
               when 2 =>
               case nr_cycles is
                  when 2 =>
                  if curcycle=1 then
                     pc_inc_e <= '1';
                  else
                     pc_inc_e <= '0';
                  end if;
                  
                  when 4 =>
                  case instrreg is
                     when
                     AJMP_0        | AJMP_1       | 
                     AJMP_2        | AJMP_3       |
                     AJMP_4        | AJMP_5       |
                     AJMP_6        | AJMP_7       |
                     ACALL_0       | ACALL_1      |
                     ACALL_2       | ACALL_3      |
                     ACALL_4       | ACALL_5      |
                     ACALL_6       | ACALL_7      =>
                     if curcycle=1 then
                        pc_inc_e <= '1';
                     else
                        pc_inc_e <= '0';
                     end if;
                     
                     when
                     MOV_BIT_C     | ORL_C_BIT    |
                     ORL_C_NBIT    | ANL_C_BIT    |
                     ANL_C_NBIT    | PUSH         |
                     POP           | MOV_ADDR_R0  |
                     MOV_ADDR_R1   | MOV_ADDR_R2  |
                     MOV_ADDR_R3   | MOV_ADDR_R4  |
                     MOV_ADDR_R5   | MOV_ADDR_R6  |
                     MOV_ADDR_R7   
                     =>
                     if curcycle=3 then
                        pc_inc_e <= '1';
                     else
                        pc_inc_e <= '0';
                     end if;                  
                     
                     when others => --instrreg
                     if curcycle=2 then
                        pc_inc_e <= '1';
                     else
                        pc_inc_e <= '0';
                     end if;
                  end case;
                     
                  when others => -- nr_cycles
                     pc_inc_e <= '0';
               end case;
               
               when 3 => -- nr_bytes
               case instrreg is
                  when 
                  JB_BIT       | JBC_BIT     |
                  JNB_BIT      | CJNE_A_N    |
                  CJNE_A_ADDR  | CJNE_IR0_N  |

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av在线免费观看不卡| 久久女同性恋中文字幕| 国产精品不卡在线观看| 国产乱妇无码大片在线观看| 日韩一区二区免费电影| 青青草成人在线观看| 精品少妇一区二区三区| 国产精品一二三四| 日本一区二区三区电影| 99精品久久免费看蜜臀剧情介绍| 国产精品国产三级国产普通话三级| 国产一区二区不卡| 国产精品麻豆99久久久久久| av综合在线播放| 亚洲综合小说图片| 欧美视频在线一区二区三区 | 欧美精品xxxxbbbb| 美女脱光内衣内裤视频久久影院| 精品少妇一区二区三区在线播放 | av毛片久久久久**hd| 亚洲欧美日韩中文播放| 欧美精三区欧美精三区 | 国产精品99久久久| 亚洲精品免费看| 欧美一区三区四区| 国产精品影视天天线| 国产精品乱子久久久久| 日本女优在线视频一区二区| 精品国产成人系列| 丁香激情综合国产| 亚洲欧美色图小说| 在线播放国产精品二区一二区四区 | 日韩中文字幕区一区有砖一区| 666欧美在线视频| 久久99精品国产麻豆不卡| 久久久精品国产免费观看同学| 成人小视频免费在线观看| 1024亚洲合集| 欧美一区二区三区的| 国产一区二区在线影院| 中文字幕亚洲区| 欧美精品xxxxbbbb| 国产精品一二三四区| 亚洲综合精品久久| 欧美大片免费久久精品三p| 成人听书哪个软件好| 亚洲一区成人在线| 26uuu精品一区二区| 91麻豆精品一区二区三区| 秋霞成人午夜伦在线观看| 久久精品一区二区| 日本道免费精品一区二区三区| 青青青爽久久午夜综合久久午夜| 国产女人aaa级久久久级| 欧美中文字幕一区二区三区| 激情综合网最新| 一级做a爱片久久| 欧美精品一区二区三区高清aⅴ| 成人免费高清视频在线观看| 亚洲国产一二三| 久久嫩草精品久久久久| 在线成人免费观看| 色综合色综合色综合色综合色综合| 亚洲va欧美va人人爽| 欧美国产国产综合| 日韩免费福利电影在线观看| 91麻豆免费视频| 国产成人综合在线| 免费成人av在线播放| ...中文天堂在线一区| www国产精品av| 欧美丰满一区二区免费视频| 91免费精品国自产拍在线不卡| 韩国欧美国产一区| 亚洲自拍另类综合| 国产精品嫩草影院av蜜臀| 亚洲精品在线电影| 欧美伦理电影网| 色视频成人在线观看免| 成人在线视频一区二区| 久久国产综合精品| 日韩av一区二| 午夜精品影院在线观看| 一区二区三区在线观看欧美 | 午夜一区二区三区视频| 亚洲三级在线看| 中文字幕不卡三区| 国产午夜三级一区二区三| 精品成人a区在线观看| 91精品国产福利| 欧美一级二级三级蜜桃| 欧美欧美欧美欧美| 精品视频一区二区不卡| 欧美综合一区二区三区| 一本到不卡免费一区二区| 成人综合在线网站| 国产999精品久久久久久| 久久精品噜噜噜成人av农村| 蜜桃av一区二区| 免费欧美在线视频| 日本亚洲视频在线| 免费观看成人av| 久久99精品国产麻豆不卡| 久久精品国产秦先生| 老司机精品视频导航| 人妖欧美一区二区| 精品亚洲成a人在线观看| 九一久久久久久| 国产精品自在欧美一区| 激情成人综合网| 国产一区高清在线| 91网页版在线| 欧美三级资源在线| 欧美一区二区三区小说| 精品国产一区二区在线观看| 久久久91精品国产一区二区精品| 国产亚洲一本大道中文在线| 欧美激情资源网| 亚洲综合成人网| 美女网站一区二区| 99久久精品国产精品久久| 国产99久久久国产精品免费看| www.欧美亚洲| 欧美网站一区二区| 欧美哺乳videos| 国产精品久久久久一区| 亚洲一区自拍偷拍| 麻豆成人免费电影| 国产大陆a不卡| 在线综合+亚洲+欧美中文字幕| 日韩精品最新网址| 国产精品午夜电影| 五月天视频一区| 国产精品69毛片高清亚洲| 91色porny| 日韩亚洲欧美综合| 一区视频在线播放| 免费成人你懂的| 北岛玲一区二区三区四区| 欧美日本韩国一区| 国产精品久久久久久户外露出| 亚洲一区二区在线免费观看视频| 精品影视av免费| 欧美自拍偷拍午夜视频| 日韩精品一区二区在线观看| 樱桃视频在线观看一区| 国产一区二区三区综合| 欧美专区日韩专区| 国产精品色呦呦| 日本成人中文字幕| 色婷婷精品久久二区二区蜜臀av | 69精品人人人人| 1024精品合集| 国产真实乱子伦精品视频| 欧美怡红院视频| 日本一区二区三级电影在线观看| 午夜亚洲国产au精品一区二区| 99视频在线精品| 欧美电影一区二区三区| 亚洲精品乱码久久久久久黑人| 国产在线精品一区二区三区不卡| 日本韩国精品在线| 久久久蜜臀国产一区二区| 日本一区中文字幕| 欧美日韩成人综合天天影院| 亚洲欧洲日韩在线| 国产精品 欧美精品| 91麻豆精品国产91| 一级女性全黄久久生活片免费| 国产91丝袜在线播放| 欧美电影免费提供在线观看| 亚洲成人黄色小说| 91免费在线播放| 日本一区二区三区国色天香| 国产高清视频一区| 欧美白人最猛性xxxxx69交| 午夜影院在线观看欧美| 欧美又粗又大又爽| 亚洲免费视频成人| 91尤物视频在线观看| 国产精品视频线看| 国产成人免费在线观看| 久久免费的精品国产v∧| 捆绑变态av一区二区三区| 日韩亚洲国产中文字幕欧美| 日韩精品久久久久久| 91亚洲国产成人精品一区二区三 | 亚洲欧美视频在线观看| 成人av资源在线| 亚洲国产成人午夜在线一区| 国产成人精品在线看| 国产午夜精品福利| 丁香桃色午夜亚洲一区二区三区| 国产色婷婷亚洲99精品小说| 国产伦精品一区二区三区免费迷| 欧美大尺度电影在线| 日本亚洲免费观看| 亚洲精品一区二区三区在线观看| 青青草一区二区三区| 日韩精品中文字幕在线一区|