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

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

?? control_mem.vhd

?? Standard 8051 IP Core
?? VHD
?? 第 1 頁 / 共 4 頁
字號:
    -- activities triggered by rising edge of clock 
    elsif clk'event and clk = '1' then
      intblock_o <= s_intblock;
      for i in 0 to C_IMPL_N_EXT-1 loop
        s_int0_h1(i) <= int0_i(i);              -- external INT0 
        s_int0_h2(i) <= s_int0_h1(i); 
        s_int0_h3(i) <= s_int0_h2(i); 
        s_int1_h1(i) <= int1_i(i);              -- external INT1 
        s_int1_h2(i) <= s_int1_h1(i);
        s_int1_h3(i) <= s_int1_h2(i);
      end loop; 
      for i in 0 to C_IMPL_N_TMR-1 loop
        s_tf0_h1(i) <= all_tf0_i(i);          -- TF0 flags 
        s_tf0_h2(i) <= s_tf0_h1(i); 
        s_tf1_h1(i) <= all_tf1_i(i);          -- TF1 flags 
        s_tf1_h2(i) <= s_tf1_h1(i);      
        -- all_xxx is a std_logic_vector, s_xxx is a array of std_logic !!!
      end loop;
      for i in 0 to C_IMPL_N_SIU-1 loop
        s_ri_h1(i) <= all_scon_i(i*3);        -- RI flag
        s_ri_h2(i) <= s_ri_h1(i); 
        s_ti_h1(i) <= all_scon_i((i*3)+1);    -- TI flag 
        s_ti_h2(i) <= s_ti_h1(i);      
        -- all_xxx is a std_logic_vector, s_xxx is a array of std_logic !!!
      end loop;
    end if; 
  end process iep; 
 
------------------------------------------------------------------------------ 
-- purpose: check the interupt-sources and start an interupt if necessary
-- inputs:  ie,ip,scon,tcon,s_inthigh,s_intlow,s_ti,s_ri,s_ie0,
--          s_ie1,s_tf0,s_tf1
-- outputs: s_intpre
------------------------------------------------------------------------------ 
 
  intpre : process (ie,ip,scon,tcon,s_inthigh,s_intlow,s_ti,s_ri,s_ie0,
                    s_ie1,s_tf0,s_tf1) 
  begin   
    if (EA='1' and (EX0='1' or ET0='1' or EX1='1' or ET1='1' or ES='1')) then 
      if s_inthigh='1' then       -- interrupt with high priority is running 
        s_intpre <= '0';           
      elsif s_intlow='1' then     -- interrupt with low priority is running 
        if ((PX0 and EX0 and s_ie0) or 
            (PT0 and ET0 and s_tf0) or 
            (PX1 and EX1 and s_ie1) or 
            (PT1 and ET1 and s_tf1) or 
            (PS0 and ES and (s_ri or s_ti)))='1' then 
          s_intpre <= '1';        -- a second interrupt must start 
        else                      
          s_intpre <= '0'; 
        end if; 
      else                        -- no interrupt is running 
        if ((EX0 and s_ie0) or 
            (ET0 and s_tf0) or
            (EX1 and s_ie1) or
            (ET1 and s_tf1) or
            (ES and (s_ri or s_ti)))='1' then 
          s_intpre <= '1';        -- an interrupt must start 
        else 
          s_intpre <= '0'; 
        end if; 
      end if; 
    else                          -- no interrupt must be carry out 
      s_intpre <= '0'; 
    end if;     
  end process intpre; 

------------------------------------------------------------------------------ 
-- purpose: this are the main-multiplexer for reading and writing regs
-- inputs:  s_data_mux,pc,aludata_i,s_reg_data,rom_data_i,acc,
--          s_bdata_mux,s_bit_data,psw,new_cy_i,s_helpb,sp,s_rr_adr,
--          s_ri_data,s_help,s_adr_mux,s_adr,s_regs_wr_en,pc_plus2,
--          s_help16,s_ri_adr,s_r0_b0,s_r1_b0,s_r0_b1,s_r1_b1,
--          s_r0_b2,s_r1_b2,s_r0_b3,s_r1_b3
-- outputs: s_data,s_bdata,s_adr,s_ri_data,ram_wr_o
------------------------------------------------------------------------------ 
 
  p_multiplexer : process (s_data_mux,pc,aludata_i,s_reg_data,rom_data_i,acc,
                     s_bdata_mux,s_bit_data,psw,new_cy_i,s_helpb,sp,s_rr_adr,
                     s_ri_data,s_help,s_adr_mux,s_adr,s_regs_wr_en,pc_plus2,
                     s_help16,s_ri_adr,s_r0_b0,s_r1_b0,s_r0_b1,s_r1_b1,
                     s_r0_b2,s_r1_b2,s_r0_b3,s_r1_b3,s_adrx_mux,dph,dpl,
		     datax_i) 
  begin
    case s_data_mux is
      when "0000" => s_data <= conv_unsigned(0,8);
      when "0001" => s_data <= pc(7 downto 0);
      when "0010" => s_data <= pc(15 downto 8);
      when "0011" => s_data <= unsigned(aludata_i);
      when "0100" => s_data <= s_reg_data;
      when "0101" => s_data <= unsigned(rom_data_i);
      when "0110" => s_data <= acc;
      when "0111" => 
        s_data(7 downto 4) <= acc(3 downto 0);
        s_data(3 downto 0) <= acc(7 downto 4);
      when "1000" => s_data <= s_help;
      when "1001" => 
        s_data(7 downto 4) <= s_reg_data(7 downto 4);
        s_data(3 downto 0) <= s_help(3 downto 0);
      when "1010" => 
        s_data(7 downto 4) <= acc(7 downto 4);
        s_data(3 downto 0) <= s_reg_data(3 downto 0);
      when "1100" => s_data <= s_help16(7 downto 0);
      when "1101" => s_data <= s_help16(15 downto 8);
      when "1110" => s_data <= pc_plus2(7 downto 0);
      when "1111" => s_data <= unsigned(datax_i);
      when others => s_data <= conv_unsigned(0,8);
    end case;

    case s_bdata_mux is
      when "0000" => s_bdata <= '0';
      when "0001" => s_bdata <= s_bit_data and cy;
      when "0010" => s_bdata <= not(s_bit_data) and cy;
      when "0011" => s_bdata <= new_cy_i(1);
      when "0100" => s_bdata <= s_helpb;
      when "0101" => s_bdata <= not cy;
      when "0110" => s_bdata <= not s_bit_data;
      when "0111" => s_bdata <= s_bit_data;
      when "1000" => s_bdata <= cy;
      when "1001" => s_bdata <= s_bit_data or cy;
      when "1010" => s_bdata <= not(s_bit_data) or cy;
      when "1011" => s_bdata <= '1';
      when others => s_bdata <= '0';
    end case;

    case s_adr_mux is
      when "0000" => s_adr <= conv_unsigned(0,8);
      when "0001" => s_adr <= conv_unsigned(16#89#,8); 
      when "0010" => s_adr <= conv_unsigned(16#8D#,8); 
      when "0011" => s_adr <= conv_unsigned(16#8B#,8);
      when "0100" => s_adr <= conv_unsigned(16#8F#,8); 
      when "0101" => s_adr <= sp;
      when "0110" => s_adr <= s_rr_adr;
      when "0111" => s_adr <= s_ri_data;
      when "1000" => s_adr <= unsigned(rom_data_i);
      when "1001" => s_adr <= s_reg_data;
      when "1010" => s_adr <= s_help ;
      when "1011" => s_adr <= conv_unsigned(16#D7#,8); 
      when "1100" => s_adr <= conv_unsigned(16#F0#,8);
      when "1101" => s_adr <= conv_unsigned(16#82#,8); 
      when "1110" => s_adr <= conv_unsigned(16#83#,8); 
      when "1111" => s_adr <= sp + conv_unsigned(1,1); 
      when others => s_adr <= conv_unsigned(0,8);
    end case;

    case s_adrx_mux is
      when "00" => adrx_o <= (others => '0');
      when "01" => 
        adrx_o(15 downto 8) <= std_logic_vector(dph); 
        adrx_o(7 downto 0) <= std_logic_vector(dpl); 
      when "10" => 
        adrx_o(15 downto 8) <= (others => '0'); 
        adrx_o(7 downto 0) <= std_logic_vector(s_ri_data); 
      when others => adrx_o <= (others => '0');
    end case;
          
    case s_ri_adr is
      when "00000000" => s_ri_data <= s_r0_b0;    
      when "00000001" => s_ri_data <= s_r1_b0;    
      when "00001000" => s_ri_data <= s_r0_b1;    
      when "00001001" => s_ri_data <= s_r1_b1;    
      when "00010000" => s_ri_data <= s_r0_b2;    
      when "00010001" => s_ri_data <= s_r1_b2;    
      when "00011000" => s_ri_data <= s_r0_b3;    
      when "00011001" => s_ri_data <= s_r1_b3;
      when others => s_ri_data <= conv_unsigned(0,8);
    end case;   

    if ((s_regs_wr_en="100") or (s_regs_wr_en="101")) then    -- write one byte
      if ((s_adr(7)='1') or                                   -- SFR
        (conv_std_logic_vector(s_adr(7 downto 4),4)="0010")   -- bitadressable
        or ((std_logic_vector(s_adr) AND "11100110") = "00000000"))   -- R0,R1
      then
         ram_wr_o <= '0';
      else
        ram_wr_o <= '1';                -- to RAM-block
      end if;
    else
      ram_wr_o <= '0';
    end if;
  end process p_multiplexer; 

------------------------------------------------------------------------------ 
-- purpose: writes internal registers, on which the user have no 
--          direct access
-- inputs:  reset,clk,s_nextstate,state,s_help_en,
--          rom_data_i,aludata_i,s_reg_data,s_rr_adr,new_cy_i
-- outputs: state,s_ir,s_help,s_help16,s_helpb,s_intpre2,s_intlow,
--          s_inthigh,s_preadr
------------------------------------------------------------------------------ 
 
  p_wr_internal_reg : process (reset,clk)
  begin
    if reset='1' then 
      state <= STARTUP; 
      s_ir <= conv_unsigned(0,8); 
      s_help <= conv_unsigned(0,8);
      s_help16 <= conv_unsigned(0,16);
      s_helpb <= '0';
      s_intpre2 <= '0';
      s_intlow <= '0';
      s_inthigh <= '0';
      s_preadr <= conv_unsigned(0,8);
      pc <= conv_unsigned(0,16); 
      s_p0 <= "11111111";
      s_p1 <= "11111111";
      s_p2 <= "11111111";
      s_p3 <= "11111111";
      s_ext0isr_d <= '0';
      s_ext0isrh_d <= '0';
      s_ext1isr_d <= '0';
      s_ext1isrh_d <= '0';
    else
      if Rising_Edge(clk) then  

        state <= s_nextstate;                        -- update current state

        if state=FETCH then 
          s_ir <= unsigned(rom_data_i);              -- save OP-Code in IR 
        end if; 
        
        case s_help_en is
          when "0000" => NULL;
          when "0001" => s_help <= unsigned(rom_data_i);
          when "0010" => s_help <= unsigned(aludata_i);
          when "0011" => s_help <= s_reg_data;
          when "0100" => s_help <= s_rr_adr;
          when "0101" => s_help <= conv_unsigned(16#03#,8);
          when "0110" => s_help <= conv_unsigned(16#0B#,8);
          when "0111" => s_help <= conv_unsigned(16#13#,8); 
          when "1000" => s_help <= conv_unsigned(16#1B#,8);
          when "1001" => s_help <= conv_unsigned(16#23#,8);
          when "1010" => s_help <= acc;
          when others => NULL;
        end case;
    
        case s_help16_en is
          when "00" => NULL;
          when "01" => s_help16 <= pc + conv_unsigned(3,2);
          when "10" => s_help16 <= pc_plus2;
          when "11" => s_help16 <= pc_plus1;
          when others => NULL;
        end case;

        case s_helpb_en is
          when '0' => NULL;
          when '1' => s_helpb <= new_cy_i(1);
          when others => NULL;
        end case;

        if s_intpre2_en='1' then           -- help-reg for s_intpre
          s_intpre2 <= s_intpre2_d;
        else
          NULL;
        end if;

        if s_intlow_en='1' then
          s_intlow <= s_intlow_d;
        else
          NULL;
        end if;

        if s_inthigh_en='1' then
          s_inthigh <= s_inthigh_d;
        else
          NULL;
        end if;

        if ext0isr_en_i = '1' then
          s_ext0isr_d <= ext0isr_d_i;
        end if;
        if ext1isr_en_i = '1' then
          s_ext1isr_d <= ext1isr_d_i;
        end if;
        if ext0isrh_en_i = '1' then
          s_ext0isrh_d <= ext0isrh_d_i;
        end if;
        if ext1isrh_en_i = '1' then
          s_ext1isrh_d <= ext1isrh_d_i;
        end if;

        s_preadr <= s_adr;

        pc <= pc_comb;               -- write pc-register

	s_p0 <= p0_i;
	s_p1 <= p1_i;
	s_p2 <= p2_i;
	s_p3 <= p3_i;

      end if;
    end if;
  end process p_wr_internal_reg; 

------------------------------------------------------------------------------ 
-- purpose: calculate the next PC-adress 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品123区| 一区二区成人在线观看| 欧美日韩五月天| 91丨九色丨尤物| 91丨九色丨蝌蚪富婆spa| 国产v日产∨综合v精品视频| 精品一区二区三区久久| 久久99精品久久久久久国产越南| 日韩精品乱码av一区二区| 亚洲国产精品人人做人人爽| 亚洲第一精品在线| 日韩av中文字幕一区二区三区| 日韩电影网1区2区| 久久99国产精品久久| 国产在线视频精品一区| 国产河南妇女毛片精品久久久| 成人午夜精品在线| 色综合网站在线| 欧美日韩成人一区二区| 欧美一区二区三区白人| 日韩免费高清av| 3d成人h动漫网站入口| 欧美人xxxx| 久久久久九九视频| 亚洲欧美日韩一区二区| 日本一区中文字幕| 韩国女主播成人在线观看| 91一区在线观看| 日韩一区二区三区电影 | 色域天天综合网| 欧美日韩国产片| 国产日韩欧美一区二区三区乱码 | 亚洲一区成人在线| 日韩二区三区四区| 丰满少妇在线播放bd日韩电影| 99精品国产视频| 日韩一区二区三区视频在线| 国产欧美一区二区精品久导航 | 一区二区欧美国产| 久久精品国产成人一区二区三区 | 亚洲自拍偷拍网站| 蜜臀av性久久久久蜜臀av麻豆| 国产91露脸合集magnet | 蜜臀av一区二区三区| 91精品国产一区二区| 国产电影精品久久禁18| 亚洲欧洲国产日韩| 欧美电影免费观看高清完整版在线观看 | 色94色欧美sute亚洲线路一久| 91精品黄色片免费大全| 久久久影院官网| 午夜欧美2019年伦理| 国产成人在线免费观看| 欧美精品1区2区| 中文字幕中文乱码欧美一区二区| 日本中文在线一区| 欧美性一二三区| 国产精品视频免费看| 久久精品国产一区二区| 欧美性欧美巨大黑白大战| 国产亚洲欧洲997久久综合| 午夜av一区二区三区| 欧洲av一区二区嗯嗯嗯啊| 久久久亚洲综合| 久久超碰97中文字幕| 欧美中文字幕一区二区三区 | 成人免费福利片| 久久品道一品道久久精品| 男人的天堂亚洲一区| 欧美蜜桃一区二区三区| 亚洲黄色免费电影| 97超碰欧美中文字幕| 国产精品久久久久久久蜜臀| 九色综合国产一区二区三区| 精品理论电影在线观看| 六月丁香婷婷久久| 日韩欧美专区在线| 韩国理伦片一区二区三区在线播放| 欧美精品九九99久久| 婷婷中文字幕一区三区| 欧美精品三级在线观看| 日本视频一区二区| 欧美大片日本大片免费观看| 久久69国产一区二区蜜臀| 精品国产乱码久久久久久1区2区| 美女脱光内衣内裤视频久久影院| 欧美一区二区在线视频| 免费观看91视频大全| 26uuu亚洲| 成人综合激情网| 亚洲美女免费视频| 欧美日韩精品免费| 久久99久久精品| 欧美激情在线免费观看| 91丝袜美女网| 日韩av午夜在线观看| 久久婷婷国产综合精品青草 | 日韩影院精彩在线| 精品欧美一区二区久久| 国产成人精品影视| 亚洲欧美日韩国产一区二区三区| 欧美午夜在线一二页| 免费久久99精品国产| 国产欧美综合在线| 91精品福利在线| 久久99精品一区二区三区三区| 自拍偷自拍亚洲精品播放| 欧美日韩一区精品| 国产成人午夜99999| 亚洲激情自拍偷拍| 日韩欧美高清一区| 91麻豆国产福利精品| 蜜臀av性久久久久蜜臀aⅴ| 国产精品色婷婷| 91精品国产综合久久精品性色| 国产高清精品久久久久| 亚洲一区二区视频在线| 2020国产精品久久精品美国| 在线观看欧美黄色| 国产福利一区二区三区视频| 亚洲www啪成人一区二区麻豆| 国产亚洲一二三区| 欧美一区日本一区韩国一区| 99久久精品99国产精品| 久久成人羞羞网站| 亚洲高清不卡在线| 国产精品你懂的| 精品国产网站在线观看| 欧美丝袜自拍制服另类| 成人免费高清在线观看| 国内精品视频666| 天天综合日日夜夜精品| 亚洲日本免费电影| 国产精品的网站| 国产日韩欧美麻豆| 久久中文娱乐网| 日韩一级片在线观看| 在线观看av不卡| 色综合激情五月| 色综合中文字幕国产| 免费精品视频在线| 日本欧美韩国一区三区| 五月激情综合婷婷| 福利一区二区在线| 一区精品在线播放| 久久一留热品黄| 久久免费电影网| 日韩美女视频一区二区在线观看| 久久亚区不卡日本| 久久亚洲精品国产精品紫薇| 日韩精品一区国产麻豆| 日韩一区二区高清| 91精品啪在线观看国产60岁| 欧美一区二视频| 日韩欧美国产精品一区| 精品av久久707| 精品福利在线导航| 久久综合视频网| 国产亚洲一区字幕| 最新日韩在线视频| 18成人在线观看| 夜夜精品视频一区二区| 亚洲影视在线播放| 日韩精品一二三区| 蜜臀精品久久久久久蜜臀| 寂寞少妇一区二区三区| 国产又黄又大久久| 成人一区二区三区视频| 91在线观看一区二区| 在线观看不卡一区| 日韩久久久精品| 中文字幕不卡的av| 亚洲一卡二卡三卡四卡无卡久久| 五月天激情综合网| 久久er99精品| gogogo免费视频观看亚洲一| 91黄色免费看| 日韩精品资源二区在线| 国产亚洲午夜高清国产拍精品 | 日韩欧美激情四射| 久久精品一区八戒影视| 1区2区3区国产精品| 婷婷中文字幕综合| 成人涩涩免费视频| 色综合久久天天综合网| 日韩视频一区在线观看| 国产精品视频一区二区三区不卡| 一区二区三区在线高清| 韩国欧美一区二区| 欧美性做爰猛烈叫床潮| 国产精品一区在线观看你懂的| 在线看日韩精品电影| 亚洲免费在线播放| 欧美刺激脚交jootjob| 精品视频在线免费看| 日韩精品一区二区三区在线播放| 国产精品你懂的在线欣赏| 日本欧美一区二区三区乱码| 成人理论电影网| 欧美一级一区二区|