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

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

?? decoder.v

?? 8051單片機是一種應用最廣泛的單片機.它的內核設計非常精簡,這是用Verilog硬件描述語言寫的8051單片機內核
?? V
?? 第 1 頁 / 共 5 頁
字號:
//////////////////////////////////////////////////////////////////////
////                                                              ////
////  8051 core decoder                                           ////
////                                                              ////
////  This file is part of the 8051 cores project                 ////
////  http://www.opencores.org/cores/8051/                        ////
////                                                              ////
////  Description                                                 ////
////   Main 8051 core module. decodes instruction and creates     ////
////   control sigals.                                            ////
////                                                              ////
////  To Do:                                                      ////
////   nothing                                                    ////
////                                                              ////
////  Author(s):                                                  ////
////      - Simon Teran, simont@opencores.org                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
////                                                              ////
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
////                                                              ////
//// This source file may be used and distributed without         ////
//// restriction provided that this copyright statement is not    ////
//// removed from the file and that any derivative work contains  ////
//// the original copyright notice and the associated disclaimer. ////
////                                                              ////
//// This source file 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 source 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.                                                     ////
////                                                              ////
//// You should have received a copy of the GNU Lesser General    ////
//// Public License along with this source; if not, download it   ////
//// from http://www.opencores.org/lgpl.shtml                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
//
// ver: 1
//



module decoder (clk, rst, op_in, ram_rd_sel, ram_wr_sel, wr_bit, wr, src_sel1, src_sel2, src_sel3, alu_op, psw_set, cy_sel, imm_sel, pc_wr, pc_sel,
                comp_sel, eq, rom_addr_sel, ext_addr_sel, wad2, rd, write_x, reti);

// clk          clock
// rst          reset
// op_in        operation code
// ram_rd_sel   select, whitch address will be send to ram for read
// ram_wr_sel   select, whitch address will be send to ram for write
// wr           write - if 1 then we will write to ram
// src_sel1     select alu source 1
// src_sel2     select alu source 2
// src_sel3     select alu source 3
// alu_op       alu operation
// psw_set      will we remember cy, ac, ov from alu
// cy_sel       carry in alu select
// comp_sel     compare source select
// eq   compare result
// wr_bit       if write bit addresable
// wad2         wrihe acc from destination 2
// imm_sel      immediate select
// pc_wr        pc write
// pc_sel       pc select
// rom_addr_sel rom address select (alu destination or pc)
// ext_addr_sel external address select (dptr or Ri)
// rd           read from rom
// write_x      write to external rom
// reti         return from interrupt


input clk, rst, eq;
input [7:0] op_in;
output ram_rd_sel, ram_wr_sel, src_sel1, src_sel2, psw_set, alu_op, cy_sel, imm_sel, wr, pc_wr, pc_sel, comp_sel, wr_bit;
output src_sel3, rom_addr_sel, ext_addr_sel, wad2, rd, reti, write_x;

reg reti, write_x;
reg [1:0] psw_set, ram_rd_sel, src_sel1, src_sel2, imm_sel, pc_sel, cy_sel;
reg [3:0] alu_op;
reg wr,  wr_bit, src_sel3, rom_addr_sel, ext_addr_sel, pc_wr, wad2;
reg [2:0] comp_sel, ram_wr_sel;

//
// state        if 2'b00 then normal execution, sle instructin that need more than one clock
// op           instruction buffer
reg [1:0] state;
reg [7:0] op;

//
// if state = 2'b00 then read nex instruction
assign rd = !state[0] & !state[1];

//
// main block
// case of instruction set control signals
always @(rst or op_in or eq or state)
begin
  if (rst) begin
    ram_rd_sel = 2'bxx;
    ram_wr_sel = `RWS_DC;
    src_sel1 = `ASS_DC;
    src_sel2 = `ASS_DC;
    alu_op = `ALU_NOP;
    imm_sel = `IDS_DC;
    wr = 1'b0;
    psw_set = `PS_NOT;
    cy_sel = `CY_0;
    pc_wr = `PCW_N;
    pc_sel = `PIS_DC;
    comp_sel = `CSS_DC;
    wr_bit = 1'b0;
    src_sel3 = `AS3_DC;
    rom_addr_sel = `RAS_PC;
    ext_addr_sel = `EAS_DC;
    wad2 = `WAD_N;
  end else begin
    case (state)
      2'b01: begin
    casex (op)
      `ACALL :begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_SP;
          src_sel1 = `ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_PCH;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `AJMP : begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_DC;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `LCALL :begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_SP;
          src_sel1 = `ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_PCH;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      default begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
      end
    endcase
    end
    2'b10:
    casex (op)
      `CJNE_R : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_I : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_D : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_C : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `DJNZ_R : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `DJNZ_D : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JB : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JBC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_D;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b1;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_CY;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JMP : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_Y;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNB : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_CY;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNZ : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人片综合在线| 久久综合成人精品亚洲另类欧美 | 激情综合色丁香一区二区| 欧美亚洲综合在线| 视频一区二区欧美| 精品国内二区三区| 成人午夜精品在线| 亚洲日本一区二区三区| 欧美亚洲另类激情小说| 天天综合天天做天天综合| 日韩三级在线观看| 高清成人在线观看| 成人欧美一区二区三区黑人麻豆| 色婷婷综合久久久中文一区二区| 一区二区三区视频在线观看| 欧美久久一区二区| 国产成人午夜99999| 亚洲免费视频中文字幕| 在线电影一区二区三区| 国产精品一区三区| 亚洲综合在线视频| 精品国产123| 在线精品视频免费观看| 国模套图日韩精品一区二区| 1000精品久久久久久久久| 欧美精品一二三| 成a人片亚洲日本久久| 日韩精品一二三区| 国产精品国产自产拍高清av王其| 欧美日韩精品一区二区三区四区 | 国产精品主播直播| 天天亚洲美女在线视频| 成人免费视频caoporn| 亚洲图片自拍偷拍| 久久九九久久九九| 欧美日韩成人一区| 成人av电影在线观看| 日本一不卡视频| 亚洲婷婷在线视频| 精品国产凹凸成av人导航| 91国产精品成人| 丁香一区二区三区| 久久狠狠亚洲综合| 午夜伦理一区二区| 亚洲色图清纯唯美| 久久久噜噜噜久久人人看| 欧美日韩一区二区三区四区| 成人毛片视频在线观看| 麻豆精品一区二区| 天堂久久一区二区三区| 亚洲精品亚洲人成人网在线播放| 欧美激情一区二区三区四区| 欧美日韩激情在线| 色综合中文综合网| 欧美亚洲动漫精品| 丁香五精品蜜臀久久久久99网站 | 一区二区三区不卡在线观看| 久久精品亚洲乱码伦伦中文| 欧美一区日本一区韩国一区| 色嗨嗨av一区二区三区| 福利电影一区二区| 国产精品一区二区果冻传媒| 蜜臀va亚洲va欧美va天堂| 亚洲小少妇裸体bbw| 一区二区三区四区激情| 《视频一区视频二区| 国产精品国产精品国产专区不蜜 | 国产精品嫩草影院av蜜臀| 久久丝袜美腿综合| 日韩一级在线观看| 欧美一区二区三区小说| 欧美精品成人一区二区三区四区| 欧美性videosxxxxx| 欧美无砖专区一中文字| 91传媒视频在线播放| 色婷婷综合久久久久中文一区二区| 99久久99久久免费精品蜜臀| 国产成人午夜精品影院观看视频 | 日韩三级视频在线看| 5566中文字幕一区二区电影| 欧美日韩一区二区三区不卡| 91精彩视频在线| 欧美视频中文字幕| 91麻豆精品国产91久久久更新时间| 欧美久久一二三四区| 91精品国产综合久久蜜臀| 欧美一级生活片| 精品国产免费一区二区三区香蕉| 久久综合九色综合97婷婷女人| 久久伊人蜜桃av一区二区| 久久婷婷色综合| 综合欧美一区二区三区| 亚洲综合一区二区三区| 日本免费在线视频不卡一不卡二| 国产一区在线不卡| av成人动漫在线观看| 欧美在线视频全部完| 欧美一区二区播放| 国产色一区二区| 亚洲综合一区二区三区| 久久国产精品一区二区| www.欧美.com| 欧美三区在线观看| 欧美va亚洲va在线观看蝴蝶网| 日本一区二区三区免费乱视频| 中文字幕一区二| 日韩中文字幕亚洲一区二区va在线| 久久精品国产亚洲高清剧情介绍| 国产 欧美在线| 欧美日韩一区三区| 久久女同精品一区二区| 一区二区三区美女| 加勒比av一区二区| 色婷婷精品久久二区二区蜜臂av| 久久精品国产成人一区二区三区| 亚洲va天堂va国产va久| 7799精品视频| 欧美女孩性生活视频| 久久精品夜色噜噜亚洲a∨| 国产精品第13页| 日韩高清不卡一区二区三区| 国产成人啪免费观看软件| 欧美视频三区在线播放| 国产午夜亚洲精品不卡 | 中文字幕精品综合| 亚洲综合免费观看高清完整版 | 国产日产亚洲精品系列| 一区二区三区丝袜| 国产91精品入口| 91麻豆精品国产91久久久更新时间| 日本一区二区三区电影| 日本成人在线不卡视频| 99久久国产免费看| xnxx国产精品| 亚洲国产精品一区二区www| 国产成人免费视频精品含羞草妖精| 欧美三级一区二区| 18涩涩午夜精品.www| 国产精品影视网| 正在播放一区二区| 一区二区三区日韩在线观看| 国产精品一二三| 日韩欧美在线网站| 亚洲国产色一区| 91黄视频在线| 国产精品高清亚洲| 国产盗摄视频一区二区三区| 日韩免费一区二区三区在线播放| 18欧美乱大交hd1984| 成人午夜视频网站| 久久久精品黄色| 激情成人午夜视频| 日韩一卡二卡三卡国产欧美| 香蕉加勒比综合久久| 色婷婷综合久久久| 国产精品国产三级国产aⅴ中文| 国产精品一区在线观看你懂的| 欧美一区二区免费| 午夜精品123| 欧美日韩精品一区二区三区四区| 亚洲另类色综合网站| eeuss鲁片一区二区三区在线观看| 久久久久久久久久久电影| 久久99精品一区二区三区| 欧美一级二级三级蜜桃| 奇米四色…亚洲| 日韩免费看网站| 国模无码大尺度一区二区三区| 欧美精品一区二区三区很污很色的 | 激情国产一区二区| 欧美久久久久久久久中文字幕| 一区二区三区不卡视频| 在线免费一区三区| 亚洲最新在线观看| 欧美日韩一区二区欧美激情| 亚洲国产aⅴ成人精品无吗| 欧美日韩大陆一区二区| 天使萌一区二区三区免费观看| 欧美精品xxxxbbbb| 久久福利视频一区二区| 久久综合色综合88| 成人免费看视频| 亚洲激情六月丁香| 欧美精品v国产精品v日韩精品| 日韩中文欧美在线| 精品国产麻豆免费人成网站| 国产精品1区2区3区在线观看| 欧美韩日一区二区三区| 成人av集中营| 亚洲国产一区二区三区青草影视| 91精品欧美一区二区三区综合在| 久久精品国产第一区二区三区| 久久午夜免费电影| 91蝌蚪porny| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久亚洲二区三区| 91啪在线观看| 奇米综合一区二区三区精品视频 | 亚洲国产高清在线观看视频| 一道本成人在线|